aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks/ephy-bookmarks-ui.c
diff options
context:
space:
mode:
authorPeter Harvey <peter.a.harvey@gmail.com>2006-02-21 21:44:16 +0800
committerPeter Anthony Harvey <paharvey@src.gnome.org>2006-02-21 21:44:16 +0800
commitc66ab87ed9b35bfafa1ad6aba79419d153e29de7 (patch)
treeb79583242bc9e7387724f658f061fb687c0bc8fb /src/bookmarks/ephy-bookmarks-ui.c
parent6dd4bf1e1ebfee184ebfa38781ab6418c42e652a (diff)
downloadgsoc2013-epiphany-c66ab87ed9b35bfafa1ad6aba79419d153e29de7.tar
gsoc2013-epiphany-c66ab87ed9b35bfafa1ad6aba79419d153e29de7.tar.gz
gsoc2013-epiphany-c66ab87ed9b35bfafa1ad6aba79419d153e29de7.tar.bz2
gsoc2013-epiphany-c66ab87ed9b35bfafa1ad6aba79419d153e29de7.tar.lz
gsoc2013-epiphany-c66ab87ed9b35bfafa1ad6aba79419d153e29de7.tar.xz
gsoc2013-epiphany-c66ab87ed9b35bfafa1ad6aba79419d153e29de7.tar.zst
gsoc2013-epiphany-c66ab87ed9b35bfafa1ad6aba79419d153e29de7.zip
data/ui/epiphany-fs-toolbar.xml lib/egg/egg-toolbars-model.c
2006-02-21 Peter Harvey <peter.a.harvey@gmail.com> * data/ui/epiphany-fs-toolbar.xml * lib/egg/egg-toolbars-model.c * lib/egg/egg-toolbars-model.h Added "editable" attribute for toolbars. * data/ui/epiphany-ui.xml * lib/egg/egg-editable-toolbar.c * lib/egg/egg-editable-toolbar.h * src/ephy-toolbar.c * src/ephy-window.c Many improvements to toolbar menus. Includes changes to show visibility toggles in multiple locations. * lib/ephy-stock-icons.c * lib/ephy-stock-icons.h Additional stock icon for drag and drop. * src/bookmarks/ephy-bookmarks-ui.c Make 'customize toolbar' invisible when editing. * src/ephy-shell.c Mark the full-screen toolbar as non-removable.
Diffstat (limited to 'src/bookmarks/ephy-bookmarks-ui.c')
-rw-r--r--src/bookmarks/ephy-bookmarks-ui.c29
1 files changed, 18 insertions, 11 deletions
diff --git a/src/bookmarks/ephy-bookmarks-ui.c b/src/bookmarks/ephy-bookmarks-ui.c
index 2baeb7167..93ff1425b 100644
--- a/src/bookmarks/ephy-bookmarks-ui.c
+++ b/src/bookmarks/ephy-bookmarks-ui.c
@@ -161,12 +161,19 @@ selected_bookmark_action (EggEditableToolbar *etoolbar,
{
GtkAction *baction;
GtkWidget *widget;
-
- widget = gtk_widget_get_ancestor (egg_editable_toolbar_get_selected (etoolbar),
- GTK_TYPE_TOOL_ITEM);
- baction = widget ? g_object_get_data (G_OBJECT (widget), "gtk-action") : NULL;
-
- gtk_action_set_visible (action, EPHY_IS_BOOKMARK_ACTION (baction));
+ gboolean visible;
+
+ visible = FALSE;
+
+ if (!egg_editable_toolbar_get_edit_mode (etoolbar))
+ {
+ widget = egg_editable_toolbar_get_selected (etoolbar);
+ widget = widget ? gtk_widget_get_ancestor (widget, GTK_TYPE_TOOL_ITEM) : NULL;
+ baction = widget ? g_object_get_data (G_OBJECT (widget), "gtk-action") : NULL;
+ visible = EPHY_IS_BOOKMARK_ACTION (baction);
+ }
+
+ gtk_action_set_visible (action, visible);
}
static void
@@ -287,7 +294,7 @@ ephy_bookmarks_ui_attach_window (EphyWindow *window)
g_object_unref (action);
/* Add popup menu actions that are specific to the bookmark widgets */
- action = gtk_action_new ("ToolbarBookmarkProperties", _("Properties"),
+ action = gtk_action_new ("ToolbarBookmarkProperties", _("_Properties"),
_("Show properties for this bookmark"), GTK_STOCK_PROPERTIES);
g_signal_connect_object (action, "activate",
G_CALLBACK (activate_bookmark_properties),
@@ -300,7 +307,7 @@ ephy_bookmarks_ui_attach_window (EphyWindow *window)
/* FIXME ngettext */
action = gtk_action_new ("ToolbarBookmarkOpenInTab", _("Open in New _Tab"),
- _("Open this bookmark in a new tab"), NULL);
+ _("Open this bookmark in a new tab"), STOCK_NEW_TAB);
g_signal_connect_object (action, "activate",
G_CALLBACK (activate_bookmark_open_tab),
G_OBJECT (etoolbar), 0);
@@ -312,7 +319,7 @@ ephy_bookmarks_ui_attach_window (EphyWindow *window)
/* FIXME ngettext */
action = gtk_action_new ("ToolbarBookmarkOpenInWindow", _("Open in New _Window"),
- _("Open this bookmark in a new window"), NULL);
+ _("Open this bookmark in a new window"), GTK_STOCK_NEW);
g_signal_connect_object (action, "activate",
G_CALLBACK (activate_bookmark_open_window),
G_OBJECT (etoolbar), 0);
@@ -324,11 +331,11 @@ ephy_bookmarks_ui_attach_window (EphyWindow *window)
data->toolbar_menu = gtk_ui_manager_add_ui_from_string (manager,
"<popup name=\"ToolbarPopup\">"
- "<separator/>"
+ "<placeholder name=\"SpecificItemsGroup\">"
"<menuitem action=\"ToolbarBookmarkOpenInTab\"/>"
"<menuitem action=\"ToolbarBookmarkOpenInWindow\"/>"
- "<separator/>"
"<menuitem action=\"ToolbarBookmarkProperties\"/>"
+ "</placeholder>"
"</popup>", -1, NULL);
/* Add signal handlers for the bookmark database */