Mercurial > pidgin
diff src/main.c @ 7538:357eb1c39b72
[gaim-migrate @ 8151]
Robot101 made a nice patch (which I modified just slightly) to put our
gtkspell attachment function that we use all throughout gaim into a utility
function, which handles error checking and only does anything if gtkspell
support is compiled in. It lets us remove a lot of #ifdef USE_GTKSPELL from
places, and doesn't change any functionality.
committer: Tailor Script <tailor@pidgin.im>
author | Christian Hammond <chipx86@chipx86.com> |
---|---|
date | Mon, 17 Nov 2003 06:48:01 +0000 |
parents | 8beec54d1855 |
children | f48c6e4db102 |
line wrap: on
line diff
--- a/src/main.c Mon Nov 17 06:44:05 2003 +0000 +++ b/src/main.c Mon Nov 17 06:48:01 2003 +0000 @@ -501,8 +501,9 @@ gaim_privacy_set_ui_ops(gaim_gtk_privacy_get_ui_ops()); gaim_request_set_ui_ops(gaim_gtk_request_get_ui_ops()); gaim_sound_set_ui_ops(gaim_gtk_sound_get_ui_ops()); - gaim_connections_set_ui_ops(gaim_gtk_connections_get_ui_ops()); + gaim_connections_set_ui_ops(gaim_gtk_connections_get_ui_ops()); + gaim_gtk_stock_init(); gaim_gtk_prefs_init(); gaim_gtk_blist_init(); gaim_gtk_conversations_init(); @@ -759,8 +760,7 @@ } */ - gtk_set_locale(); - gui_check=gtk_init_check(&argc, &argv); + gui_check = gtk_init_check(&argc, &argv); /* scan command-line options */ opterr = 1; @@ -816,15 +816,14 @@ return 0; } -#if GTK_CHECK_VERSION(2,2,0) - if(! gui_check) { - const char *display_name_arg = gdk_get_display_arg_name (); - g_warning ("cannot open display: %s", display_name_arg ? display_name_arg : " "); - return 1; + if (!gui_check) { + char *display = gdk_get_display(); + + g_warning("cannot open display: %s", display ? display : "unset"); + g_free(display); + + return 1; } -#endif - - gaim_gtk_stock_init(); #ifdef _WIN32 wgaim_init(hint);