[nautilus/414-superfluous-slash-label-on-the-file-system-root: 17/18] pathbar: Show label for filesystem root
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/414-superfluous-slash-label-on-the-file-system-root: 17/18] pathbar: Show label for filesystem root
- Date: Thu, 26 Jul 2018 17:28:16 +0000 (UTC)
commit e9ddcea8b487dc708cd1d537bb01c57e4757cb1f
Author: António Fernandes <antoniof gnome org>
Date: Thu Jul 26 14:59:36 2018 +0100
pathbar: Show label for filesystem root
When current location is "/", the pathbar is (icon)(slash)(arrow),
which looks bad because that's 3 symbols in sequence.
Also, the slash ("/") label duplicates the pathbar separator if
current location is a child.
Instead, call it "Computer", which is the label used in Other Locations
Fixes https://gitlab.gnome.org/GNOME/nautilus/issues/414
src/nautilus-pathbar.c | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
---
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
index 9d3a3ec91..fe87b7e80 100644
--- a/src/nautilus-pathbar.c
+++ b/src/nautilus-pathbar.c
@@ -308,6 +308,11 @@ get_dir_name (ButtonData *button_data)
{
switch (button_data->type)
{
+ case ROOT_BUTTON:
+ {
+ return _("Computer");
+ }
+
case HOME_BUTTON:
{
return _("Home");
@@ -1593,20 +1598,6 @@ make_button_data (NautilusPathBar *self,
switch (button_data->type)
{
case ROOT_BUTTON:
- {
- child = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 2);
- button_data->label = gtk_label_new (NULL);
- button_data->disclosure_arrow = gtk_image_new_from_icon_name ("pan-down-symbolic",
- GTK_ICON_SIZE_MENU);
- button_data->container = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
- gtk_box_pack_start (GTK_BOX (button_data->container), button_data->button, FALSE, FALSE, 0);
-
- gtk_box_pack_start (GTK_BOX (child), button_data->image, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (child), button_data->label, FALSE, FALSE, 0);
- gtk_box_pack_start (GTK_BOX (child), button_data->disclosure_arrow, FALSE, FALSE, 0);
- }
- break;
-
case HOME_BUTTON:
case MOUNT_BUTTON:
case RECENT_BUTTON:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]