X-Git-Url: https://git.distorted.org.uk/~mdw/xtoys/blobdiff_plain/f3b35b6bbd646fb0e676ef3d64c91b38ff9f9162..0a47c22241556270540d5c3666de41cc93318edd:/xgetline.c diff --git a/xgetline.c b/xgetline.c index e05bc22..efdbb7f 100644 --- a/xgetline.c +++ b/xgetline.c @@ -1,6 +1,6 @@ /* -*-c-*- * - * $Id: xgetline.c,v 1.3 1998/11/21 22:30:20 mdw Exp $ + * $Id: xgetline.c,v 1.6 1998/12/03 00:56:29 mdw Exp $ * * Fetch a line of text from the user * @@ -29,6 +29,15 @@ /*----- Revision history --------------------------------------------------* * * $Log: xgetline.c,v $ + * Revision 1.6 1998/12/03 00:56:29 mdw + * Set focus on the entry field, rather than leaving things to luck. + * + * Revision 1.5 1998/12/03 00:39:44 mdw + * Force focus when starting up. + * + * Revision 1.4 1998/11/30 22:36:47 mdw + * Tidy up tabbing in help texts very slightly. + * * Revision 1.3 1998/11/21 22:30:20 mdw * Support GNU-style long options throughout, and introduce proper help * text to all programs. Update manual pages to match. @@ -50,6 +59,7 @@ #include #include +#include "mdwfocus.h" #include "mdwopt.h" #include "quis.h" @@ -227,7 +237,7 @@ int main(int argc, char *argv[]) "-u, --usage Display a short usage summary\n" "-v, --version Display the program's version number\n" "\n" -"-i, --invisible Don't show the user's string as it's typed\n" +"-i, --invisible\t Don't show the user's string as it's typed\n" "-t, --title=TITLE Set the window's title string\n" "-p, --prompt=PROMPT Set the window's prompt string\n" "-d, --default=DEFAULT Set the default string already in the window\n", @@ -325,6 +335,9 @@ int main(int argc, char *argv[]) /* --- Go go go --- */ + gtk_widget_realize(win); + mdwfocus(win); + gtk_widget_grab_focus(entry); gtk_widget_show(win); gtk_main();