aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXan Lopez <xan@igalia.com>2012-01-18 02:57:50 +0800
committerXan Lopez <xan@igalia.com>2012-01-18 02:58:46 +0800
commit49580a45a618c6992b19988714d80f6f909095be (patch)
treed61a00b2c357a7f21e02eeec982733daa4ab97fa /src
parent2b7dcd1c4f16640b0af0105b412cc8e937f0218b (diff)
downloadgsoc2013-epiphany-49580a45a618c6992b19988714d80f6f909095be.tar
gsoc2013-epiphany-49580a45a618c6992b19988714d80f6f909095be.tar.gz
gsoc2013-epiphany-49580a45a618c6992b19988714d80f6f909095be.tar.bz2
gsoc2013-epiphany-49580a45a618c6992b19988714d80f6f909095be.tar.lz
gsoc2013-epiphany-49580a45a618c6992b19988714d80f6f909095be.tar.xz
gsoc2013-epiphany-49580a45a618c6992b19988714d80f6f909095be.tar.zst
gsoc2013-epiphany-49580a45a618c6992b19988714d80f6f909095be.zip
ephy-page-menu-action: do not query the action proxies during dispose
That was a bad idea. Just store the proxy used for the visibility hack in the private data too.
Diffstat (limited to 'src')
-rw-r--r--src/ephy-page-menu-action.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/src/ephy-page-menu-action.c b/src/ephy-page-menu-action.c
index b42d13c21..3faddd215 100644
--- a/src/ephy-page-menu-action.c
+++ b/src/ephy-page-menu-action.c
@@ -27,6 +27,7 @@ G_DEFINE_TYPE (EphyPageMenuAction, ephy_page_menu_action, EPHY_TYPE_WINDOW_ACTIO
struct _EphyPageMenuActionPrivate {
GtkWidget *menu;
+ GtkWidget *button;
};
static void
@@ -101,6 +102,7 @@ button_press_cb (GtkWidget *button, GdkEventButton *event, EphyPageMenuAction *a
G_CALLBACK (visible_cb), button);
action->priv->menu = g_object_ref (menu);
+ action->priv->button = g_object_ref (button);
}
if (event) {
@@ -146,17 +148,11 @@ ephy_page_menu_action_dispose (GObject *object)
{
EphyPageMenuActionPrivate *priv = EPHY_PAGE_MENU_ACTION (object)->priv;
- if (priv->menu) {
- GtkWidget *button = NULL;
- GSList *l = gtk_action_get_proxies (GTK_ACTION (object));
-
- if (GTK_IS_BUTTON (l->data))
- button = GTK_WIDGET (l->data);
-
- g_signal_handlers_disconnect_by_func (priv->menu, G_CALLBACK (visible_cb), button);
- }
+ if (priv->menu)
+ g_signal_handlers_disconnect_by_func (priv->menu, G_CALLBACK (visible_cb), priv->button);
g_clear_object (&priv->menu);
+ g_clear_object (&priv->button);
G_OBJECT_CLASS (ephy_page_menu_action_parent_class)->dispose (object);
}