This commit is contained in:
TingPing 2013-01-03 18:18:04 -05:00
parent 9aa33ad1d3
commit 00bd8d42c3
1 changed files with 19 additions and 19 deletions

View File

@ -427,29 +427,29 @@ tray_menu_restore_cb (GtkWidget *item, gpointer userdata)
static void static void
tray_menu_notify_cb (GObject *tray, GParamSpec *pspec, gpointer user_data) tray_menu_notify_cb (GObject *tray, GParamSpec *pspec, gpointer user_data)
{ {
if (sticon && strcmp (pspec->name, "embedded") == 0) if (sticon && strcmp (pspec->name, "embedded") == 0)
{ {
if (!gtk_status_icon_is_embedded (sticon)) if (!gtk_status_icon_is_embedded (sticon))
{ {
tray_restore_timer = g_timeout_add(500, (GSourceFunc)tray_menu_try_restore, NULL); tray_restore_timer = g_timeout_add(500, (GSourceFunc)tray_menu_try_restore, NULL);
} }
else else
{ {
if (tray_restore_timer) if (tray_restore_timer)
{ {
g_source_remove (tray_restore_timer); g_source_remove (tray_restore_timer);
tray_restore_timer = 0; tray_restore_timer = 0;
} }
} }
} }
} }
static gboolean static gboolean
tray_menu_try_restore () tray_menu_try_restore ()
{ {
tray_cleanup(); tray_cleanup();
tray_init(); tray_init();
return TRUE; return TRUE;
} }
@ -661,7 +661,7 @@ tray_init (void)
g_signal_connect (G_OBJECT (sticon), "activate", g_signal_connect (G_OBJECT (sticon), "activate",
G_CALLBACK (tray_menu_restore_cb), NULL); G_CALLBACK (tray_menu_restore_cb), NULL);
g_signal_connect (G_OBJECT (sticon), "notify", g_signal_connect (G_OBJECT (sticon), "notify",
G_CALLBACK (tray_menu_notify_cb), NULL); G_CALLBACK (tray_menu_notify_cb), NULL);
} }