diff options
Diffstat (limited to 'src/ephy-tab.c')
-rw-r--r-- | src/ephy-tab.c | 100 |
1 files changed, 1 insertions, 99 deletions
diff --git a/src/ephy-tab.c b/src/ephy-tab.c index 35a50e712..5aab758b2 100644 --- a/src/ephy-tab.c +++ b/src/ephy-tab.c @@ -876,7 +876,7 @@ ephy_tab_size_to_cb (EphyEmbed *embed, gint width, gint height, g_list_free (tabs); } -static void +void ephy_tab_set_event (EphyTab *tab, EphyEmbedEvent *event) { @@ -885,71 +885,6 @@ ephy_tab_set_event (EphyTab *tab, tab->priv->event = event; } -static void -popup_menu_at_coords (GtkMenu *menu, gint *x, gint *y, gboolean *push_in, - gpointer user_data) -{ - EphyEmbedEvent *event = user_data; - - *x = event->x; - *y = event->y; - *push_in = FALSE; -} - -static void -ephy_tab_show_embed_popup (EphyTab *tab, EphyEmbedEvent *event) -{ - EmbedEventContext context; - const char *popup; - const GValue *value; - gboolean framed; - EphyWindow *window; - char *path; - GtkWidget *widget; - - g_return_if_fail (IS_EPHY_TAB (tab)); - window = tab->priv->window; - - ephy_embed_event_get_property (event, "framed_page", &value); - framed = g_value_get_int (value); - - ephy_embed_event_get_context (event, &context); - - if ((context & EMBED_CONTEXT_LINK) && - (context & EMBED_CONTEXT_IMAGE)) - { - popup = "EphyImageLinkPopup"; - } - else if (context & EMBED_CONTEXT_LINK) - { - popup = "EphyLinkPopup"; - } - else if (context & EMBED_CONTEXT_IMAGE) - { - popup = "EphyImagePopup"; - } - else if (context & EMBED_CONTEXT_INPUT) - { - popup = "EphyInputPopup"; - } - else - { - popup = framed ? "EphyFramedDocumentPopup" : - "EphyDocumentPopup"; - } - - path = g_strconcat ("/popups/", popup, NULL); - widget = egg_menu_merge_get_widget (EGG_MENU_MERGE (window->ui_merge), - path); - g_free (path); - - g_return_if_fail (widget != NULL); - - ephy_tab_set_event (tab, event); - gtk_menu_popup (GTK_MENU (widget), NULL, NULL, popup_menu_at_coords, event, 2, - gtk_get_current_event_time ()); -} - static gint ephy_tab_dom_mouse_click_cb (EphyEmbed *embed, EphyEmbedEvent *event, @@ -993,36 +928,6 @@ ephy_tab_dom_mouse_click_cb (EphyEmbed *embed, return FALSE; } -static gint -ephy_tab_context_menu_cb (EphyEmbed *embed, - EphyEmbedEvent *event, - EphyTab *tab) -{ - EphyWindow *window; - EphyEmbedEventType type; - - g_assert (IS_EPHY_EMBED_EVENT(event)); - - window = ephy_tab_get_window (tab); - g_return_val_if_fail (window != NULL, FALSE); - - ephy_embed_event_get_event_type (event, &type); - - if (type == EPHY_EMBED_EVENT_MOUSE_BUTTON3) - { - ephy_tab_show_embed_popup (tab, event); - } - else - { - int x, y; - - ephy_embed_event_get_coords (event, &x, &y); - ephy_tab_show_embed_popup (tab, event); - } - - return FALSE; -} - static void ephy_tab_security_change_cb (EphyEmbed *embed, EmbedSecurityLevel level, EphyTab *tab) @@ -1119,9 +1024,6 @@ ephy_tab_init (EphyTab *tab) g_signal_connect (embed, "ge_size_to", G_CALLBACK (ephy_tab_size_to_cb), tab); - g_signal_connect (embed, "ge_context_menu", - G_CALLBACK (ephy_tab_context_menu_cb), - tab); g_signal_connect (embed, "ge_dom_mouse_click", G_CALLBACK (ephy_tab_dom_mouse_click_cb), tab); |