[gtk+/places-sidebar] Restore the originally-selected location when dynamically updating the bookmarks
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/places-sidebar] Restore the originally-selected location when dynamically updating the bookmarks
- Date: Sat, 24 Nov 2012 19:36:26 +0000 (UTC)
commit bd9532d23fc581d4481f887cdcc1a964c3f52a91
Author: Federico Mena Quintero <federico gnome org>
Date: Sat Nov 24 11:18:23 2012 -0600
Restore the originally-selected location when dynamically updating the bookmarks
Signed-off-by: Federico Mena Quintero <federico gnome org>
gtk/gtkplacessidebar.c | 16 ++++------------
1 files changed, 4 insertions(+), 12 deletions(-)
---
diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c
index cfc79cd..b555b43 100644
--- a/gtk/gtkplacessidebar.c
+++ b/gtk/gtkplacessidebar.c
@@ -661,7 +661,7 @@ update_places (GtkPlacesSidebar *sidebar)
GVolume *volume;
GSList *bookmarks, *sl;
int index;
- char *location, *mount_uri, *name, *last_uri, *identifier;
+ char *original_uri, *mount_uri, *name, *last_uri, *identifier;
char *home_uri;
char *bookmark_name;
GIcon *icon;
@@ -683,15 +683,7 @@ update_places (GtkPlacesSidebar *sidebar)
sidebar->devices_header_added = FALSE;
sidebar->bookmarks_header_added = FALSE;
-#if 0
- /* FIXME: the "location" is used at the end of this function
- * to restore the current location. How do we do that now?
- */
- slot = nautilus_window_get_active_slot (sidebar->window);
- location = nautilus_window_slot_get_current_uri (slot);
-#else
- location = NULL;
-#endif
+ original_uri = g_strdup (sidebar->uri);
network_mounts = network_volumes = NULL;
volume_monitor = sidebar->volume_monitor;
@@ -1118,9 +1110,9 @@ update_places (GtkPlacesSidebar *sidebar)
g_list_free_full (network_mounts, g_object_unref);
/* restore selection */
- sidebar_update_restore_selection (sidebar, location, last_uri);
+ sidebar_update_restore_selection (sidebar, original_uri, last_uri);
- g_free (location);
+ g_free (original_uri);
g_free (last_uri);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]