talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit fac56fe15c726a0bae99d0b6598e3b5575f6c522
parent b4c3936d7fa99f3fbf1ae8939b894f51d6dc3a78
Author: Colin Leroy <colin@colino.net>
Date:   Mon, 27 Aug 2012 19:01:52 +0000

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)

Diffstat:
MChangeLog | 7+++++++
MPATCHSETS | 1+
Mconfigure.ac | 2+-
Msrc/main.c | 12++++++++----
4 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,10 @@ +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) + 2012-08-27 [colin] 3.8.1cvs38 * src/summaryview.c diff --git a/PATCHSETS b/PATCHSETS @@ -4413,3 +4413,4 @@ ( cvs diff -u -r 1.149.2.108 -r 1.149.2.109 src/inc.c; cvs diff -u -r 1.150.2.124 -r 1.150.2.125 src/procmsg.c; ) > 3.8.1cvs36.patchset ( cvs diff -u -r 1.274.2.347 -r 1.274.2.348 src/mainwindow.c; cvs diff -u -r 1.395.2.448 -r 1.395.2.449 src/summaryview.c; ) > 3.8.1cvs37.patchset ( cvs diff -u -r 1.395.2.449 -r 1.395.2.450 src/summaryview.c; ) > 3.8.1cvs38.patchset +( cvs diff -u -r 1.115.2.252 -r 1.115.2.253 src/main.c; ) > 3.8.1cvs39.patchset diff --git a/configure.ac b/configure.ac @@ -12,7 +12,7 @@ MINOR_VERSION=8 MICRO_VERSION=1 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=38 +EXTRA_VERSION=39 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/main.c b/src/main.c @@ -1069,9 +1069,10 @@ int main(int argc, char *argv[]) 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 @@ int main(int argc, char *argv[]) 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 @@ int main(int argc, char *argv[]) /* 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 @@ int main(int argc, char *argv[]) } 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 @@ int main(int argc, char *argv[]) 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);