aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-09-19 22:02:30 +0800
committerChristian Persch <chpe@src.gnome.org>2005-09-19 22:02:30 +0800
commitb80a930d392d2719f916f6fcc975b60d1cfb2169 (patch)
tree26537281da4a20001cba1ba4124a0a27dab94f7a
parent4a2a46a2431642dc032550ee2173db3059dacb37 (diff)
downloadgsoc2013-epiphany-b80a930d392d2719f916f6fcc975b60d1cfb2169.tar
gsoc2013-epiphany-b80a930d392d2719f916f6fcc975b60d1cfb2169.tar.gz
gsoc2013-epiphany-b80a930d392d2719f916f6fcc975b60d1cfb2169.tar.bz2
gsoc2013-epiphany-b80a930d392d2719f916f6fcc975b60d1cfb2169.tar.lz
gsoc2013-epiphany-b80a930d392d2719f916f6fcc975b60d1cfb2169.tar.xz
gsoc2013-epiphany-b80a930d392d2719f916f6fcc975b60d1cfb2169.tar.zst
gsoc2013-epiphany-b80a930d392d2719f916f6fcc975b60d1cfb2169.zip
Make the methods to unset/release the context event semi-public.
2005-09-19 Christian Persch <chpe@cvs.gnome.org> * src/ephy-window.c: (_ephy_window_set_context_event), (_ephy_window_unset_context_event), (embed_popup_deactivate_cb), (show_embed_popup), (ephy_window_dispose): * src/ephy-window.h: Make the methods to unset/release the context event semi-public.
-rw-r--r--ChangeLog9
-rw-r--r--src/ephy-window.c38
-rw-r--r--src/ephy-window.h5
3 files changed, 37 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 8c1ae1964..8d3701b6d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2005-09-19 Christian Persch <chpe@cvs.gnome.org>
+
+ * src/ephy-window.c: (_ephy_window_set_context_event),
+ (_ephy_window_unset_context_event), (embed_popup_deactivate_cb),
+ (show_embed_popup), (ephy_window_dispose):
+ * src/ephy-window.h:
+
+ Make the methods to unset/release the context event semi-public.
+
2005-09-16 Raphael Slinckx <rslinckx@cvs.gnome.org>
* src/bookmarks/ephy-bookmark-action.c:
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 0a1581aae..5283818fa 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -1583,9 +1583,9 @@ idle_unref_context_event (EphyWindow *window)
return FALSE;
}
-static void
-set_context_event (EphyWindow *window,
- EphyEmbedEvent *event)
+void
+_ephy_window_set_context_event (EphyWindow *window,
+ EphyEmbedEvent *event)
{
EphyWindowPrivate *priv = window->priv;
@@ -1603,19 +1603,11 @@ set_context_event (EphyWindow *window,
priv->context_event = event != NULL ? g_object_ref (event) : NULL;
}
-static void
-embed_popup_deactivate_cb (GtkWidget *popup,
- EphyWindow *window)
+void
+_ephy_window_unset_context_event (EphyWindow *window)
{
EphyWindowPrivate *priv = window->priv;
- LOG ("Deactivating popup menu");
-
- enable_edit_actions_sensitivity (window);
-
- g_signal_handlers_disconnect_by_func
- (popup, G_CALLBACK (embed_popup_deactivate_cb), window);
-
/* Unref the event from idle since we still need it
* from the action callbacks which will run before idle.
*/
@@ -1626,6 +1618,22 @@ embed_popup_deactivate_cb (GtkWidget *popup,
}
}
+static void
+embed_popup_deactivate_cb (GtkWidget *popup,
+ EphyWindow *window)
+{
+ EphyWindowPrivate *priv = window->priv;
+
+ LOG ("Deactivating popup menu");
+
+ enable_edit_actions_sensitivity (window);
+
+ g_signal_handlers_disconnect_by_func
+ (popup, G_CALLBACK (embed_popup_deactivate_cb), window);
+
+ _ephy_window_unset_context_event (window);
+}
+
static char *
get_name_from_address_value (const GValue *value)
{
@@ -1825,7 +1833,7 @@ show_embed_popup (EphyWindow *window,
action = gtk_action_group_get_action (action_group, "OpenLinkInNewTab");
ephy_action_change_sensitivity_flags (action, SENS_FLAG_CONTEXT, !can_open_in_new);
- set_context_event (window, event);
+ _ephy_window_set_context_event (window, event);
g_signal_connect (widget, "deactivate",
G_CALLBACK (embed_popup_deactivate_cb), window);
@@ -2439,7 +2447,7 @@ ephy_window_dispose (GObject *object)
g_object_unref (priv->manager);
priv->manager = NULL;
- set_context_event (window, NULL);
+ _ephy_window_set_context_event (window, NULL);
}
destroy_fullscreen_popup (window);
diff --git a/src/ephy-window.h b/src/ephy-window.h
index 48253bb75..a3c31f994 100644
--- a/src/ephy-window.h
+++ b/src/ephy-window.h
@@ -107,6 +107,11 @@ gboolean ephy_window_get_is_print_preview(EphyWindow *window);
EphyEmbedEvent *ephy_window_get_context_event (EphyWindow *window);
+void _ephy_window_set_context_event (EphyWindow *window,
+ EphyEmbedEvent *event);
+
+void _ephy_window_unset_context_event (EphyWindow *window);
+
G_END_DECLS
#endif