[epiphany/overview] ephy-window: replace "new tab" with "new page"
- From: Claudio Saavedra <csaavedra src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/overview] ephy-window: replace "new tab" with "new page"
- Date: Wed, 8 Aug 2012 16:36:59 +0000 (UTC)
commit e32befacc5cbe958ad23bf982e4747307958151d
Author: Claudio Saavedra <csaavedra igalia com>
Date: Wed Aug 8 18:47:26 2012 +0300
ephy-window: replace "new tab" with "new page"
The "new page" action goes to the overview. To ease transition for
users, we continue using the Ctrl+T shortcut.
Since there is no use for ephy-home-action with these changes,
remove it.
src/Makefile.am | 2 -
src/ephy-home-action.c | 76 -----------------------------------------
src/ephy-home-action.h | 55 -----------------------------
src/ephy-shell.c | 1 -
src/ephy-window.c | 26 ++------------
src/resources/epiphany-ui.xml | 2 +-
src/window-commands.c | 7 ++++
src/window-commands.h | 2 +
8 files changed, 14 insertions(+), 157 deletions(-)
---
diff --git a/src/Makefile.am b/src/Makefile.am
index 7340878..4a39664 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -25,7 +25,6 @@ NOINST_H_FILES = \
ephy-find-toolbar.h \
ephy-frecent-store.h \
ephy-history-window.h \
- ephy-home-action.h \
ephy-link-action.h \
ephy-lockdown.h \
ephy-location-controller.h \
@@ -65,7 +64,6 @@ libephymain_la_SOURCES = \
ephy-extensions-manager.c \
ephy-find-toolbar.c \
ephy-frecent-store.c \
- ephy-home-action.c \
ephy-history-window.c \
ephy-link.c \
ephy-link-action.c \
diff --git a/src/ephy-shell.c b/src/ephy-shell.c
index 4eacd37..a5be16f 100644
--- a/src/ephy-shell.c
+++ b/src/ephy-shell.c
@@ -33,7 +33,6 @@
#include "ephy-file-helpers.h"
#include "ephy-gui.h"
#include "ephy-history-window.h"
-#include "ephy-home-action.h"
#include "ephy-lockdown.h"
#include "ephy-prefs.h"
#include "ephy-private.h"
diff --git a/src/ephy-window.c b/src/ephy-window.c
index 591c118..1f98ac8 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -40,7 +40,6 @@
#include "ephy-file-helpers.h"
#include "ephy-find-toolbar.h"
#include "ephy-gui.h"
-#include "ephy-home-action.h"
#include "ephy-link.h"
#include "ephy-location-entry.h"
#include "ephy-navigation-history-action.h"
@@ -98,6 +97,8 @@ static const GtkActionEntry ephy_menu_entries [] = {
/* File actions. */
+ { "FileNewPage", NULL, N_("_New Page"), "<control>T", NULL,
+ G_CALLBACK (window_cmd_file_new_page) },
{ "FileOpen", NULL, N_("_Openâ"), "<control>O", NULL,
G_CALLBACK (window_cmd_file_open) },
{ "FileSaveAs", NULL, N_("Save _Asâ"), "<shift><control>S", NULL,
@@ -1394,13 +1395,6 @@ setup_ui_manager (EphyWindow *window)
gtk_action_group_add_action (action_group, action);
g_object_unref (action);
- action = g_object_new (EPHY_TYPE_HOME_ACTION,
- "name", "FileNewTab",
- "label", _("New _Tab"),
- NULL);
- gtk_action_group_add_action_with_accel (action_group, action, "<control>T");
- g_object_unref (action);
-
action = g_object_new (EPHY_TYPE_COMBINED_STOP_RELOAD_ACTION,
"name", "ViewCombinedStopReload",
"loading", FALSE,
@@ -1593,7 +1587,7 @@ _ephy_window_set_default_actions_sensitive (EphyWindow *window,
GtkActionGroup *action_group;
GtkAction *action;
int i;
- const char *action_group_actions[] = { "FileSaveAs", "FileSaveAsApplication", "FilePrint",
+ const char *action_group_actions[] = { "FileNewPage", "FileSaveAs", "FileSaveAsApplication", "FilePrint",
"FileSendTo", "FileCloseTab", "FileBookmarkPage", "EditFind",
"EditFindPrev", "EditFindNext", "ViewEncoding",
"ViewZoomIn", "ViewZoomOut", "ViewPageSource",
@@ -3453,11 +3447,6 @@ setup_toolbar (EphyWindow *window)
G_CALLBACK (ephy_link_open), window);
action = gtk_action_group_get_action (priv->toolbar_action_group,
- "FileNewTab");
- g_signal_connect_swapped (action, "open-link",
- G_CALLBACK (ephy_link_open), window);
-
- action = gtk_action_group_get_action (priv->toolbar_action_group,
"Zoom");
g_signal_connect (action, "zoom-to-level",
G_CALLBACK (zoom_to_level_cb), window);
@@ -3507,7 +3496,6 @@ ephy_window_constructor (GType type,
EphyEmbedSingle *single;
GtkSettings *settings;
GtkAction *action;
- GtkActionGroup *toolbar_action_group;
GError *error = NULL;
guint settings_connection;
GtkCssProvider *css_provider;
@@ -3663,8 +3651,7 @@ ephy_window_constructor (GType type,
G_CALLBACK (sync_network_status), window);
/* Disable actions not needed for popup mode. */
- toolbar_action_group = priv->toolbar_action_group;
- action = gtk_action_group_get_action (toolbar_action_group, "FileNewTab");
+ action = gtk_action_group_get_action (priv->action_group, "FileNewPage");
ephy_action_change_sensitivity_flags (action, SENS_FLAG_CHROME,
priv->is_popup);
@@ -3676,11 +3663,6 @@ ephy_window_constructor (GType type,
mode = ephy_embed_shell_get_mode (embed_shell);
if (mode == EPHY_EMBED_SHELL_MODE_APPLICATION)
{
- /* FileNewTab and FileNewWindow are sort of special. */
- action = gtk_action_group_get_action (toolbar_action_group, "FileNewTab");
- ephy_action_change_sensitivity_flags (action, SENS_FLAG_CHROME,
- TRUE);
-
for (i = 0; i < G_N_ELEMENTS (disabled_actions_for_app_mode); i++)
{
action = gtk_action_group_get_action (priv->action_group,
diff --git a/src/resources/epiphany-ui.xml b/src/resources/epiphany-ui.xml
index c478903..9b3619c 100644
--- a/src/resources/epiphany-ui.xml
+++ b/src/resources/epiphany-ui.xml
@@ -68,7 +68,7 @@
</popup>
<popup name="PagePopup" action="PagePopupAction" accelerators="true">
- <menuitem name="FileNewTabMenu" action="FileNewTab"/>
+ <menuitem name="FileNewPageMenu" action="FileNewPage"/>
<menuitem name="FileOpenMenu" action="FileOpen"/>
<separator name="FileSep1"/>
<menuitem name="FileSaveAsMenu" action="FileSaveAs"/>
diff --git a/src/window-commands.c b/src/window-commands.c
index 7173f37..666449c 100644
--- a/src/window-commands.c
+++ b/src/window-commands.c
@@ -65,6 +65,13 @@
#endif
void
+window_cmd_file_new_page (GtkAction *action,
+ EphyWindow *window)
+{
+ ephy_window_set_overview_mode (window, TRUE);
+}
+
+void
window_cmd_file_print (GtkAction *action,
EphyWindow *window)
{
diff --git a/src/window-commands.h b/src/window-commands.h
index 06b4692..cc46be2 100644
--- a/src/window-commands.h
+++ b/src/window-commands.h
@@ -42,6 +42,8 @@ void window_cmd_new (GtkAction *action,
EphyWindow *window);
void window_cmd_file_bookmark_page (GtkAction *action,
EphyWindow *window);
+void window_cmd_file_new_page (GtkAction *action,
+ EphyWindow *window);
void window_cmd_file_open (GtkAction *action,
EphyWindow *window);
void window_cmd_file_save_as (GtkAction *action,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]