diff options
author | Martin Wehner <martin.wehner@epost.de> | 2005-02-17 02:51:08 +0000 |
---|---|---|
committer | Martin Wehner <mwehner@src.gnome.org> | 2005-02-17 02:51:08 +0000 |
commit | 94cc2fb2ad22fc69645378707671e35147b2b568 (patch) | |
tree | 414c27723de46775b5a041c0974678605b477abc /src/nautilus-navigation-window-menus.c | |
parent | fad63e262b34cbe3cb5aa0cc1c5bc063fb222051 (diff) | |
download | nautilus-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>
Diffstat (limited to 'src/nautilus-navigation-window-menus.c')
-rw-r--r-- | src/nautilus-navigation-window-menus.c | 9 |
1 files changed, 7 insertions, 2 deletions
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 |