diff options
author | Peter Harvey <peter.a.harvey@gmail.com> | 2006-02-11 07:25:36 +0800 |
---|---|---|
committer | Peter Anthony Harvey <paharvey@src.gnome.org> | 2006-02-11 07:25:36 +0800 |
commit | 96db579deb9a2caa376f167846f39b6eed6051ce (patch) | |
tree | 79846be0b68587323b047dd65a0bc14b8e1a178c /src/bookmarks/ephy-bookmarks-menu.c | |
parent | 927100b2cb4b488d2581d63f764b74db976db69c (diff) | |
download | gsoc2013-epiphany-96db579deb9a2caa376f167846f39b6eed6051ce.tar gsoc2013-epiphany-96db579deb9a2caa376f167846f39b6eed6051ce.tar.gz gsoc2013-epiphany-96db579deb9a2caa376f167846f39b6eed6051ce.tar.bz2 gsoc2013-epiphany-96db579deb9a2caa376f167846f39b6eed6051ce.tar.lz gsoc2013-epiphany-96db579deb9a2caa376f167846f39b6eed6051ce.tar.xz gsoc2013-epiphany-96db579deb9a2caa376f167846f39b6eed6051ce.tar.zst gsoc2013-epiphany-96db579deb9a2caa376f167846f39b6eed6051ce.zip |
src/bookmarks/ephy-bookmarks-menu.c src/bookmarks/ephy-bookmarks-ui.c
2006-02-10 Peter Harvey <peter.a.harvey@gmail.com>
* src/bookmarks/ephy-bookmarks-menu.c
* src/bookmarks/ephy-bookmarks-ui.c
Additional minor cleanups.
Diffstat (limited to 'src/bookmarks/ephy-bookmarks-menu.c')
-rw-r--r-- | src/bookmarks/ephy-bookmarks-menu.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/bookmarks/ephy-bookmarks-menu.c b/src/bookmarks/ephy-bookmarks-menu.c index db19cf01c..1a04f86f1 100644 --- a/src/bookmarks/ephy-bookmarks-menu.c +++ b/src/bookmarks/ephy-bookmarks-menu.c @@ -48,12 +48,11 @@ enum BUILD_CHILD_SUBMENUS = 1 << 3 }; -/* Construct a block of bookmark actions, postfixing the names with a topic id - * to allow different. */ +/* Construct a block of bookmark actions. Note that no bookmark action appears + * more than once in a menu, so no need to supply names. */ static void append_bookmarks (GString *string, - const GPtrArray *bookmarks, - int instance) + const GPtrArray *bookmarks) { EphyNode *child; char name[EPHY_BOOKMARK_ACTION_NAME_BUFFER_SIZE]; @@ -66,8 +65,7 @@ append_bookmarks (GString *string, EPHY_BOOKMARK_ACTION_NAME_PRINTF (name, child); - g_string_append_printf (string, "<menuitem action=\"%s\" name=\"%s-%d\"/>", - name, name, instance); + g_string_append_printf (string, "<menuitem action=\"%s\"/>", name); } } @@ -160,7 +158,7 @@ append_menu (GString *string, const GPtrArray *topics, const GPtrArray *bookmark g_ptr_array_sort (subset, ephy_bookmarks_compare_bookmark_pointers); if (separate) g_string_append (string, "<separator/>"); - append_bookmarks (string, subset, i+1); + append_bookmarks (string, subset); separate = TRUE; /* Record that each bookmark has been added. */ @@ -189,7 +187,7 @@ append_menu (GString *string, const GPtrArray *topics, const GPtrArray *bookmark /* Create the final subdivision (uncovered bookmarks). */ g_ptr_array_sort (uncovered, ephy_bookmarks_compare_bookmark_pointers); - append_bookmarks (string, uncovered, 0); + append_bookmarks (string, uncovered); g_ptr_array_free (uncovered, TRUE); } |