aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/bookmarks/ephy-bookmarks-ui.c29
-rw-r--r--src/ephy-shell.c7
-rwxr-xr-xsrc/ephy-toolbar.c20
-rw-r--r--src/ephy-window.c12
4 files changed, 46 insertions, 22 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 */
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 5af43c5a0..3938d5eb2 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -668,6 +668,7 @@ ephy_shell_get_toolbars_model (EphyShell *shell, gboolean fullscreen)
{
if (shell->priv->fs_toolbars_model == NULL)
{
+ EggTbModelFlags flags;
gboolean success;
const char *xml;
@@ -678,6 +679,12 @@ ephy_shell_get_toolbars_model (EphyShell *shell, gboolean fullscreen)
success = egg_toolbars_model_load_toolbars
(shell->priv->fs_toolbars_model, xml);
g_return_val_if_fail (success, NULL);
+
+ flags = egg_toolbars_model_get_flags
+ (shell->priv->fs_toolbars_model, 0);
+ egg_toolbars_model_set_flags
+ (shell->priv->fs_toolbars_model, 0,
+ flags | EGG_TB_MODEL_NOT_REMOVABLE);
}
return G_OBJECT (shell->priv->fs_toolbars_model);
diff --git a/src/ephy-toolbar.c b/src/ephy-toolbar.c
index f69d25a3c..2524764bd 100755
--- a/src/ephy-toolbar.c
+++ b/src/ephy-toolbar.c
@@ -736,9 +736,19 @@ ephy_toolbar_get_type (void)
EphyToolbar *
ephy_toolbar_new (EphyWindow *window)
{
- return EPHY_TOOLBAR (g_object_new (EPHY_TYPE_TOOLBAR,
- "window", window,
- "ui-manager", ephy_window_get_ui_manager (window),
- "visibility-path", "/menubar/ViewMenu/ViewTogglesGroup/ToolbarMenu",
- NULL));
+ EggEditableToolbar *etoolbar;
+
+ etoolbar = EGG_EDITABLE_TOOLBAR
+ (g_object_new (EPHY_TYPE_TOOLBAR,
+ "window", window,
+ "ui-manager", ephy_window_get_ui_manager (window),
+ "popup-path", "/ToolbarPopup",
+ NULL));
+
+ egg_editable_toolbar_add_visibility
+ (etoolbar, "/menubar/ViewMenu/ViewTogglesGroup/ToolbarMenu/ViewToolbarsGroup");
+ egg_editable_toolbar_add_visibility
+ (etoolbar, "/ToolbarPopup/ViewToolbarsGroup");
+
+ return EPHY_TOOLBAR (etoolbar);
}
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 06e0767c3..0bddd0f2c 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -280,9 +280,9 @@ static const GtkToggleActionEntry ephy_menu_toggle_entries [] =
/* View Menu */
- { "ViewToolbar", NULL, N_("_Show Toolbars"), "<shift><control>T",
+ { "ViewToolbar", NULL, N_("_Hide Toolbars"), "<shift><control>T",
N_("Show or hide toolbar"),
- G_CALLBACK (ephy_window_view_toolbar_cb), TRUE },
+ G_CALLBACK (ephy_window_view_toolbar_cb), FALSE },
{ "ViewStatusbar", NULL, N_("St_atusbar"), NULL,
N_("Show or hide statusbar"),
G_CALLBACK (ephy_window_view_statusbar_cb), TRUE },
@@ -674,7 +674,7 @@ ephy_window_fullscreen (EphyWindow *window)
ephy_toolbar_set_show_leave_fullscreen (window->priv->toolbar,
!lockdown_fs);
-
+
sync_chromes_visibility (window);
}
@@ -1228,7 +1228,7 @@ update_chromes_actions (EphyWindow *window)
g_signal_handlers_block_by_func (G_OBJECT (action),
G_CALLBACK (ephy_window_view_toolbar_cb),
window);
- gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), show_toolbar);
+ gtk_toggle_action_set_active (GTK_TOGGLE_ACTION (action), !show_toolbar);
g_signal_handlers_unblock_by_func (G_OBJECT (action),
G_CALLBACK (ephy_window_view_toolbar_cb),
window);
@@ -3652,8 +3652,8 @@ sync_chrome_with_view_toggle (GtkAction *action, EphyWindow *window,
gboolean active;
active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action));
- window->priv->chrome = active ? window->priv->chrome | chrome_flag :
- window->priv->chrome & (~chrome_flag);
+ window->priv->chrome = active ? window->priv->chrome & (~chrome_flag) :
+ window->priv->chrome | chrome_flag;
sync_chromes_visibility (window);
sync_prefs_with_chrome (window);