[nautilus] Set a 'folder-remote' icon if the URI is not native.
- From: Cosimo Cecchi <cosimoc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] Set a 'folder-remote' icon if the URI is not native.
- Date: Thu, 6 May 2010 16:42:24 +0000 (UTC)
commit 89fa909f3d406dd2e47006eeaaee051bef2b77d5
Author: Cosimo Cecchi <cosimoc gnome org>
Date: Thu May 6 18:17:44 2010 +0200
Set a 'folder-remote' icon if the URI is not native.
Also, port to the new API.
src/nautilus-bookmark-list.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/src/nautilus-bookmark-list.c b/src/nautilus-bookmark-list.c
index 0507a66..d21b814 100644
--- a/src/nautilus-bookmark-list.c
+++ b/src/nautilus-bookmark-list.c
@@ -64,6 +64,7 @@ new_bookmark_from_uri (const char *uri, const char *label)
GIcon *icon;
gboolean has_label;
GFile *location;
+ gboolean native;
location = NULL;
if (uri) {
@@ -81,8 +82,9 @@ new_bookmark_from_uri (const char *uri, const char *label)
new_bookmark = NULL;
if (uri) {
+ native = g_file_is_native (location);
file = nautilus_file_get (location);
-
+
icon = NULL;
if (nautilus_file_check_if_ready (file,
NAUTILUS_FILE_ATTRIBUTES_FOR_ICON)) {
@@ -91,10 +93,11 @@ new_bookmark_from_uri (const char *uri, const char *label)
nautilus_file_unref (file);
if (icon == NULL) {
- icon = g_themed_icon_new (NAUTILUS_ICON_FOLDER);
+ icon = native ? g_themed_icon_new (NAUTILUS_ICON_FOLDER) :
+ g_themed_icon_new (NAUTILUS_ICON_FOLDER_REMOTE);
}
- new_bookmark = nautilus_bookmark_new_with_icon (location, name, has_label, icon);
+ new_bookmark = nautilus_bookmark_new (location, name, has_label, icon);
g_object_unref (icon);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]