diff options
author | Marco Pesenti Gritti <marco@gnome.org> | 2003-11-21 01:07:48 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2003-11-21 01:07:48 +0800 |
commit | a9520520d997a08879efbf1f7169298c30b53c49 (patch) | |
tree | e31f2eca80158f0bfc70f283e5fbabc48f5e6cca /src/ephy-window.c | |
parent | 227f730bc5b2376c885da7c5bdd4698adc5228d2 (diff) | |
download | gsoc2013-epiphany-a9520520d997a08879efbf1f7169298c30b53c49.tar gsoc2013-epiphany-a9520520d997a08879efbf1f7169298c30b53c49.tar.gz gsoc2013-epiphany-a9520520d997a08879efbf1f7169298c30b53c49.tar.bz2 gsoc2013-epiphany-a9520520d997a08879efbf1f7169298c30b53c49.tar.lz gsoc2013-epiphany-a9520520d997a08879efbf1f7169298c30b53c49.tar.xz gsoc2013-epiphany-a9520520d997a08879efbf1f7169298c30b53c49.tar.zst gsoc2013-epiphany-a9520520d997a08879efbf1f7169298c30b53c49.zip |
Fix unrefing of context menu event
2003-11-20 Marco Pesenti Gritti <marco@gnome.org>
* src/ephy-window.c: (show_embed_popup):
Fix unrefing of context menu event
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r-- | src/ephy-window.c | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c index 854b2d9c8..cb45fcaaf 100644 --- a/src/ephy-window.c +++ b/src/ephy-window.c @@ -1039,17 +1039,6 @@ popup_menu_at_coords (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, } static void -popup_destroy_cb (GtkWidget *widget, EphyWindow *window) -{ - EphyEmbedEvent *event; - - event = EPHY_EMBED_EVENT (g_object_get_data (G_OBJECT (window), "context_event")); - g_object_set_data (G_OBJECT (window), "context_event", NULL); - - g_object_unref (event); -} - -static void show_embed_popup (EphyWindow *window, EphyTab *tab, EphyEmbedEvent *event) { GtkActionGroup *action_group; @@ -1104,13 +1093,11 @@ show_embed_popup (EphyWindow *window, EphyTab *tab, EphyEmbedEvent *event) widget = gtk_ui_manager_get_widget (GTK_UI_MANAGER (window->ui_merge), popup); - g_return_if_fail (widget != NULL); - g_object_ref (event); - g_object_set_data (G_OBJECT (window), "context_event", event); - g_signal_connect (widget, "destroy", - G_CALLBACK (popup_destroy_cb), window); + g_object_set_data_full (G_OBJECT (window), "context_event", + g_object_ref (event), + (GDestroyNotify)g_object_unref); type = ephy_embed_event_get_event_type (event); if (type == EPHY_EMBED_EVENT_KEY) |