aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@src.gnome.org>2007-10-02 20:45:02 +0800
committerCosimo Cecchi <cosimoc@src.gnome.org>2007-10-02 20:45:02 +0800
commitab91fe04eeae9d4d6a28e84bc6f184cfcb16731d (patch)
treed3539870a68a8b65094588c345988b1942ab34e5 /src
parent1a4490212d92f74a6aa42c3b361d980dcf2524e3 (diff)
downloadgsoc2013-epiphany-ab91fe04eeae9d4d6a28e84bc6f184cfcb16731d.tar
gsoc2013-epiphany-ab91fe04eeae9d4d6a28e84bc6f184cfcb16731d.tar.gz
gsoc2013-epiphany-ab91fe04eeae9d4d6a28e84bc6f184cfcb16731d.tar.bz2
gsoc2013-epiphany-ab91fe04eeae9d4d6a28e84bc6f184cfcb16731d.tar.lz
gsoc2013-epiphany-ab91fe04eeae9d4d6a28e84bc6f184cfcb16731d.tar.xz
gsoc2013-epiphany-ab91fe04eeae9d4d6a28e84bc6f184cfcb16731d.tar.zst
gsoc2013-epiphany-ab91fe04eeae9d4d6a28e84bc6f184cfcb16731d.zip
Make "Up" button dropdown menu show titles instead of URLs for already visited pages.
Fix for bug #323764. svn path=/trunk/; revision=7511
Diffstat (limited to 'src')
-rw-r--r--src/ephy-navigation-action.c15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/ephy-navigation-action.c b/src/ephy-navigation-action.c
index 25484e8f5..f54b9fd9d 100644
--- a/src/ephy-navigation-action.c
+++ b/src/ephy-navigation-action.c
@@ -300,6 +300,7 @@ build_up_menu (EphyNavigationAction *action)
{
EphyWindow *window = action->priv->window;
EphyEmbed *embed;
+ EphyHistory *history;
GtkMenuShell *menu;
GtkWidget *item;
GSList *list, *l;
@@ -310,15 +311,27 @@ build_up_menu (EphyNavigationAction *action)
menu = GTK_MENU_SHELL (gtk_menu_new ());
+ history = EPHY_HISTORY
+ (ephy_embed_shell_get_global_history (embed_shell));
+
list = ephy_embed_get_go_up_list (embed);
for (l = list; l != NULL; l = l->next)
{
+ EphyNode *node;
+ const char *title = NULL;
+
url = l->data;
if (url == NULL) continue;
- item = new_history_menu_item (url, url);
+ node = ephy_history_get_page (history, url);
+ if (node != NULL)
+ {
+ title = ephy_node_get_property_string (node, EPHY_NODE_PAGE_PROP_TITLE);
+ }
+
+ item = new_history_menu_item (title ? title : url, url);
g_object_set_data_full (G_OBJECT (item), URL_DATA_KEY, url,
(GDestroyNotify) g_free);