diff options
author | Cosimo Cecchi <cosimoc@gnome.org> | 2010-05-06 18:17:44 +0200 |
---|---|---|
committer | Cosimo Cecchi <cosimoc@gnome.org> | 2010-05-06 18:40:36 +0200 |
commit | 89fa909f3d406dd2e47006eeaaee051bef2b77d5 (patch) | |
tree | e18db2008b3a90c3921f7488678932e130fe6017 /src/nautilus-bookmark-list.c | |
parent | e6d70ef8a41bd0c6e6685f07e85e266e3227c61c (diff) | |
download | nautilus-89fa909f3d406dd2e47006eeaaee051bef2b77d5.tar.gz |
Set a 'folder-remote' icon if the URI is not native.
Also, port to the new API.
Diffstat (limited to 'src/nautilus-bookmark-list.c')
-rw-r--r-- | 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 0507a6608..d21b81481 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); |