aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-nautilus-view.c
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-06-16 07:47:33 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-06-16 07:47:33 +0800
commit3241ea896ff4f8939c038ab65f03948d026ed520 (patch)
tree4cf5adff6fe56404f7cbb49f0e86bf4b9720965a /src/ephy-nautilus-view.c
parentd5b5f70b1cca8ea489ca5be9900d0b47275b5a23 (diff)
downloadgsoc2013-epiphany-3241ea896ff4f8939c038ab65f03948d026ed520.tar.gz
gsoc2013-epiphany-3241ea896ff4f8939c038ab65f03948d026ed520.tar.zst
gsoc2013-epiphany-3241ea896ff4f8939c038ab65f03948d026ed520.zip
Remove some obsolete entries.
2003-06-16 Marco Pesenti Gritti <marco@it.gnome.org> * data/ui/nautilus-epiphany-view.xml.in: Remove some obsolete entries. * embed/Makefile.am: * embed/ephy-embed-event.c: (ephy_embed_event_init), (ephy_embed_event_get_event_type): * embed/ephy-embed-event.h: Make more generic and allow to make distinction between mouse and key events. * embed/ephy-embed-popup-bw.c: * embed/ephy-embed-popup-bw.h: Remove, unused. * embed/ephy-embed.c: (ephy_embed_base_init): * embed/ephy-embed.h: * embed/mozilla/mozilla-embed.cpp: Emit context signals only when necessary, get rid of unused mouse_down signal. * embed/ephy-embed-popup-control.c: (ephy_embed_popup_control_show_impl): * embed/mozilla/EventContext.cpp: * src/ephy-nautilus-view.c: (ephy_nautilus_view_instance_init), (gnv_embed_dom_mouse_click_cb), (gnv_embed_context_menu_cb): * src/ephy-tab.c: (ephy_tab_dom_mouse_click_cb), (ephy_tab_context_menu_cb): Use new event api.
Diffstat (limited to 'src/ephy-nautilus-view.c')
-rw-r--r--src/ephy-nautilus-view.c52
1 files changed, 31 insertions, 21 deletions
diff --git a/src/ephy-nautilus-view.c b/src/ephy-nautilus-view.c
index cec56630e..897d67af3 100644
--- a/src/ephy-nautilus-view.c
+++ b/src/ephy-nautilus-view.c
@@ -44,7 +44,10 @@ static void gnv_embed_new_window_cb (EphyEmbed *embed,
static void gnv_embed_link_message_cb (EphyEmbed *embed,
const char *message,
EphyNautilusView *view);
-static gint gnv_embed_dom_mouse_down_cb (EphyEmbed *embed,
+static gint gnv_embed_dom_mouse_click_cb (EphyEmbed *embed,
+ EphyEmbedEvent *event,
+ EphyNautilusView *view);
+static void gnv_embed_context_menu_cb (EphyEmbed *embed,
EphyEmbedEvent *event,
EphyNautilusView *view);
static void gnv_embed_zoom_change_cb (EphyNautilusView *embed,
@@ -195,9 +198,13 @@ ephy_nautilus_view_instance_init (EphyNautilusView *view)
GTK_SIGNAL_FUNC (gnv_embed_dom_mouse_click_cb),
view);
*/
- g_signal_connect (view->priv->embed, "ge_dom_mouse_down",
- GTK_SIGNAL_FUNC (gnv_embed_dom_mouse_down_cb),
+ g_signal_connect (view->priv->embed, "ge_dom_mouse_click",
+ GTK_SIGNAL_FUNC (gnv_embed_dom_mouse_click_cb),
view);
+ g_signal_connect (view->priv->embed, "ge_context_menu",
+ GTK_SIGNAL_FUNC (gnv_embed_context_menu_cb),
+ view);
+
/*
g_signal_connect (view->priv->embed, "ge_security_change",
GTK_SIGNAL_FUNC (gnv_embed_security_change_cb),
@@ -314,29 +321,19 @@ ephy_nautilus_view_class_init (EphyNautilusViewClass *class)
G_OBJECT_CLASS (class)->finalize = ephy_nautilus_view_finalize;
}
-
-
static gint
-gnv_embed_dom_mouse_down_cb (EphyEmbed *embed,
- EphyEmbedEvent *event,
- EphyNautilusView *view)
+gnv_embed_dom_mouse_click_cb (EphyEmbed *embed,
+ EphyEmbedEvent *event,
+ EphyNautilusView *view)
{
- EphyNautilusViewPrivate *p = view->priv;
- int button;
+ EphyEmbedEventType type;
EmbedEventContext context;
- ephy_embed_event_get_mouse_button (event, &button);
- ephy_embed_event_get_context (event, &context);
+ ephy_embed_event_get_event_type (event, &type);
+ ephy_embed_event_get_context (event, &context);
- if (button == 2)
- {
- ephy_embed_popup_set_event (EPHY_EMBED_POPUP (p->popup), event);
- ephy_embed_popup_show (EPHY_EMBED_POPUP (p->popup), embed);
- return TRUE;
-
- }
- else if (button == 1
- && (context & EMBED_CONTEXT_LINK))
+ if (type == EPHY_EMBED_EVENT_MOUSE_BUTTON2
+ && (context & EMBED_CONTEXT_LINK))
{
const GValue *value;
const gchar *url;
@@ -353,6 +350,19 @@ gnv_embed_dom_mouse_down_cb (EphyEmbed *embed,
}
static void
+gnv_embed_context_menu_cb (EphyEmbed *embed,
+ EphyEmbedEvent *event,
+ EphyNautilusView *view)
+{
+ EphyNautilusViewPrivate *p = view->priv;
+ EmbedEventContext context;
+
+ ephy_embed_event_get_context (event, &context);
+ ephy_embed_popup_set_event (EPHY_EMBED_POPUP (p->popup), event);
+ ephy_embed_popup_show (EPHY_EMBED_POPUP (p->popup), embed);
+}
+
+static void
gnv_embed_link_message_cb (EphyEmbed *embed, const char *message, EphyNautilusView *view)
{
g_return_if_fail (EPHY_IS_NAUTILUS_VIEW (view));