aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-02-15 18:02:34 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-02-15 18:02:34 +0800
commitc6797825d807211a8d0c187bf2c299aabb1becef (patch)
tree336ae4b4c100d802e404548007697589c895a3f2
parent77f221609143e50d1fb260b892aba1ebaedb74d3 (diff)
downloadgsoc2013-epiphany-c6797825d807211a8d0c187bf2c299aabb1becef.tar.gz
gsoc2013-epiphany-c6797825d807211a8d0c187bf2c299aabb1becef.tar.zst
gsoc2013-epiphany-c6797825d807211a8d0c187bf2c299aabb1becef.zip
Implement a selected text context menu.
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.
-rw-r--r--ChangeLog7
-rw-r--r--data/ui/epiphany-ui.xml.in8
-rw-r--r--src/ephy-tab.c12
3 files changed, 24 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index bba5bcc4c..9119cbef4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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);