summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mate-panel/applet.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/mate-panel/applet.c b/mate-panel/applet.c
index fa668e89..201459e7 100644
--- a/mate-panel/applet.c
+++ b/mate-panel/applet.c
@@ -41,6 +41,8 @@ static GSList *registered_applets = NULL;
static GSList *queued_position_saves = NULL;
static guint queued_position_source = 0;
+static void applet_menu_show (GtkWidget *w, AppletInfo *info);
+static void applet_menu_deactivate (GtkWidget *w, AppletInfo *info);
static inline PanelWidget *
mate_panel_applet_get_panel_widget (AppletInfo *info)
@@ -166,6 +168,9 @@ mate_panel_applet_recreate_menu (AppletInfo *info)
menu->submenu =NULL;
}
+ g_signal_handlers_disconnect_by_func (info->menu, G_CALLBACK (applet_menu_show), info);
+ g_signal_handlers_disconnect_by_func (info->menu, G_CALLBACK (applet_menu_deactivate), info);
+
g_object_unref (info->menu);
info->menu = mate_panel_applet_create_menu (info);
}
@@ -784,8 +789,11 @@ mate_panel_applet_destroy (GtkWidget *widget,
panel_lockdown_notify_remove (G_CALLBACK (mate_panel_applet_recreate_menu),
info);
- if (info->menu)
+ if (info->menu) {
+ g_signal_handlers_disconnect_by_func (info->menu, G_CALLBACK (applet_menu_show), info);
+ g_signal_handlers_disconnect_by_func (info->menu, G_CALLBACK (applet_menu_deactivate), info);
g_object_unref (info->menu);
+ }
info->menu = NULL;
if (info->data_destroy)