GNOME Bugzilla – Bug 375377
gnome-power-manager does not reattach to the notification area after gnome-panel has crashed or has been killed
Last modified: 2007-06-17 23:21:05 UTC
Please describe the problem: This has happened to me twice. I'll either kill gnome-panel, or it crashes on me, and the notification area icon for gnome-power-manager does not reattach to the notification area when gnome-panel restarts. Steps to reproduce: 0. Make sure gnome-power-manager is displaying a notification icon 1. $killall gnome-panel 2. observe as the notification icon stays in its own window Actual results: gnome-panel is killed, the notification icon for g-p-m pops out into its own window (good), gnome-panel restarts, notification icon for g-p-m stays in its own window. Expected results: the icon should go back where it was in the notification area. Does this happen every time? Yes Other information:
Any idea how to fix this? Thanks.
I wouldn't have any idea (not a developer in any way) but I know that gaim and skype at the least are capable of this. You probably can't ask skype how they do it, but gaim should be accessible.
I can't reproduce - what disto and versions are you running?
Created attachment 76822 [details] Screenshot Here's a screenshot. I'm running Ubuntu 6.10 Edgy Eft, Gnome 2.16.1.
Incidentally, Gaim and Skype re-attach, but nm-applet and the OpenOffice quickstarter both disappear.
*** Bug 380872 has been marked as a duplicate of this bug. ***
gaim, lifera and rhythmbox come back fine so their code could help :)
In liferea, they destroy it and use g_idle_add to recreate it : static void ui_tray_destroyed_cb(GtkWidget *widget, void *data) { g_object_unref(G_OBJECT(tray_icon)); image = NULL; tray_icon = NULL; trayCount--; ui_mainwindow_tray_remove(); /* And make it re-appear when the notification area reappears */ g_idle_add(ui_tray_create_cb, NULL); } In rhythmbox they also re-create it : static gboolean tray_destroy_cb (GtkObject *object, RBShell *shell) { if (shell->priv->tray_icon) { rb_debug ("caught destroy event for tray icon %p", object); gtk_object_sink (object); shell->priv->tray_icon = NULL; rb_debug ("finished sinking tray"); } rb_debug ("creating new tray icon"); shell->priv->tray_icon = rb_tray_icon_new (shell->priv->ui_manager, shell); g_signal_connect_object (G_OBJECT (shell->priv->tray_icon), "destroy", G_CALLBACK (tray_destroy_cb), shell, 0); g_signal_connect_object (G_OBJECT (shell->priv->tray_icon), "embedded", G_CALLBACK (tray_embedded_cb), shell, 0); gtk_widget_show_all (GTK_WIDGET (shell->priv->tray_icon)); rb_debug ("done creating new tray icon %p", shell->priv->tray_icon); return TRUE; }
The issue is that both use egg. With GtkStatusIcon, we can't use the destroy signal.
gnomeicu uses GtkStatusIcon and works fine regarding this issue, but I can't find anything helpful in their tray.c
OK I was using an old version of gnomeicu which was using egg. With CVS version they have the same issue... I think a bug against GtkStatusIcon should be opened
Yes, agree. I think the bug is with GtkStatusIcon.
I have been using Gimmie lately, and every other time or so after Gimmie crashes (frequently, I might add, but that is neither here nor there) the status icon reattaches. This is with 2.16.1
Pascal, cheers for working on this.
*** Bug 448061 has been marked as a duplicate of this bug. ***
This now works fine with latest Gtk.