diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/ephy-window.c | 19 |
2 files changed, 9 insertions, 16 deletions
@@ -1,5 +1,11 @@ 2003-11-20 Marco Pesenti Gritti <marco@gnome.org> + * src/ephy-window.c: (show_embed_popup): + + Fix unrefing of context menu event + +2003-11-20 Marco Pesenti Gritti <marco@gnome.org> + * embed/mozilla/mozilla-embed.cpp: If it's not possible to go up fails do not assert, just fail 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) |