aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXan Lopez <xlopez@igalia.com>2011-08-29 18:51:16 +0800
committerXan Lopez <xlopez@igalia.com>2011-08-29 18:51:16 +0800
commit5f1210e2ea3bacaac0d4349cbb9eb22a4cb81191 (patch)
treec9767b33491cabde3af111b61c74e54784b89dad /src
parentebac66a05be1e71bd978f070fb842fd8b457e7e8 (diff)
downloadgsoc2013-epiphany-5f1210e2ea3bacaac0d4349cbb9eb22a4cb81191.tar
gsoc2013-epiphany-5f1210e2ea3bacaac0d4349cbb9eb22a4cb81191.tar.gz
gsoc2013-epiphany-5f1210e2ea3bacaac0d4349cbb9eb22a4cb81191.tar.bz2
gsoc2013-epiphany-5f1210e2ea3bacaac0d4349cbb9eb22a4cb81191.tar.lz
gsoc2013-epiphany-5f1210e2ea3bacaac0d4349cbb9eb22a4cb81191.tar.xz
gsoc2013-epiphany-5f1210e2ea3bacaac0d4349cbb9eb22a4cb81191.tar.zst
gsoc2013-epiphany-5f1210e2ea3bacaac0d4349cbb9eb22a4cb81191.zip
ephy-toolbar: disable New Window and New Tab actions
We should refactor EphyWindow so that all these UI bits are not even present in app mode, but for now this will do.
Diffstat (limited to 'src')
-rw-r--r--src/ephy-toolbar.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/ephy-toolbar.c b/src/ephy-toolbar.c
index c67076dfb..5879c082b 100644
--- a/src/ephy-toolbar.c
+++ b/src/ephy-toolbar.c
@@ -331,9 +331,13 @@ ephy_toolbar_set_window (EphyToolbar *toolbar,
"stock_id", STOCK_NEW_TAB,
"tooltip", _("Open a new tab"),
NULL);
- g_signal_connect_swapped (action, "open-link",
- G_CALLBACK (ephy_link_open), toolbar);
+
+ if (ephy_embed_shell_get_mode (embed_shell) != EPHY_EMBED_SHELL_MODE_APPLICATION)
+ g_signal_connect_swapped (action, "open-link",
+ G_CALLBACK (ephy_link_open), toolbar);
+
gtk_action_group_add_action_with_accel (priv->action_group, action, "<control>T");
+
g_object_unref (action);
action = g_object_new (EPHY_TYPE_HOME_ACTION,
@@ -342,9 +346,12 @@ ephy_toolbar_set_window (EphyToolbar *toolbar,
"stock_id", STOCK_NEW_WINDOW,
"tooltip", _("Open a new window"),
NULL);
- g_signal_connect_swapped (action, "open-link",
- G_CALLBACK (ephy_link_open), toolbar);
+ if (ephy_embed_shell_get_mode (embed_shell) != EPHY_EMBED_SHELL_MODE_APPLICATION)
+ g_signal_connect_swapped (action, "open-link",
+ G_CALLBACK (ephy_link_open), toolbar);
+
gtk_action_group_add_action_with_accel (priv->action_group, action, "<control>N");
+
g_object_unref (action);
}