aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <pochu27@gmail.com>2009-09-08 06:00:40 +0800
committerXan Lopez <xan@gnome.org>2009-09-08 16:32:31 +0800
commitf5b9abb6365868fab0e4408a20907ee786789a5d (patch)
tree30bf7a771fab1cdae067f19c116c8b405805099d
parent7b24d945ecda146659286e26f74caa285d43490a (diff)
downloadgsoc2013-epiphany-f5b9abb6365868fab0e4408a20907ee786789a5d.tar
gsoc2013-epiphany-f5b9abb6365868fab0e4408a20907ee786789a5d.tar.gz
gsoc2013-epiphany-f5b9abb6365868fab0e4408a20907ee786789a5d.tar.bz2
gsoc2013-epiphany-f5b9abb6365868fab0e4408a20907ee786789a5d.tar.lz
gsoc2013-epiphany-f5b9abb6365868fab0e4408a20907ee786789a5d.tar.xz
gsoc2013-epiphany-f5b9abb6365868fab0e4408a20907ee786789a5d.tar.zst
gsoc2013-epiphany-f5b9abb6365868fab0e4408a20907ee786789a5d.zip
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 <xan@gnome.org>
-rw-r--r--src/bookmarks/ephy-topics-entry.c5
1 files 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);