mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 05:18:06 +01:00
- Slovak .po file updates from (Jan Tomka <judas@linux.sk>)
- "Save Workspace state" confirmation switch on the exit dialog panels (based on a patch from Jan Tomka <judas@linux.sk>)
This commit is contained in:
@@ -174,21 +174,44 @@ static void
|
||||
exitCommand(WMenu *menu, WMenuEntry *entry)
|
||||
{
|
||||
static int inside = 0;
|
||||
int result;
|
||||
|
||||
/* prevent reentrant calls */
|
||||
if (inside)
|
||||
return;
|
||||
inside = 1;
|
||||
|
||||
if ((long)entry->clientdata==M_QUICK
|
||||
|| wMessageDialog(menu->frame->screen_ptr, _("Exit"),
|
||||
_("Exit window manager?"),
|
||||
_("Exit"), _("Cancel"), NULL)==WAPRDefault) {
|
||||
#define R_CANCEL 0
|
||||
#define R_EXIT 1
|
||||
|
||||
result = R_CANCEL;
|
||||
|
||||
if ((long)entry->clientdata==M_QUICK) {
|
||||
result = R_EXIT;
|
||||
} else {
|
||||
int r, oldSaveSessionFlag;
|
||||
|
||||
oldSaveSessionFlag = wPreferences.save_session_on_exit;
|
||||
r = wExitDialog(menu->frame->screen_ptr, _("Exit"),
|
||||
_("Exit window manager?"),
|
||||
_("Exit"), _("Cancel"), NULL);
|
||||
|
||||
if (r==WAPRDefault) {
|
||||
result = R_EXIT;
|
||||
} else if (r==WAPRAlternate) {
|
||||
/* Don't modify the "save session on exit" flag if the
|
||||
* user canceled the operation. */
|
||||
wPreferences.save_session_on_exit = oldSaveSessionFlag;
|
||||
}
|
||||
}
|
||||
if (result==R_EXIT) {
|
||||
#ifdef DEBUG
|
||||
printf("Exiting WindowMaker.\n");
|
||||
#endif
|
||||
Shutdown(WSExitMode);
|
||||
}
|
||||
#undef R_EXIT
|
||||
#undef R_CANCEL
|
||||
inside = 0;
|
||||
}
|
||||
|
||||
@@ -229,15 +252,22 @@ shutdownCommand(WMenu *menu, WMenuEntry *entry)
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
int r;
|
||||
int r, oldSaveSessionFlag;
|
||||
|
||||
r = wMessageDialog(menu->frame->screen_ptr,
|
||||
_("Kill X session"),
|
||||
_("Kill Window System session?\n"
|
||||
"(all applications will be closed)"),
|
||||
_("Kill"), _("Cancel"), NULL);
|
||||
if (r==WAPRDefault)
|
||||
result = R_KILL;
|
||||
oldSaveSessionFlag = wPreferences.save_session_on_exit;
|
||||
|
||||
r = wExitDialog(menu->frame->screen_ptr,
|
||||
_("Kill X session"),
|
||||
_("Kill Window System session?\n"
|
||||
"(all applications will be closed)"),
|
||||
_("Kill"), _("Cancel"), NULL);
|
||||
if (r==WAPRDefault) {
|
||||
result = R_KILL;
|
||||
} else if (r==WAPRAlternate) {
|
||||
/* Don't modify the "save session on exit" flag if the
|
||||
* user canceled the operation. */
|
||||
wPreferences.save_session_on_exit = oldSaveSessionFlag;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user