changeset 12572:bf01b160ab0d

[gaim-migrate @ 14891] Rearrange so that gaim_user_dir() is initialized before we add it to the gtkrc search path. committer: Tailor Script <tailor@pidgin.im>
author Daniel Atallah <daniel.atallah@gmail.com>
date Tue, 20 Dec 2005 02:39:30 +0000
parents 2c73e08032a1
children 200f22ca4890
files src/gtkmain.c src/win32/win32dep.c
diffstat 2 files changed, 26 insertions(+), 17 deletions(-) [+]
line wrap: on
line diff
--- a/src/gtkmain.c	Mon Dec 19 22:23:40 2005 +0000
+++ b/src/gtkmain.c	Tue Dec 20 02:39:30 2005 +0000
@@ -77,6 +77,10 @@
 # include <gdk/gdkx.h>
 #endif
 
+#ifdef _WIN32
+# include "wspell.h"
+#endif
+
 
 
 #ifdef HAVE_STARTUP_NOTIFICATION
@@ -539,22 +543,6 @@
 	}
 #endif
 
-	search_path = g_build_filename(gaim_user_dir(), "gtkrc-2.0", NULL);
-	gtk_rc_add_default_file(search_path);
-	g_free(search_path);
-
-	gui_check = gtk_init_check(&argc, &argv);
-	if (!gui_check) {
-		char *display = gdk_get_display();
-
-		printf("Gaim %s\n", VERSION);
-
-		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,
@@ -626,6 +614,28 @@
 	wgaim_init(hint);
 #endif
 
+	search_path = g_build_filename(gaim_user_dir(), "gtkrc-2.0", NULL);
+	gtk_rc_add_default_file(search_path);
+	g_free(search_path);
+
+
+	gui_check = gtk_init_check(&argc, &argv);
+	if (!gui_check) {
+		char *display = gdk_get_display();
+
+		printf("Gaim %s\n", VERSION);
+
+		g_warning("cannot open display: %s", display ? display : "unset");
+		g_free(display);
+
+		return 1;
+	}
+
+#ifdef _WIN32
+	/** TODO: Move this to a wgaim_gtk_init() if we need such a thing */
+	wgaim_gtkspell_init();
+#endif
+
 	gaim_core_set_ui_ops(gaim_gtk_core_get_ui_ops());
 	gaim_eventloop_set_ui_ops(gaim_gtk_eventloop_get_ui_ops());
 
--- a/src/win32/win32dep.c	Mon Dec 19 22:23:40 2005 +0000
+++ b/src/win32/win32dep.c	Tue Dec 20 02:39:30 2005 +0000
@@ -434,7 +434,6 @@
 	if(!wgaim_set_idlehooks())
 		gaim_debug(GAIM_DEBUG_ERROR, "wgaim", "Failed to initialize idle tracker\n");
 
-	wgaim_gtkspell_init();
 	gaim_debug(GAIM_DEBUG_INFO, "wgaim", "wgaim_init end\n");
 }