aboutsummaryrefslogtreecommitdiffstats
path: root/src/bookmarks
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2005-07-28 03:12:13 +0800
committerChristian Persch <chpe@src.gnome.org>2005-07-28 03:12:13 +0800
commit2af1ac8dec7c209add89fd1a6f901ad78cae5eb7 (patch)
tree078985081d95b6c275dfdd78f628014583b41faf /src/bookmarks
parentbc1e77c57769572ab4953214b40e4d5e6e9c64cd (diff)
downloadgsoc2013-epiphany-2af1ac8dec7c209add89fd1a6f901ad78cae5eb7.tar.gz
gsoc2013-epiphany-2af1ac8dec7c209add89fd1a6f901ad78cae5eb7.tar.zst
gsoc2013-epiphany-2af1ac8dec7c209add89fd1a6f901ad78cae5eb7.zip
Only show the leaf name on bookmarksbar for hierarchical topics.
2005-07-27 Christian Persch <chpe@cvs.gnome.org> * src/bookmarks/ephy-topic-action.c: (ephy_topic_action_sync_label): Only show the leaf name on bookmarksbar for hierarchical topics.
Diffstat (limited to 'src/bookmarks')
-rw-r--r--src/bookmarks/ephy-topic-action.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/bookmarks/ephy-topic-action.c b/src/bookmarks/ephy-topic-action.c
index 51cb42e60..fc9716086 100644
--- a/src/bookmarks/ephy-topic-action.c
+++ b/src/bookmarks/ephy-topic-action.c
@@ -197,14 +197,21 @@ ephy_topic_action_sync_label (GtkAction *gaction,
if (GTK_IS_TOOL_ITEM (proxy))
{
GtkWidget *label = NULL;
- char *title;
+ char *title, *separator;
label = g_object_get_data (G_OBJECT (proxy), "label");
g_return_if_fail (label != NULL);
g_object_get (G_OBJECT (action), "label", &title, NULL);
+ g_return_if_fail (label != NULL);
+
+ /* In case this is a multi-hierarchy topic, we only want to
+ * display the leaf name. See bug #310963.
+ */
+ separator = g_strrstr (title, BOOKMARKS_HIERARCHY_SEP);
- gtk_label_set_label (GTK_LABEL (label), title);
+ gtk_label_set_label (GTK_LABEL (label),
+ separator != NULL ? separator + 2 : title);
g_free (title);
}