From f5b9abb6365868fab0e4408a20907ee786789a5d Mon Sep 17 00:00:00 2001 From: Emilio Pozuelo Monfort Date: Tue, 8 Sep 2009 00:00:40 +0200 Subject: Bug 594435: Bookmark properties topic improvements If a bookmark has "foo" and "bar" topics, show "foo, bar, " instead of "fo, bar, o". While at it, remove the trailing comma, so we display "foo, bar" rather than "foo, bar, ". http://bugzilla.gnome.org/show_bug.cgi?id=594435 Signed-off-by: Xan Lopez --- src/bookmarks/ephy-topics-entry.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/bookmarks/ephy-topics-entry.c b/src/bookmarks/ephy-topics-entry.c index 385fe2eea..53de7535e 100644 --- a/src/bookmarks/ephy-topics-entry.c +++ b/src/bookmarks/ephy-topics-entry.c @@ -168,15 +168,16 @@ update_widget (EphyTopicsEntry *entry) gtk_editable_delete_text (editable, 0, -1); } - for (pos = -1, i = 0; i < topics->len; i++) + for (pos = 0, i = 0; i < topics->len; i++) { node = g_ptr_array_index (topics, i); title = ephy_node_get_property_string (node, EPHY_NODE_KEYWORD_PROP_NAME); if (!is_focus && ephy_node_has_child (node, priv->bookmark)) { + if (pos > 0) + gtk_editable_insert_text (editable, ", ", -1, &pos); gtk_editable_insert_text (editable, title, -1, &pos); - gtk_editable_insert_text (editable, ", ", -1, &pos); } tmp1 = g_utf8_casefold (title, -1); -- cgit v1.2.3