From bdb25d1ef84b1d0a9f82f5673a069b1ea3dffa6c Mon Sep 17 00:00:00 2001 From: Carlos Soriano Date: Thu, 5 Apr 2018 13:07:44 +0200 Subject: path-bar: Support starred and recent visuals So it has some nice icon showing. --- src/nautilus-pathbar.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c index 30cd15735..323950737 100644 --- a/src/nautilus-pathbar.c +++ b/src/nautilus-pathbar.c @@ -47,6 +47,8 @@ typedef enum OTHER_LOCATIONS_BUTTON, ROOT_BUTTON, HOME_BUTTON, + STARRED_BUTTON, + RECENT_BUTTON, MOUNT_BUTTON, STARRED_LOCATION_BUTTON } ButtonType; @@ -1818,6 +1820,16 @@ get_gicon (ButtonData *button_data) return get_gicon_for_mount (button_data); } + case STARRED_BUTTON: + { + return g_themed_icon_new ("starred-symbolic"); + } + + case RECENT_BUTTON: + { + return g_themed_icon_new ("document-open-recent-symbolic"); + } + default: return NULL; } @@ -1928,6 +1940,16 @@ setup_button_type (ButtonData *button_data, button_data->type = HOME_BUTTON; button_data->is_root = TRUE; } + else if (nautilus_is_recent_directory (location)) + { + button_data->type = RECENT_BUTTON; + button_data->is_root = TRUE; + } + else if (nautilus_is_starred_directory (location)) + { + button_data->type = STARRED_BUTTON; + button_data->is_root = TRUE; + } else if ((mount = nautilus_get_mounted_mount_for_root (location)) != NULL) { button_data->dir_name = g_mount_get_name (mount); @@ -2113,6 +2135,8 @@ make_button_data (NautilusPathBar *self, case HOME_BUTTON: case MOUNT_BUTTON: + case RECENT_BUTTON: + case STARRED_BUTTON: { button_data->label = gtk_label_new (NULL); child = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2); -- cgit v1.2.1