[epiphany] Do not hardcode the statusbar context descriptions



commit 50c36fdf1c4224c4b2e2a97d635fd9184af7519d
Author: Xan Lopez <xan gnome org>
Date:   Tue May 18 16:15:04 2010 +0200

    Do not hardcode the statusbar context descriptions
    
    Define them in the EphyWebView header, since we'll need to create the
    context ids from multiple files.

 embed/ephy-web-view.h |    3 +++
 src/ephy-window.c     |    4 ++--
 2 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/embed/ephy-web-view.h b/embed/ephy-web-view.h
index 5243aa7..1b45ed4 100644
--- a/embed/ephy-web-view.h
+++ b/embed/ephy-web-view.h
@@ -45,6 +45,9 @@ typedef struct _EphyWebViewClass  EphyWebViewClass;
 typedef struct _EphyWebView    EphyWebView;
 typedef struct _EphyWebViewPrivate  EphyWebViewPrivate;
 
+#define TAB_MESSAGE_CONTEXT_DESCRIPTION "tab_message"
+#define HELP_MESSAGE_CONTEXT_DESCRIPTION "help_message"
+
 typedef enum
 {
 	EPHY_WEB_VIEW_NAV_UP		= 1 << 0,
diff --git a/src/ephy-window.c b/src/ephy-window.c
index d49b3f1..a627dc5 100644
--- a/src/ephy-window.c
+++ b/src/ephy-window.c
@@ -495,9 +495,9 @@ impl_add_child (EphyEmbedContainer *container,
 	view = ephy_embed_get_web_view (child);
 
 	window->priv->tab_message_cid = ephy_web_view_statusbar_get_context_id
-		(view, "tab_message");
+		(view, TAB_MESSAGE_CONTEXT_DESCRIPTION);
 	window->priv->help_message_cid = ephy_web_view_statusbar_get_context_id
-		(view, "help_message");
+		(view, HELP_MESSAGE_CONTEXT_DESCRIPTION);
 
 	return ephy_notebook_add_tab (EPHY_NOTEBOOK (window->priv->notebook),
 				      child, position, jump_to);



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