[gtk+/places-sidebar: 24/53] Remove the last use of nautilus_window_slot_get_current_uri()
- From: Federico Mena Quintero <federico src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/places-sidebar: 24/53] Remove the last use of nautilus_window_slot_get_current_uri()
- Date: Tue, 4 Sep 2012 02:34:47 +0000 (UTC)
commit 6287ee4e8f037a992aab5913237905fd2460bf9e
Author: Federico Mena Quintero <federico gnome org>
Date: Mon Oct 3 11:11:48 2011 -0500
Remove the last use of nautilus_window_slot_get_current_uri()
This is just sidebar->uri, the current URI in the sidebar.
Signed-off-by: Federico Mena Quintero <federico gnome org>
gtk/gtkplacessidebar.c | 30 ++++++++++++------------------
1 files changed, 12 insertions(+), 18 deletions(-)
---
diff --git a/gtk/gtkplacessidebar.c b/gtk/gtkplacessidebar.c
index f930fea..a2daa82 100644
--- a/gtk/gtkplacessidebar.c
+++ b/gtk/gtkplacessidebar.c
@@ -439,12 +439,11 @@ update_places (GtkPlacesSidebar *sidebar)
GVolume *volume;
GSList *bookmarks, *sl;
int index;
- char *location, *mount_uri, *name, *desktop_path, *last_uri;
+ char *mount_uri, *name, *desktop_path, *last_uri;
char *bookmark_name;
const gchar *path;
GIcon *icon;
GFile *root;
- NautilusWindowSlot *slot;
char *tooltip;
GList *network_mounts;
@@ -463,9 +462,6 @@ update_places (GtkPlacesSidebar *sidebar)
sidebar->devices_header_added = FALSE;
sidebar->bookmarks_header_added = FALSE;
- slot = nautilus_window_get_active_slot (sidebar->window);
- location = nautilus_window_slot_get_current_uri (slot);
-
volume_monitor = sidebar->volume_monitor;
/* first go through all connected drives */
@@ -492,7 +488,7 @@ update_places (GtkPlacesSidebar *sidebar)
name, icon, mount_uri,
drive, volume, mount, 0, tooltip);
compare_for_selection (sidebar,
- location, mount_uri, last_uri,
+ sidebar->uri, mount_uri, last_uri,
&last_iter, &select_path);
g_object_unref (root);
g_object_unref (mount);
@@ -574,7 +570,7 @@ update_places (GtkPlacesSidebar *sidebar)
name, icon, mount_uri,
NULL, volume, mount, 0, tooltip);
compare_for_selection (sidebar,
- location, mount_uri, last_uri,
+ sidebar->uri, mount_uri, last_uri,
&last_iter, &select_path);
g_object_unref (mount);
g_object_unref (icon);
@@ -634,7 +630,7 @@ update_places (GtkPlacesSidebar *sidebar)
NULL, NULL, NULL, index,
tooltip);
compare_for_selection (sidebar,
- location, mount_uri, last_uri,
+ sidebar->uri, mount_uri, last_uri,
&last_iter, &select_path);
g_object_unref (root);
@@ -660,7 +656,7 @@ update_places (GtkPlacesSidebar *sidebar)
_("Open your personal folder"));
g_object_unref (icon);
compare_for_selection (sidebar,
- location, mount_uri, last_uri,
+ sidebar->uri, mount_uri, last_uri,
&last_iter, &select_path);
g_free (mount_uri);
}
@@ -678,7 +674,7 @@ update_places (GtkPlacesSidebar *sidebar)
_("Open the contents of your desktop in a folder"));
g_object_unref (icon);
compare_for_selection (sidebar,
- location, mount_uri, last_uri,
+ sidebar->uri, mount_uri, last_uri,
&last_iter, &select_path);
g_free (mount_uri);
g_free (desktop_path);
@@ -716,7 +712,7 @@ update_places (GtkPlacesSidebar *sidebar)
NULL, NULL, NULL, 0,
tooltip);
compare_for_selection (sidebar,
- location, mount_uri, last_uri,
+ sidebar->uri, mount_uri, last_uri,
&last_iter, &select_path);
g_free (name);
g_object_unref (root);
@@ -757,7 +753,7 @@ update_places (GtkPlacesSidebar *sidebar)
name, icon, mount_uri,
NULL, NULL, mount, 0, tooltip);
compare_for_selection (sidebar,
- location, mount_uri, last_uri,
+ sidebar->uri, mount_uri, last_uri,
&last_iter, &select_path);
g_object_unref (root);
g_object_unref (mount);
@@ -778,7 +774,7 @@ update_places (GtkPlacesSidebar *sidebar)
_("Open the contents of the File System"));
g_object_unref (icon);
compare_for_selection (sidebar,
- location, mount_uri, last_uri,
+ sidebar->uri, mount_uri, last_uri,
&last_iter, &select_path);
mount_uri = "trash:///"; /* No need to strdup */
@@ -789,7 +785,7 @@ update_places (GtkPlacesSidebar *sidebar)
NULL, NULL, NULL, 0,
_("Open the trash"));
compare_for_selection (sidebar,
- location, mount_uri, last_uri,
+ sidebar->uri, mount_uri, last_uri,
&last_iter, &select_path);
g_object_unref (icon);
@@ -810,7 +806,7 @@ update_places (GtkPlacesSidebar *sidebar)
name, icon, mount_uri,
NULL, NULL, mount, 0, tooltip);
compare_for_selection (sidebar,
- location, mount_uri, last_uri,
+ sidebar->uri, mount_uri, last_uri,
&last_iter, &select_path);
g_object_unref (root);
g_object_unref (mount);
@@ -832,11 +828,9 @@ update_places (GtkPlacesSidebar *sidebar)
_("Browse the contents of the network"));
g_object_unref (icon);
compare_for_selection (sidebar,
- location, mount_uri, last_uri,
+ sidebar->uri, mount_uri, last_uri,
&last_iter, &select_path);
- g_free (location);
-
if (select_path != NULL) {
gtk_tree_selection_select_path (selection, select_path);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]