Update of /cvsroot/gaim/gaim/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4599/src
Modified Files:
gtkmain.c
Log Message:
I'm not sure when using --class broke (though it was probably when we added -c) but this fixes it for me and is arguable more correct anyway since according to the gtk docs gtk_init (and gtk_init_check) "will initialize everything needed to operate the toolkit and parses some standard command line options. argc and argv are adjusted accordingly so your own code will never see those standard arguments."
Index: gtkmain.c
===================================================================
RCS file: /cvsroot/gaim/gaim/src/gtkmain.c,v
retrieving revision 1.20
retrieving revision 1.21
diff -u -d -p -r1.20 -r1.21
--- gtkmain.c 5 Feb 2005 17:59:19 -0000 1.20
+++ gtkmain.c 8 Feb 2005 04:59:35 -0000 1.21
@@ -524,6 +524,16 @@ int main(int argc, char *argv[])
}
#endif
+ gui_check = gtk_init_check(&argc, &argv);
+ if (!gui_check) {
+ char *display = gdk_get_display();
+
+ g_warning("cannot open display: %s", display ? display : "unset");
+ g_free(display);
+
+ return 1;
+ }
+
/* scan command-line options */
opterr = 1;
while ((opt = getopt_long(argc, argv,
@@ -587,16 +597,6 @@ int main(int argc, char *argv[])
set_gaim_user_dir(opt_config_dir_arg);
}
- gui_check = gtk_init_check(&argc, &argv);
- if (!gui_check) {
- char *display = gdk_get_display();
-
- g_warning("cannot open display: %s", display ? display : "unset");
- g_free(display);
-
- return 1;
- }
-
/*
* We're done piddling around with command line arguments.
* Fire up this baby.
|