aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClaudio Saavedra <csaavedra@igalia.com>2012-08-29 19:16:16 +0800
committerClaudio Saavedra <csaavedra@igalia.com>2012-09-01 02:34:02 +0800
commit2418032b1618e0a2c142fe8ec8149f851d8eaae9 (patch)
tree54f1e9d9d727a16e8b35361335a780282036e998
parentb3d879a1b505f9dec034b1ec4f5568c0226bb6f4 (diff)
downloadgsoc2013-epiphany-2418032b1618e0a2c142fe8ec8149f851d8eaae9.tar.gz
gsoc2013-epiphany-2418032b1618e0a2c142fe8ec8149f851d8eaae9.tar.zst
gsoc2013-epiphany-2418032b1618e0a2c142fe8ec8149f851d8eaae9.zip
ephy-overview: define the overview title string here
Instead of duplicating the string everywhere.
-rw-r--r--embed/ephy-overview.h2
-rw-r--r--embed/ephy-web-view.c3
-rw-r--r--po/POTFILES.in1
-rw-r--r--src/ephy-navigation-history-action.c3
4 files changed, 7 insertions, 2 deletions
diff --git a/embed/ephy-overview.h b/embed/ephy-overview.h
index 0b990169f..21c46539f 100644
--- a/embed/ephy-overview.h
+++ b/embed/ephy-overview.h
@@ -50,6 +50,8 @@ struct _EphyOverviewClass {
};
+#define EPHY_OVERVIEW_TITLE _("Most Visited")
+
GType ephy_overview_get_type (void) G_GNUC_CONST;
GtkWidget * ephy_overview_new (void);
diff --git a/embed/ephy-web-view.c b/embed/ephy-web-view.c
index 7805b785c..b84eb42f8 100644
--- a/embed/ephy-web-view.c
+++ b/embed/ephy-web-view.c
@@ -36,6 +36,7 @@
#include "ephy-file-helpers.h"
#include "ephy-file-monitor.h"
#include "ephy-history-service.h"
+#include "ephy-overview.h"
#include "ephy-permission-manager.h"
#include "ephy-prefs.h"
#include "ephy-profile-utils.h"
@@ -1102,7 +1103,7 @@ get_title_from_address (const char *address)
return g_strdup (_("Plugins"));
else if (!strcmp (address, EPHY_ABOUT_SCHEME":overview") ||
!strcmp (address, "about:overview"))
- return g_strdup (_("Most visited"));
+ return g_strdup (EPHY_OVERVIEW_TITLE);
else
return ephy_string_get_host_name (address);
}
diff --git a/po/POTFILES.in b/po/POTFILES.in
index e7211b88b..e482d4c1b 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -11,6 +11,7 @@ embed/ephy-embed-shell.c
embed/ephy-embed-single.c
embed/ephy-embed-utils.c
embed/ephy-encodings.c
+embed/ephy-overview.h
embed/ephy-request-about.c
embed/ephy-web-view.c
lib/egg/eggdesktopfile.c
diff --git a/src/ephy-navigation-history-action.c b/src/ephy-navigation-history-action.c
index 6898001ee..9ad165a9e 100644
--- a/src/ephy-navigation-history-action.c
+++ b/src/ephy-navigation-history-action.c
@@ -33,6 +33,7 @@
#include "ephy-gui.h"
#include "ephy-history-service.h"
#include "ephy-link.h"
+#include "ephy-overview.h"
#include "ephy-shell.h"
#include "ephy-type-builtins.h"
#include "ephy-window.h"
@@ -544,7 +545,7 @@ build_dropdown_menu (EphyNavigationHistoryAction *action)
/* The overview is not actually a webpage, so we need to hardcode
* this here. */
if (g_strcmp0 (uri, "ephy-about:overview") == 0)
- title = g_strdup (_("Most Visited"));
+ title = g_strdup (EPHY_OVERVIEW_TITLE);
if (title == NULL || g_strstrip (title)[0] == '\0')
item = new_history_menu_item (EPHY_WEB_VIEW (web_view), uri, uri);