Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup SetRCDefaults() #567

Merged
merged 2 commits into from
Jun 30, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 16 additions & 19 deletions fvwm/fvwm3.c
Original file line number Diff line number Diff line change
Expand Up @@ -1345,34 +1345,30 @@ static void SetRCDefaults(void)
{ "TitleStyle Centered -- Raised", "", "" },
{ "Style * Color lightgrey/dimgrey", "", "" },
{ "Style * HilightFore black, HilightBack grey", "", "" },
{ "DestroyFunc FvwmMakeMissingDesktopMenu", "", "" },
{ "AddToFunc FvwmMakeMissingDesktopMenu I PipeRead 'fvwm-menu-desktop --enable-mini-icons --fvwm-icons'", "", "" },
{ "AddToFunc LoadDefaultConfig", "", "" },
{ "+ I Read "FVWM_DATADIR"/default-config/config", "", "" },
{ "+ I StartFunction", "", "" },
{
"AddToMenu MenuFvwmRoot \"",
_("Builtin Menu"),
"\" Title"
},
{ "+ MissingSubmenuFunction FvwmMakeMissingDesktopMenu","",""},
{ "+ \"&1. XTerm\" Exec xterm", "", ""},
{ "+ \"&1. XTerm\" Exec xterm", "", "" },
{ "+ \"&2. FvwmConsole\" Module FvwmConsole", "", "" },
{
"+ \"&2. ",
_("Issue fvwm commands"),
"\" Module FvwmConsole"
"+ \"&3. ",
_("Load Default Config"),
"\" LoadDefaultConfig"
},
{
"+ \"&D. ",
_("Desktop Menu"),
"\" Popup FvwmMenu"
"+ \"&4. ",
_("Restart"),
" Fvwm\" Restart"
},
{
"+ \"&R. ",
_("Restart fvwm"),
"\" Restart"
},
{
"+ \"&X. ",
_("Exit fvwm"),
"\" Quit"
"+ \"&5. ",
_("Quit"),
" Fvwm\" Quit"
},
{ "Mouse 1 R A Menu MenuFvwmRoot", "", "" },
/* default menu navigation */
Expand Down Expand Up @@ -1403,7 +1399,8 @@ static void SetRCDefaults(void)
ecc.type = Restarting ? EXCT_RESTART : EXCT_INIT;
ecc.w.wcontext = C_ROOT;
exc = exc_create_context(&ecc, ECC_TYPE | ECC_WCONTEXT);
xasprintf(&cmd, defaults[i][0], defaults[i][1], defaults[i][2]);
xasprintf(&cmd, "%s%s%s", defaults[i][0], defaults[i][1],
defaults[i][2]);
execute_function(NULL, exc, cmd, 0);
ThomasAdam marked this conversation as resolved.
Show resolved Hide resolved
free(cmd);
exc_destroy_context(exc);
Expand Down