From faab048cedfdd1a3d35cf51b1011055aeb7406b7 Mon Sep 17 00:00:00 2001 From: Colin Leroy Date: Fri, 23 Feb 2007 18:09:54 +0000 Subject: [PATCH] 2007-02-23 [colin] 2.7.2cvs70 * src/main.c * src/main.h * src/plugins/trayicon/trayicon.c Fix blinking mainwin when starting in tray (show mainwindow later in the startup process, apart if restarting post-crash) --- ChangeLog | 9 +++++++++ PATCHSETS | 1 + configure.ac | 2 +- src/main.c | 18 +++++++++++++++++- src/main.h | 2 ++ src/plugins/trayicon/trayicon.c | 1 + 6 files changed, 31 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ef0c7eedd..8b6c481af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-02-23 [colin] 2.7.2cvs70 + + * src/main.c + * src/main.h + * src/plugins/trayicon/trayicon.c + Fix blinking mainwin when starting in tray + (show mainwindow later in the startup process, + apart if restarting post-crash) + 2007-02-23 [colin] 2.7.2cvs69 * src/folderview.c diff --git a/PATCHSETS b/PATCHSETS index a3b2aabfc..19e1156d1 100644 --- a/PATCHSETS +++ b/PATCHSETS @@ -2387,3 +2387,4 @@ ( cvs diff -u -r 1.27.2.29 -r 1.27.2.30 src/addr_compl.c; ) > 2.7.2cvs67.patchset ( cvs diff -u -r 1.382.2.360 -r 1.382.2.361 src/compose.c; ) > 2.7.2cvs68.patchset ( cvs diff -u -r 1.207.2.149 -r 1.207.2.150 src/folderview.c; cvs diff -u -r 1.1.2.43 -r 1.1.2.44 src/imap_gtk.c; ) > 2.7.2cvs69.patchset +( cvs diff -u -r 1.115.2.138 -r 1.115.2.139 src/main.c; cvs diff -u -r 1.7.2.9 -r 1.7.2.10 src/main.h; cvs diff -u -r 1.14.2.51 -r 1.14.2.52 src/plugins/trayicon/trayicon.c; ) > 2.7.2cvs70.patchset diff --git a/configure.ac b/configure.ac index 68d132e38..f99953f75 100644 --- a/configure.ac +++ b/configure.ac @@ -11,7 +11,7 @@ MINOR_VERSION=7 MICRO_VERSION=2 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=69 +EXTRA_VERSION=70 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/main.c b/src/main.c index da4899419..dde21c569 100644 --- a/src/main.c +++ b/src/main.c @@ -548,6 +548,12 @@ static void sc_session_manager_connect(MainWindow *mainwin) static gboolean sc_exiting = FALSE; static gboolean sc_starting = FALSE; +static gboolean show_at_startup = TRUE; + +void main_set_show_at_startup(gboolean show) +{ + show_at_startup = show; +} int main(int argc, char *argv[]) { @@ -820,7 +826,10 @@ int main(int argc, char *argv[]) toolbar_main_set_sensitive(mainwin); main_window_set_menu_sensitive(mainwin); - main_window_popup(mainwin); + /* if crashed, show window early so that the user + * sees what's happening */ + if (!cmd.crash && crash_file_present) + main_window_popup(mainwin); #ifdef HAVE_LIBETPAN imap_main_init(prefs_common.skip_ssl_cert_check); @@ -892,6 +901,13 @@ int main(int argc, char *argv[]) plugin_load_standard_plugins (); + /* if not crashed, show window now */ + if (!(!cmd.crash && crash_file_present)) { + /* apart if something told not to show */ + if (show_at_startup) + main_window_popup(mainwin); + } + if (!folder_have_mailbox()) { prefs_destroy_cache(); main_window_cursor_normal(mainwin); diff --git a/src/main.h b/src/main.h index 60805d271..4fa2a6d00 100644 --- a/src/main.h +++ b/src/main.h @@ -31,4 +31,6 @@ gboolean clean_quit (gpointer data); gboolean claws_is_exiting(void); gboolean claws_is_starting(void); gchar *claws_get_socket_name(void); +void main_set_show_at_startup(gboolean show); + #endif /* __MAIN_H__ */ diff --git a/src/plugins/trayicon/trayicon.c b/src/plugins/trayicon/trayicon.c index 4112717c2..b6b886e16 100644 --- a/src/plugins/trayicon/trayicon.c +++ b/src/plugins/trayicon/trayicon.c @@ -424,6 +424,7 @@ int plugin_init(gchar **error) if (GTK_WIDGET_VISIBLE(GTK_WIDGET(mainwin->window))) main_window_hide(mainwin); + main_set_show_at_startup(FALSE); } return 0; -- 2.11.4.GIT