diff options
author | Ted Gould <ted@gould.cx> | 2012-03-02 14:01:34 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2012-03-02 14:01:34 -0600 |
commit | fd68aaf57b7b616434d6593f4b0627ec00fb7d97 (patch) | |
tree | 9e12c3fad3fe5a2daf67fdd2427b284afc04813c /libdbusmenu-gtk | |
parent | 3a9221c21feb1701119db5079bf3e350c0cb0aac (diff) | |
download | libdbusmenu-fd68aaf57b7b616434d6593f4b0627ec00fb7d97.tar.gz libdbusmenu-fd68aaf57b7b616434d6593f4b0627ec00fb7d97.tar.bz2 libdbusmenu-fd68aaf57b7b616434d6593f4b0627ec00fb7d97.zip |
Track the theme changed signal so we ensure that we can drop it eventually
Diffstat (limited to 'libdbusmenu-gtk')
-rw-r--r-- | libdbusmenu-gtk/parser.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libdbusmenu-gtk/parser.c b/libdbusmenu-gtk/parser.c index 019a304..bdfc3e2 100644 --- a/libdbusmenu-gtk/parser.c +++ b/libdbusmenu-gtk/parser.c @@ -44,6 +44,8 @@ typedef struct _ParserData GtkWidget *shell; GtkWidget *image; AtkObject *accessible; + + guint theme_changed_sig; } ParserData; typedef struct _RecurseContext @@ -212,6 +214,11 @@ parse_data_free (gpointer data) g_object_remove_weak_pointer(G_OBJECT(pdata->accessible), (gpointer*)&pdata->accessible); } + if (pdata != NULL && pdata->theme_changed_sig != 0) { + g_signal_handler_disconnect(gtk_icon_theme_get_default(), pdata->theme_changed_sig); + pdata->theme_changed_sig = 0; + } + g_free(pdata); return; @@ -572,7 +579,7 @@ construct_dbusmenu_for_widget (GtkWidget * widget) /* Watch for theme changes because if gicon changes, we want to send a different pixbuf. */ - g_signal_connect(G_OBJECT(gtk_icon_theme_get_default()), + pdata->theme_changed_sig = g_signal_connect(G_OBJECT(gtk_icon_theme_get_default()), "changed", G_CALLBACK(theme_changed_cb), widget); pdata->image = image; |