From ede59b054c4af72cc41108db8aedafbcae1996de Mon Sep 17 00:00:00 2001 From: Mario Sanchez Prada Date: Wed, 7 Apr 2010 17:19:25 +0200 Subject: 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 --- src/ephy-navigation-action.h | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) (limited to 'src/ephy-navigation-action.h') diff --git a/src/ephy-navigation-action.h b/src/ephy-navigation-action.h index cac5cb995..d3f3cbfc4 100644 --- a/src/ephy-navigation-action.h +++ b/src/ephy-navigation-action.h @@ -26,6 +26,7 @@ #define EPHY_NAVIGATION_ACTION_H #include "ephy-link-action.h" +#include "ephy-window.h" G_BEGIN_DECLS @@ -40,17 +41,10 @@ typedef struct _EphyNavigationAction EphyNavigationAction; typedef struct _EphyNavigationActionPrivate EphyNavigationActionPrivate; typedef struct _EphyNavigationActionClass EphyNavigationActionClass; -typedef enum -{ - EPHY_NAVIGATION_DIRECTION_UP, - EPHY_NAVIGATION_DIRECTION_BACK, - EPHY_NAVIGATION_DIRECTION_FORWARD -} EphyNavigationDirection; - struct _EphyNavigationAction { EphyLinkAction parent; - + /*< private >*/ EphyNavigationActionPrivate *priv; }; @@ -58,10 +52,21 @@ struct _EphyNavigationAction struct _EphyNavigationActionClass { EphyLinkActionClass parent_class; + + /*< virtual >*/ + GtkWidget *(*build_dropdown_menu) (EphyNavigationAction *action); }; GType ephy_navigation_action_get_type (void); +/*< Protected >*/ + +EphyWindow *_ephy_navigation_action_get_window (EphyNavigationAction *action); + +guint _ephy_navigation_action_get_statusbar_context_id (EphyNavigationAction *action); + +GtkWidget *_ephy_navigation_action_new_history_menu_item (const char *origtext, + const char *address); G_END_DECLS #endif -- cgit v1.2.3