From 2af1ac8dec7c209add89fd1a6f901ad78cae5eb7 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Wed, 27 Jul 2005 19:12:13 +0000 Subject: Only show the leaf name on bookmarksbar for hierarchical topics. 2005-07-27 Christian Persch * src/bookmarks/ephy-topic-action.c: (ephy_topic_action_sync_label): Only show the leaf name on bookmarksbar for hierarchical topics. --- src/bookmarks/ephy-topic-action.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src') 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); } -- cgit v1.2.3