aboutsummaryrefslogtreecommitdiffstats
path: root/src/ephy-toolbar.c
diff options
context:
space:
mode:
authorMario Sanchez Prada <msanchez@igalia.com>2010-04-07 23:19:25 +0800
committerXan Lopez <xan@gnome.org>2010-04-20 21:07:58 +0800
commitede59b054c4af72cc41108db8aedafbcae1996de (patch)
tree3a5581d41025e4687777d376d53c4de490ebe5a3 /src/ephy-toolbar.c
parent384588b86e68ea692a8f99db86b45ca0cc54f804 (diff)
downloadgsoc2013-epiphany-ede59b054c4af72cc41108db8aedafbcae1996de.tar
gsoc2013-epiphany-ede59b054c4af72cc41108db8aedafbcae1996de.tar.gz
gsoc2013-epiphany-ede59b054c4af72cc41108db8aedafbcae1996de.tar.bz2
gsoc2013-epiphany-ede59b054c4af72cc41108db8aedafbcae1996de.tar.lz
gsoc2013-epiphany-ede59b054c4af72cc41108db8aedafbcae1996de.tar.xz
gsoc2013-epiphany-ede59b054c4af72cc41108db8aedafbcae1996de.tar.zst
gsoc2013-epiphany-ede59b054c4af72cc41108db8aedafbcae1996de.zip
Split EphyNavigationAction in one abstract class and two subclasses
To ease understanding and further modification of the two different usages for the EphyNavigationAction class (Back/Forward and Up buttons), all the code there was split so the common one is kept in the superclass, delegating the more specific parts in the implementations of the subclasses: History (back/forward) and Up buttons. Also updated usage of this class in EphyToolbar. Bug #539716 Signed-off-by: Xan Lopez <xan@gnome.org>
Diffstat (limited to 'src/ephy-toolbar.c')
-rw-r--r--src/ephy-toolbar.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/ephy-toolbar.c b/src/ephy-toolbar.c
index 9bb1e61e7..c82b93276 100644
--- a/src/ephy-toolbar.c
+++ b/src/ephy-toolbar.c
@@ -30,6 +30,8 @@
#include "ephy-location-entry.h"
#include "ephy-location-action.h"
#include "ephy-navigation-action.h"
+#include "ephy-navigation-history-action.h"
+#include "ephy-navigation-up-action.h"
#include "ephy-topic-action.h"
#include "ephy-zoom-action.h"
#include "ephy-spinner-tool-item.h"
@@ -226,7 +228,7 @@ ephy_toolbar_set_window (EphyToolbar *toolbar,
g_object_unref (priv->action_group);
action = priv->actions[BACK_ACTION] =
- g_object_new (EPHY_TYPE_NAVIGATION_ACTION,
+ g_object_new (EPHY_TYPE_NAVIGATION_HISTORY_ACTION,
"name", "NavigationBack",
"label", _("_Back"),
"stock_id", GTK_STOCK_GO_BACK,
@@ -236,7 +238,7 @@ ephy_toolbar_set_window (EphyToolbar *toolbar,
*/
"arrow-tooltip", _("Back history"),
"window", priv->window,
- "direction", EPHY_NAVIGATION_DIRECTION_BACK,
+ "direction", EPHY_NAVIGATION_HISTORY_DIRECTION_BACK,
"is_important", TRUE,
NULL);
g_signal_connect_swapped (action, "open-link",
@@ -246,7 +248,7 @@ ephy_toolbar_set_window (EphyToolbar *toolbar,
g_object_unref (action);
action = priv->actions[FORWARD_ACTION] =
- g_object_new (EPHY_TYPE_NAVIGATION_ACTION,
+ g_object_new (EPHY_TYPE_NAVIGATION_HISTORY_ACTION,
"name", "NavigationForward",
"label", _("_Forward"),
"stock_id", GTK_STOCK_GO_FORWARD,
@@ -256,7 +258,7 @@ ephy_toolbar_set_window (EphyToolbar *toolbar,
*/
"arrow-tooltip", _("Forward history"),
"window", priv->window,
- "direction", EPHY_NAVIGATION_DIRECTION_FORWARD,
+ "direction", EPHY_NAVIGATION_HISTORY_DIRECTION_FORWARD,
NULL);
g_signal_connect_swapped (action, "open-link",
G_CALLBACK (ephy_link_open), toolbar);
@@ -265,7 +267,7 @@ ephy_toolbar_set_window (EphyToolbar *toolbar,
g_object_unref (action);
action = priv->actions[UP_ACTION] =
- g_object_new (EPHY_TYPE_NAVIGATION_ACTION,
+ g_object_new (EPHY_TYPE_NAVIGATION_UP_ACTION,
"name", "NavigationUp",
"label", _("_Up"),
"stock_id", GTK_STOCK_GO_UP,
@@ -275,7 +277,6 @@ ephy_toolbar_set_window (EphyToolbar *toolbar,
*/
"arrow-tooltip", _("List of upper levels"),
"window", priv->window,
- "direction", EPHY_NAVIGATION_DIRECTION_UP,
NULL);
g_signal_connect_swapped (action, "open-link",
G_CALLBACK (ephy_link_open), toolbar);