\fB\-d\fR
display debugging messages.
-.TP
-.BI \-display " host" : display
-specifies the host and screen to be used by \fBdockbatmon\fR. By default this
-is obtained from the environment variable
-.SB DISPLAY.
-
-.TP
-.BI \-geometry " geometry"
-.RB ( *geometry )
-specifies the initial geometry of the window.
-
.TP
\fB\-h\fR
display usage and exit
* New window creation and initialization for a Dockable Application
******************************************************************************/
void
-dockapp_init(int argc, char *argv[], char *display_arg, char *geometry_arg)
+dockapp_init(int argc, char *argv[])
{
GtkWidget *dockwin;
GtkWidget *iconwin;
#include <gdk/gdkx.h>
void
-dockapp_init(int argc, char *argv[], char *display_arg, char *geometry_arg);
+dockapp_init(int argc, char *argv[]);
void
dockapp_set_mask(GtkWidget *iconwin, char **xpm);
ParseCommandLineOptions(argc, argv);
/* Initializing and creating a DockApp window. */
- dockapp_init(argc, argv, batmon_infos.display_arg,
- batmon_infos.geometry_arg);
+ dockapp_init(argc, argv);
gtk_main();
printf("Dockable analog clock and calendar.\n\n");
printf
(" -d Display debugging messages.\n");
- printf(" -display <host:display> X display name\n");
- printf(" -geometry +XPOS+YPOS initial window position\n");
printf(" -h display this help and exit\n");
printf(" -version display version information");
printf(" and exit\n");
{
int i;
char *token;
- int display_on = false;
- int geometry_on = false;
/* Default values. */
batmon_infos.debug = false;
/* Processing options names */
switch (token[1]) {
case 'd':
- if (STREQ("display", &token[1]))
- display_on = true;
- else if (strlen(&token[1]) == 1)
- batmon_infos.debug = true;
- break;
- case 'g':
- if (STREQ("geometry", &token[1]))
- geometry_on = true;
+ batmon_infos.debug = true;
break;
case 'h':
DisplayUsage();
break;
default:
/* Processing options arguments */
- if (display_on != false) {
- display_on = false;
- batmon_infos.display_arg = token;
- } else if (geometry_on != false) {
- geometry_on = false;
- batmon_infos.geometry_arg = token;
- } else {
- InvalidOption("invalid option", token);
- }
+ InvalidOption("invalid option", token);
break;
} /* end switch( token[0] ) */
} /* end for */
-
- if (display_on != false)
- InvalidOption("missing display parameter", NULL);
- else if (geometry_on != false)
- InvalidOption("missing geometry parameter", NULL);
}