X-Git-Url: https://git.distorted.org.uk/~mdw/xtoys/blobdiff_plain/d72bdcdbbe512494f64102d18879a08163f231a3..ad97c83b25b61bf4a7be58148884c6f50a4685d5:/xshutdown.c diff --git a/xshutdown.c b/xshutdown.c index 499ff7c..8118e62 100644 --- a/xshutdown.c +++ b/xshutdown.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: xshutdown.c,v 1.7 1999/08/20 07:29:19 mdw Exp $ + * $Id: xshutdown.c,v 1.9 2004/04/08 01:36:29 mdw Exp $ * * Pretty GTK interface to waking up an xwait * @@ -26,33 +26,6 @@ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ -/*----- Revision history --------------------------------------------------* - * - * $Log: xshutdown.c,v $ - * Revision 1.7 1999/08/20 07:29:19 mdw - * New command line syntax, and new atom protocol. - * - * Revision 1.6 1998/12/11 09:51:51 mdw - * Use mgLib's `msg' box rather than doing things the hard way. - * - * Revision 1.5 1998/12/03 01:00:19 mdw - * Honour escape presses in the dialogue boxes. - * - * Revision 1.4 1998/12/03 00:39:45 mdw - * Force focus when starting up. - * - * Revision 1.3 1998/11/30 22:36:49 mdw - * Tidy up tabbing in help texts very slightly. - * - * Revision 1.2 1998/11/21 22:30:23 mdw - * Support GNU-style long options throughout, and introduce proper help - * text to all programs. Update manual pages to match. - * - * Revision 1.1 1998/11/16 23:00:49 mdw - * Initial versions. - * - */ - /*----- Header files ------------------------------------------------------*/ #include @@ -98,17 +71,18 @@ static void usage(FILE *fp) int main(int argc, char *argv[]) { - char *atom = XWAIT_DIE; - char *xmsg = XWAIT_DIE_MSG; + const char *atom = XWAIT_DIE; + const char *xmsg = XWAIT_DIE_MSG; Atom xa, xm; - char *prompt = "Are you sure you want to shut down this session?"; - char *title = "xshutdown"; + const char *prompt = "Are you sure you want to shut down this session?"; + const char *title; ego(argv[0]); gtk_init(&argc, &argv); /* --- Parse options --- */ + title = QUIS; for (;;) { static struct option opt[] = { { "help", 0, 0, 'h' }, @@ -198,13 +172,13 @@ int main(int argc, char *argv[]) */ if (xatom_get(gdk_display, DefaultRootWindow(gdk_display), xa) == None) { - msg("!:~OK", "no xwait listening for `%s'", atom); + msg(QUIS, "!:~OK", "no xwait listening for `%s'", atom); exit(EXIT_FAILURE); } /* --- Main code --- */ - if (msg("!:OK,~Cancel", "%s", prompt) == 0) + if (msg(title, "!:OK,~Cancel", "%s", prompt) == 0) xatom_set(gdk_display, DefaultRootWindow(gdk_display), xa, xm); return (0);