Mercurial > pidgin.yaz
changeset 10581:59a2807e10bb
[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 <tailor@pidgin.im>
author | Etan Reisner <pidgin@unreliablesource.net> |
---|---|
date | Tue, 08 Feb 2005 04:59:35 +0000 |
parents | 662a99c6701f |
children | b953704d4d6c |
files | src/gtkmain.c |
diffstat | 1 files changed, 10 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- 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.