[epiphany] ephy-toolbar: disable New Window and New Tab actions



commit 5f1210e2ea3bacaac0d4349cbb9eb22a4cb81191
Author: Xan Lopez <xlopez igalia com>
Date:   Mon Aug 29 12:51:16 2011 +0200

    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.

 src/ephy-toolbar.c |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)
---
diff --git a/src/ephy-toolbar.c b/src/ephy-toolbar.c
index c67076d..5879c08 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);
 
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]