diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | data/ui/epiphany-ui.xml.in | 8 | ||||
-rw-r--r-- | src/ephy-tab.c | 12 |
3 files changed, 24 insertions, 3 deletions
@@ -1,5 +1,12 @@ 2003-02-15 Marco Pesenti Gritti <marco@it.gnome.org> + * data/ui/epiphany-ui.xml.in: + * src/ephy-tab.c: (ephy_tab_show_embed_popup): + + Implement a selected text context menu. + +2003-02-15 Marco Pesenti Gritti <marco@it.gnome.org> + * embed/find-dialog.c: (find_get_info), (impl_show), (find_dialog_go_prev): diff --git a/data/ui/epiphany-ui.xml.in b/data/ui/epiphany-ui.xml.in index e9b411aba..761ecd8b5 100644 --- a/data/ui/epiphany-ui.xml.in +++ b/data/ui/epiphany-ui.xml.in @@ -78,17 +78,21 @@ </menu> <popups> -<popup name="EphyEmbedInputPopup" verb="FakeToplevel"> +<popup name="EphyInputPopup" verb="FakeToplevel"> <menuitem name="EditCutIP" verb="EditCut"/> <menuitem name="EditCopyIP" verb="EditCopy"/> <menuitem name="EditPasteIP" verb="EditPaste"/> </popup> - +<popup name="EphyTextPopup" verb="FakeToplevel"> + <menuitem name="EditCopyTP" verb="EditCopy"/> +</popup> <popup name="EphyDocumentPopup" verb="FakeToplevel"> <menuitem name="GoBackDP" verb="GoBack"/> <menuitem name="GoForwardDP" verb="GoForward"/> <menuitem name="GoReloadDP" verb="ViewReload"/> <separator name="DPSep1"/> + <menuitem name="EditCutIP" verb="EditCut"/> + <menuitem name="SavePageAsDP" verb="FileSaveAs"/> <menuitem name="SaveBackgroundAsDP" verb="SaveBackgroundAs"/> <menuitem name="BookmarkPageDP" verb="FileBookmarkPage"/> diff --git a/src/ephy-tab.c b/src/ephy-tab.c index e660b6bba..be1942629 100644 --- a/src/ephy-tab.c +++ b/src/ephy-tab.c @@ -849,12 +849,15 @@ ephy_tab_show_embed_popup (EphyTab *tab, EphyEmbedEvent *event) EphyWindow *window; char *path; GtkWidget *widget; + gresult can_copy; window = ephy_tab_get_window (tab); ephy_embed_event_get_property (event, "framed_page", &value); framed = g_value_get_int (value); + can_copy = ephy_embed_selection_can_copy (tab->priv->embed); + ephy_embed_event_get_context (event, &context); if ((context & EMBED_CONTEXT_LINK) && @@ -870,6 +873,14 @@ ephy_tab_show_embed_popup (EphyTab *tab, EphyEmbedEvent *event) { popup = "EphyImagePopup"; } + else if (context & EMBED_CONTEXT_INPUT) + { + popup = "EphyInputPopup"; + } + else if (can_copy == G_OK) + { + popup = "EphyTextPopup"; + } else { popup = framed ? "EphyFramedDocumentPopup" : @@ -877,7 +888,6 @@ ephy_tab_show_embed_popup (EphyTab *tab, EphyEmbedEvent *event) } path = g_strconcat ("/popups/", popup, NULL); - g_print (path); widget = egg_menu_merge_get_widget (EGG_MENU_MERGE (window->ui_merge), path); g_free (path); |