# HG changeset patch # User Etan Reisner # Date 1107838775 0 # Node ID 59a2807e10bbd667a8160787f89ebc2910202fab # Parent 662a99c6701fb8ef1f6d331e20040b0dd407408e [gaim-migrate @ 11981] 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." committer: Tailor Script diff -r 662a99c6701f -r 59a2807e10bb src/gtkmain.c --- a/src/gtkmain.c Mon Feb 07 23:29:48 2005 +0000 +++ b/src/gtkmain.c Tue Feb 08 04:59:35 2005 +0000 @@ -524,6 +524,16 @@ } #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 @@ 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.