static void nemo_bookmark_update_icon (NemoBookmark *bookmark) { GIcon *new_icon; if (bookmark->details->file == NULL) { return; } if (!nemo_file_is_local (bookmark->details->file)) { /* never update icons for remote bookmarks */ return; } if (!nemo_file_is_not_yet_confirmed (bookmark->details->file) && nemo_file_check_if_ready (bookmark->details->file, NEMO_FILE_ATTRIBUTES_FOR_ICON)) { DEBUG ("%s: set new icon", nemo_bookmark_get_name (bookmark)); new_icon = nemo_file_get_gicon (bookmark->details->file, 0); g_object_set (bookmark, "icon", new_icon, NULL); g_object_unref (new_icon); } }
static void nemo_bookmark_update_icon (NemoBookmark *bookmark) { gchar *new_icon_name; if (bookmark->details->file == NULL) { return; } if (!nemo_file_is_not_yet_confirmed (bookmark->details->file) && nemo_file_check_if_ready (bookmark->details->file, NEMO_FILE_ATTRIBUTES_FOR_ICON)) { DEBUG ("%s: set new icon", nemo_bookmark_get_name (bookmark)); new_icon_name = nemo_file_get_control_icon_name (bookmark->details->file); g_object_set (bookmark, "icon-name", new_icon_name, NULL); g_free (new_icon_name); } }