[Commits] main.c 1.115.2.252 1.115.2.253

colin at claws-mail.org colin at claws-mail.org
Mon Aug 27 21:01:53 CEST 2012


Update of /home/claws-mail/claws/src
In directory srv:/tmp/cvs-serv22441/src

Modified Files:
      Tag: gtk2
	main.c 
Log Message:
2012-08-27 [colin]	3.8.1cvs39

	* src/main.c
		Fix double mainwindow presentation that confuses GNOME3
		when some plugins fail to load (subsequent Claws windows
		got no focus in that case)

Index: main.c
===================================================================
RCS file: /home/claws-mail/claws/src/main.c,v
retrieving revision 1.115.2.252
retrieving revision 1.115.2.253
diff -u -d -r1.115.2.252 -r1.115.2.253
--- main.c	7 Jul 2012 07:09:28 -0000	1.115.2.252
+++ main.c	27 Aug 2012 19:01:51 -0000	1.115.2.253
@@ -1069,9 +1069,10 @@
 	gint num_folder_class = 0;
 	gboolean asked_for_migration = FALSE;
 	gboolean start_done = TRUE;
-	GtkUIManager *gui_manager = NULL;
 	GSList *plug_list = NULL;
 	gboolean never_ran = FALSE;
+	gboolean mainwin_shown = FALSE;
+
 	START_TIMING("startup");
 
 	sc_starting = TRUE;
@@ -1196,7 +1197,7 @@
 		gdk_screen_get_system_colormap(
 			gdk_screen_get_default()));
 
-	gui_manager = gtkut_create_ui_manager();
+	gtkut_create_ui_manager();
 
 	/* Create container for all the menus we will be adding */
 	MENUITEM_ADDUI("/", "Menus", NULL, GTK_UI_MANAGER_MENUBAR);
@@ -1467,8 +1468,10 @@
 
 	/* if crashed, show window early so that the user
 	 * sees what's happening */
-	if (claws_crashed())
+	if (claws_crashed()) {
 		main_window_popup(mainwin);
+		mainwin_shown = TRUE;
+	}
 
 	account_set_missing_folder();
 	folder_set_missing_folders();
@@ -1543,6 +1546,7 @@
 		}
 		main_window_cursor_normal(mainwin);
 		main_window_popup(mainwin);
+		mainwin_shown = TRUE;
 		alertpanel_warning(ngettext(
 				     "The following plugin failed to load. "
 				     "Check the Plugins configuration "
@@ -1562,7 +1566,7 @@
 	 	plugin_load_standard_plugins ();
 	}
 	/* if not crashed, show window now */
-	if (!claws_crashed()) {
+	if (!mainwin_shown) {
 		/* apart if something told not to show */
 		if (show_at_startup)
 			main_window_popup(mainwin);



More information about the Commits mailing list