[Commits] [SCM] claws branch, master, updated. 3.17.5-25-gfaeb0ebdb

holger at claws-mail.org holger at claws-mail.org
Wed Jun 24 18:37:08 CEST 2020


The branch, master has been updated
       via  faeb0ebdbf220a4760c1fdab05ef86fb845665d7 (commit)
      from  4ed9411f4dc2801d7f983734ae4003102b8f361d (commit)

Summary of changes:
 src/plugins/notification/notification_plugin.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)


- Log -----------------------------------------------------------------
commit faeb0ebdbf220a4760c1fdab05ef86fb845665d7
Author: Holger Berndt <hb at claws-mail.org>
Date:   Wed Jun 24 18:30:27 2020 +0200

    Notification plugin: Add timeout to hide-on-startup until main win is shown again
    
    Workaround for bug 3922

diff --git a/src/plugins/notification/notification_plugin.c b/src/plugins/notification/notification_plugin.c
index 18671d6e4..90b83a172 100644
--- a/src/plugins/notification/notification_plugin.c
+++ b/src/plugins/notification/notification_plugin.c
@@ -50,6 +50,10 @@
 #  include <libnotify/notify.h>
 #endif
 
+/* delay in ms until the tray icon shall be embedded in the
+   system tray before it is assumed that the tray doesn't
+   work and the main window is shown again */
+#define CM_NOTIFICATION_TRAYICON_SAFETY_NET_DELAY_MS 5000
 
 static gboolean my_folder_item_update_hook(gpointer, gpointer);
 static gboolean my_folder_update_hook(gpointer, gpointer);
@@ -342,7 +346,7 @@ gint plugin_init(gchar **error)
 		 notify_config.trayicon_hide_at_startup && claws_is_starting()) {
     MainWindow *mainwin = mainwindow_get_mainwindow();
 
-		g_idle_add(trayicon_startup_idle,NULL);
+		g_timeout_add(CM_NOTIFICATION_TRAYICON_SAFETY_NET_DELAY_MS, trayicon_startup_idle,NULL);
     if(mainwin && gtk_widget_get_visible(GTK_WIDGET(mainwin->window)))
       main_window_hide(mainwin);
     main_set_show_at_startup(FALSE);

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list