aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-window.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-06-20 07:58:02 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-06-20 07:58:02 +0800
commit38f4f77d16ff6ee02751eb91b9870108f639e21a (patch)
treea6558eafb1dd620719757c255f520d181440b4a9 /src/ephy-window.c
parent37a1f2f5e2544db814a79631d4f4b958f6dba9a8 (diff)
downloadgsoc2013-epiphany-38f4f77d16ff6ee02751eb91b9870108f639e21a.tar
gsoc2013-epiphany-38f4f77d16ff6ee02751eb91b9870108f639e21a.tar.gz
gsoc2013-epiphany-38f4f77d16ff6ee02751eb91b9870108f639e21a.tar.bz2
gsoc2013-epiphany-38f4f77d16ff6ee02751eb91b9870108f639e21a.tar.lz
gsoc2013-epiphany-38f4f77d16ff6ee02751eb91b9870108f639e21a.tar.xz
gsoc2013-epiphany-38f4f77d16ff6ee02751eb91b9870108f639e21a.tar.zst
gsoc2013-epiphany-38f4f77d16ff6ee02751eb91b9870108f639e21a.zip
Get rid of get/set _event, reformat the header.
2003-06-20 Marco Pesenti Gritti <marco@it.gnome.org> * src/ephy-tab.c: (ephy_tab_finalize), (ephy_tab_init): * src/ephy-tab.h: Get rid of get/set _event, reformat the header. * src/pdm-dialog.c: Fix compilation warning. * src/ephy-window.c: (popup_destroy_cb), (show_embed_popup): * src/popup-commands.c: (get_event_info): Less invasive way to access the event info from the callbacks.
Diffstat (limited to 'src/ephy-window.c')
-rw-r--r--src/ephy-window.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/ephy-window.c b/src/ephy-window.c
index a4ff3bada..dc2b39983 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -1035,6 +1035,17 @@ 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)
{
EggActionGroup *action_group;
@@ -1088,7 +1099,10 @@ show_embed_popup (EphyWindow *window, EphyTab *tab, EphyEmbedEvent *event)
g_return_if_fail (widget != NULL);
- ephy_tab_set_event (tab, event);
+ 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);
gtk_menu_popup (GTK_MENU (widget), NULL, NULL, popup_menu_at_coords, event, 2,
gtk_get_current_event_time ());
}