aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPeter Harvey <peter.a.harvey@gmail.com>2006-01-17 07:38:26 +0800
committerPeter Anthony Harvey <paharvey@src.gnome.org>2006-01-17 07:38:26 +0800
commitfbc30b92399c79c238d502888a964ba3976a1623 (patch)
tree83a4eeb9a03d7724474686c1a564946a8ccde943 /src
parent6e4d35a67c26a9d31675f53915c106c98a027ef5 (diff)
downloadgsoc2013-epiphany-fbc30b92399c79c238d502888a964ba3976a1623.tar
gsoc2013-epiphany-fbc30b92399c79c238d502888a964ba3976a1623.tar.gz
gsoc2013-epiphany-fbc30b92399c79c238d502888a964ba3976a1623.tar.bz2
gsoc2013-epiphany-fbc30b92399c79c238d502888a964ba3976a1623.tar.lz
gsoc2013-epiphany-fbc30b92399c79c238d502888a964ba3976a1623.tar.xz
gsoc2013-epiphany-fbc30b92399c79c238d502888a964ba3976a1623.tar.zst
gsoc2013-epiphany-fbc30b92399c79c238d502888a964ba3976a1623.zip
src/bookmarks/ephy-bookmarks-menu.c
2006-01-17 Peter Harvey <peter.a.harvey@gmail.com> * src/bookmarks/ephy-bookmarks-menu.c Added the 'Local' topic to bookmarks menu.
Diffstat (limited to 'src')
-rw-r--r--src/bookmarks/ephy-bookmarks-menu.c24
1 files changed, 19 insertions, 5 deletions
diff --git a/src/bookmarks/ephy-bookmarks-menu.c b/src/bookmarks/ephy-bookmarks-menu.c
index c8cc02812..15126fd11 100644
--- a/src/bookmarks/ephy-bookmarks-menu.c
+++ b/src/bookmarks/ephy-bookmarks-menu.c
@@ -234,13 +234,27 @@ ephy_bookmarks_menu_build (GString *string, EphyNode *parent)
break;
}
- /* Build the menu, and return the merge_id */
- append_menu (string, topics, children, flags);
- g_ptr_array_free (topics, TRUE);
+ /* If this menu is the 'All' menu, be sure to include the 'local' topic. */
+ if (id == BOOKMARKS_NODE_ID)
+ {
+ EphyNode *local_node;
+
+ local_node = ephy_bookmarks_get_local (eb);
+ if (local_node != NULL)
+ {
+ g_ptr_array_add (topics, ephy_bookmarks_get_local (eb));
+ }
+
+ append_menu (string, topics, children, flags);
+ g_ptr_array_free (topics, TRUE);
+ }
- /* Add a "Open in tabs" menu item if this menu isn't the 'All' menu. */
- if (id != BOOKMARKS_NODE_ID)
+ /* Otherwise, build the menu with "Open in tabs". */
+ else
{
+ append_menu (string, topics, children, flags);
+ g_ptr_array_free (topics, TRUE);
+
char *name = ephy_open_tabs_action_name (node);
g_string_append_printf
(string, "<separator/><menuitem action=\"%s\" name=\"OpenTabs\"/>", name);