[nautilus] bookmarks: bookmarked saved searches should use the saved-search icon
- From: Stefano Teso <steso src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] bookmarks: bookmarked saved searches should use the saved-search icon
- Date: Sat, 26 Feb 2011 10:28:58 +0000 (UTC)
commit a5d4e41129e00461426312cdffa392b59ac30118
Author: Stefano Teso <steso src gnome org>
Date: Sat Feb 26 11:15:55 2011 +0100
bookmarks: bookmarked saved searches should use the saved-search icon
https://bugzilla.gnome.org/show_bug.cgi?id=643057
libnautilus-private/nautilus-bookmark.c | 9 ++++++++-
libnautilus-private/nautilus-icon-names.h | 1 +
2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/libnautilus-private/nautilus-bookmark.c b/libnautilus-private/nautilus-bookmark.c
index 426f935..744dfb8 100644
--- a/libnautilus-private/nautilus-bookmark.c
+++ b/libnautilus-private/nautilus-bookmark.c
@@ -191,11 +191,18 @@ nautilus_bookmark_set_icon_to_default (NautilusBookmark *bookmark)
{
GIcon *icon, *emblemed_icon, *folder;
GEmblem *emblem;
+ char *uri;
if (g_file_is_native (bookmark->details->location)) {
folder = g_themed_icon_new (NAUTILUS_ICON_FOLDER);
} else {
- folder = g_themed_icon_new (NAUTILUS_ICON_FOLDER_REMOTE);
+ uri = nautilus_bookmark_get_uri (bookmark);
+ if (g_str_has_prefix (uri, EEL_SEARCH_URI)) {
+ folder = g_themed_icon_new (NAUTILUS_ICON_FOLDER_SAVED_SEARCH);
+ } else {
+ folder = g_themed_icon_new (NAUTILUS_ICON_FOLDER_REMOTE);
+ }
+ g_free (uri);
}
if (nautilus_bookmark_uri_known_not_to_exist (bookmark)) {
diff --git a/libnautilus-private/nautilus-icon-names.h b/libnautilus-private/nautilus-icon-names.h
index 08c8d17..5d0115a 100644
--- a/libnautilus-private/nautilus-icon-names.h
+++ b/libnautilus-private/nautilus-icon-names.h
@@ -23,6 +23,7 @@
#define NAUTILUS_ICON_FOLDER_PUBLIC_SHARE "folder-publicshare"
#define NAUTILUS_ICON_FOLDER_TEMPLATES "folder-templates"
#define NAUTILUS_ICON_FOLDER_VIDEOS "folder-videos"
+#define NAUTILUS_ICON_FOLDER_SAVED_SEARCH "folder-saved-search"
/* Other icons */
#define NAUTILUS_ICON_TEMPLATE "text-x-generic-template"
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]