[nautilus] pathbar: Show trash icon
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus] pathbar: Show trash icon
- Date: Mon, 27 Aug 2018 13:14:33 +0000 (UTC)
commit 95a11f8ce23f9d7023c0494a9a3aaab8e8c4d2d8
Author: Yi-Soo An <yisooan gmail com>
Date: Thu Aug 23 15:47:47 2018 +0900
pathbar: Show trash icon
Currently the pathbar in trash shows a slash instead of
the trash icon at the start.
It could cause a misunderstanding of where users are now.
To fix this issue, it shows the icon.
Fixes: https://gitlab.gnome.org/GNOME/nautilus/issues/567
src/nautilus-pathbar.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
---
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
index f68fec56b..295655f01 100644
--- a/src/nautilus-pathbar.c
+++ b/src/nautilus-pathbar.c
@@ -51,6 +51,7 @@ typedef enum
STARRED_BUTTON,
RECENT_BUTTON,
MOUNT_BUTTON,
+ TRASH_BUTTON,
} ButtonType;
#define BUTTON_DATA(x) ((ButtonData *) (x))
@@ -1288,6 +1289,11 @@ get_gicon (ButtonData *button_data)
return g_themed_icon_new ("list-add-symbolic");
}
+ case TRASH_BUTTON:
+ {
+ return nautilus_trash_monitor_get_symbolic_icon ();
+ }
+
default:
return NULL;
}
@@ -1401,6 +1407,11 @@ setup_button_type (ButtonData *button_data,
button_data->type = ADMIN_ROOT_BUTTON;
button_data->is_root = TRUE;
}
+ else if (strcmp (uri, "trash:///") == 0)
+ {
+ button_data->type = TRASH_BUTTON;
+ button_data->is_root = TRUE;
+ }
else
{
button_data->type = NORMAL_BUTTON;
@@ -1573,6 +1584,7 @@ make_button_data (NautilusPathBar *self,
case ADMIN_ROOT_BUTTON:
case HOME_BUTTON:
case MOUNT_BUTTON:
+ case TRASH_BUTTON:
case RECENT_BUTTON:
case STARRED_BUTTON:
case OTHER_LOCATIONS_BUTTON:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]