aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--src/bookmarks/ephy-bookmarks-menu.c24
2 files changed, 25 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index cef57af90..369a62cf2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2006-01-17 Peter Harvey <peter.a.harvey@gmail.com>
+ * src/bookmarks/ephy-bookmarks-menu.c
+
+ Added the 'Local' topic to bookmarks menu.
+
+2006-01-17 Peter Harvey <peter.a.harvey@gmail.com>
+
* src/bookmarks/Makefile.am
Forgotten Makefile changes.
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);