\fB\-d\fR
Display debugging messages.
-.TP
-.BI \-display " host" : display
-Specifies the host and screen to be used by \fBwmnotify\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
-InitDockAppWindow(int argc, char *argv[], char *pixmap_data[],
- char *display_arg, char *geometry_arg)
+InitDockAppWindow(int argc, char *argv[], char *pixmap_data[])
{
XGCValues gcv;
XSizeHints size_hints;
*/
/* Opening a connection to the X server. */
- dockapp.display = XOpenDisplay(display_arg);
+ dockapp.display = XOpenDisplay(NULL);
if (dockapp.display == NULL) {
- fprintf(stderr, "%s: Can't open display: %s\n", PACKAGE,
- XDisplayName(display_arg));
+ fprintf(stderr, "%s: Can't open X display\n", PACKAGE);
ErrorLocation(__FILE__, __LINE__);
exit(EXIT_FAILURE);
}
* XWMGeometry() returns an 'int', but Xlib documentation doesn't
* explain it's meaning.
*/
- XWMGeometry(dockapp.display, dockapp.screen, geometry_arg, NULL,
+ XWMGeometry(dockapp.display, dockapp.screen, NULL, NULL,
BWIDTH, &size_hints, &size_hints.x, &size_hints.y,
&size_hints.width, &size_hints.height, &gravity);
};
void
-InitDockAppWindow(int argc, char *argv[], char *pixmap_data[],
- char *display_arg, char *geometry_arg);
+InitDockAppWindow(int argc, char *argv[], char *pixmap_data[]);
void RedrawWindow(void);
printf("use alternate configuration file\n");
printf(" -d ");
printf("Display debugging messages.\n");
- printf(" -display <host:display> ");
- printf("X display name\n");
- printf(" -geometry +XPOS+YPOS ");
- printf("initial window position\n");
printf(" -h ");
printf("display this help and exit\n");
printf(" -version ");
int i;
char *token;
bool config_file_on = false;
- bool display_on = false;
- bool geometry_on = false;
/* Default values. */
wmnotify_infos.debug = false;
}
break;
case 'd':
- if (STREQ("display", &token[1]))
- display_on = true;
- else if (strlen(&token[1]) == 1)
- wmnotify_infos.debug = true;
- break;
- case 'g':
- if (STREQ("geometry", &token[1]))
- geometry_on = true;
- else
- InvalidOption("invalid option", token);
+ wmnotify_infos.debug = true;
break;
case 'h':
if (strlen(&token[1]) == 1) {
token;
/*strcpy( config_file_name, token ); */
config_file_on = false;
- } else if (display_on != false) {
- display_on = false;
- wmnotify_infos.display_arg = token;
- } else if (geometry_on != false) {
- geometry_on = false;
- wmnotify_infos.geometry_arg = token;
} else {
InvalidOption("invalid option", token);
}
} /* end for */
if (config_file_on != false) {
- InvalidOption("missing configuration file parameter",
- NULL);
- } else if (display_on != false) {
- InvalidOption("missing display parameter", NULL);
- } else if (geometry_on != false) {
- InvalidOption("missing geometry parameter", NULL);
+ InvalidOption("missing configuration file parameter", NULL);
}
}
ProcessXlibEventsInit(SingleClick, DoubleClick);
/* Initializing and creating a DockApp window. */
- InitDockAppWindow(argc, argv, wmnotify_xpm,
- wmnotify_infos.display_arg,
- wmnotify_infos.geometry_arg);
+ InitDockAppWindow(argc, argv, wmnotify_xpm);
/* Starting thread for periodically checking for new mail. */
status = pthread_create(&timer_thread, NULL, TimerThread, NULL);
struct wmnotify_t {
bool debug;
- char *display_arg;
- char *geometry_arg;
char *optional_config_file;
char mail_client_command[512];
char *mail_client_argv[ARGV_LIMIT];