summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarlos Soriano <csoriano@gnome.org>2018-04-05 13:07:44 +0200
committerCarlos Soriano <csoriano@gnome.org>2018-04-05 13:07:44 +0200
commitbdb25d1ef84b1d0a9f82f5673a069b1ea3dffa6c (patch)
tree819fda9c0ce3aa1150b0ecf463dc4d7d1f391401
parentca523f91c58bd350ef05bf8d738900a98633ee3b (diff)
downloadnautilus-bdb25d1ef84b1d0a9f82f5673a069b1ea3dffa6c.tar.gz
path-bar: Support starred and recent visuals
So it has some nice icon showing.
-rw-r--r--src/nautilus-pathbar.c24
1 files changed, 24 insertions, 0 deletions
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);