summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Wehner <martin.wehner@epost.de>2005-02-17 02:51:08 +0000
committerMartin Wehner <mwehner@src.gnome.org>2005-02-17 02:51:08 +0000
commit94cc2fb2ad22fc69645378707671e35147b2b568 (patch)
tree414c27723de46775b5a041c0974678605b477abc
parentfad63e262b34cbe3cb5aa0cc1c5bc063fb222051 (diff)
downloadnautilus-94cc2fb2ad22fc69645378707671e35147b2b568.tar.gz
Only add a bookmark once for a given location. Fixes #161862.
2005-02-17 Martin Wehner <martin.wehner@epost.de> * src/nautilus-navigation-window-menus.c: (add_bookmark_for_current_location): Only add a bookmark once for a given location. Fixes #161862. Patch from Subodh Soni <ssoni@novell.com>
-rw-r--r--ChangeLog9
-rw-r--r--src/nautilus-navigation-window-menus.c9
2 files changed, 16 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 858315c2c..4cd8016f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2005-02-17 Martin Wehner <martin.wehner@epost.de>
+
+ * src/nautilus-navigation-window-menus.c:
+ (add_bookmark_for_current_location):
+ Only add a bookmark once for a given location.
+ Fixes #161862.
+
+ Patch from Subodh Soni <ssoni@novell.com>
+
2005-02-15 Alexander Larsson <alexl@redhat.com>
* src/nautilus-application.c:
diff --git a/src/nautilus-navigation-window-menus.c b/src/nautilus-navigation-window-menus.c
index 524fb382b..e59e297fa 100644
--- a/src/nautilus-navigation-window-menus.c
+++ b/src/nautilus-navigation-window-menus.c
@@ -341,10 +341,15 @@ nautilus_bookmarks_exiting (void)
static void
add_bookmark_for_current_location (NautilusNavigationWindow *window)
{
+ NautilusBookmark *bookmark;
+
g_return_if_fail (NAUTILUS_IS_NAVIGATION_WINDOW (window));
- nautilus_bookmark_list_append (get_bookmark_list (),
- NAUTILUS_WINDOW (window)->current_location_bookmark);
+ bookmark = NAUTILUS_WINDOW (window)->current_location_bookmark;
+
+ if (!nautilus_bookmark_list_contains (get_bookmark_list (), bookmark)) {
+ nautilus_bookmark_list_append (get_bookmark_list (), bookmark);
+ }
}
static void