[nautilus] Place mounts with no volumes in Devices section of sidebar
- From: William Jon McCann <mccann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] Place mounts with no volumes in Devices section of sidebar
- Date: Wed, 22 Aug 2012 13:01:32 +0000 (UTC)
commit 06476bd37f77b9a07a267f31db9e486377d43a76
Author: William Jon McCann <jmccann redhat com>
Date: Tue Aug 21 17:03:39 2012 -0400
Place mounts with no volumes in Devices section of sidebar
https://bugzilla.gnome.org/show_bug.cgi?id=682353
src/nautilus-places-sidebar.c | 72 ++++++++++++++++++++--------------------
1 files changed, 36 insertions(+), 36 deletions(-)
---
diff --git a/src/nautilus-places-sidebar.c b/src/nautilus-places-sidebar.c
index 22b4e08..821f302 100644
--- a/src/nautilus-places-sidebar.c
+++ b/src/nautilus-places-sidebar.c
@@ -728,42 +728,6 @@ update_places (NautilusPlacesSidebar *sidebar)
_("Open the contents of the File System"));
g_object_unref (icon);
- /* add bookmarks */
- bookmark_count = nautilus_bookmark_list_length (sidebar->bookmarks);
-
- for (index = 0; index < bookmark_count; ++index) {
- bookmark = nautilus_bookmark_list_item_at (sidebar->bookmarks, index);
-
- if (nautilus_bookmark_uri_known_not_to_exist (bookmark)) {
- continue;
- }
-
- root = nautilus_bookmark_get_location (bookmark);
- file = nautilus_file_get (root);
-
- if (is_built_in_bookmark (file)) {
- g_object_unref (root);
- nautilus_file_unref (file);
- continue;
- }
- nautilus_file_unref (file);
-
- bookmark_name = nautilus_bookmark_get_name (bookmark);
- icon = nautilus_bookmark_get_icon (bookmark);
- mount_uri = nautilus_bookmark_get_uri (bookmark);
- tooltip = g_file_get_parse_name (root);
-
- add_place (sidebar, PLACES_BOOKMARK,
- SECTION_BOOKMARKS,
- bookmark_name, icon, mount_uri,
- NULL, NULL, NULL, index,
- tooltip);
- g_object_unref (root);
- g_object_unref (icon);
- g_free (mount_uri);
- g_free (tooltip);
- }
-
/* add mounts that has no volume (/etc/mtab mounts, ftp, sftp,...) */
mounts = g_volume_monitor_get_mounts (volume_monitor);
@@ -803,6 +767,42 @@ update_places (NautilusPlacesSidebar *sidebar)
}
g_list_free (mounts);
+ /* add bookmarks */
+ bookmark_count = nautilus_bookmark_list_length (sidebar->bookmarks);
+
+ for (index = 0; index < bookmark_count; ++index) {
+ bookmark = nautilus_bookmark_list_item_at (sidebar->bookmarks, index);
+
+ if (nautilus_bookmark_uri_known_not_to_exist (bookmark)) {
+ continue;
+ }
+
+ root = nautilus_bookmark_get_location (bookmark);
+ file = nautilus_file_get (root);
+
+ if (is_built_in_bookmark (file)) {
+ g_object_unref (root);
+ nautilus_file_unref (file);
+ continue;
+ }
+ nautilus_file_unref (file);
+
+ bookmark_name = nautilus_bookmark_get_name (bookmark);
+ icon = nautilus_bookmark_get_icon (bookmark);
+ mount_uri = nautilus_bookmark_get_uri (bookmark);
+ tooltip = g_file_get_parse_name (root);
+
+ add_place (sidebar, PLACES_BOOKMARK,
+ SECTION_BOOKMARKS,
+ bookmark_name, icon, mount_uri,
+ NULL, NULL, NULL, index,
+ tooltip);
+ g_object_unref (root);
+ g_object_unref (icon);
+ g_free (mount_uri);
+ g_free (tooltip);
+ }
+
/* network */
add_heading (sidebar, SECTION_NETWORK,
_("Network"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]