[PATCH] nautilus: overlay icons update to 'unrevisioned' and 'ignored' statuses

65 views
Skip to first unread message

André Felipe Dias

unread,
May 23, 2013, 9:05:51 PM5/23/13
to thg...@googlegroups.com
# HG changeset patch
# User André Felipe Dias <andre...@pronus.eng.br>
# Date 1369355958 10800
# Thu May 23 21:39:18 2013 -0300
# Node ID 175448498862b847dcff064e7d6735d3e7bb8bf4
# Parent 96275cf8d36474942e299868eefa16deb3bda243
nautilus: overlay icons update to 'unrevisioned' and 'ignored' statuses

The current nautilus-thg.py extension doesn't use the correct ovelay icons for
'unrevisioned' and 'ignored' statuses.
The latter points to emblem 'noread' that doesn't exist anymore in GNOME.
The implementation uses emblems available at /usr/share/icons/Humanity and
that resembles the ones used by TortoiseSVN.
For example, the unrevisioned emblem is a question mark
and the ignored emblem is a symbol that looks like 'forbidden'.

diff -r 96275cf8d364 -r 175448498862 contrib/nautilus-thg.py
--- a/contrib/nautilus-thg.py Thu May 23 00:54:27 2013 +0900
+++ b/contrib/nautilus-thg.py Thu May 23 21:39:18 2013 -0300
@@ -232,8 +232,8 @@
cache2state = {cachethg.UNCHANGED: ('default', 'clean'),
cachethg.ADDED: ('new', 'added'),
cachethg.MODIFIED: ('important', 'modified'),
- cachethg.UNKNOWN: (None, 'unrevisioned'),
- cachethg.IGNORED: ('noread', 'ignored'),
+ cachethg.UNKNOWN: ('dialog-question', 'unrevisioned'),
+ cachethg.IGNORED: ('edit-delete', 'ignored'),
cachethg.NOT_IN_REPO: (None, 'unrevisioned'),
cachethg.ROOT: ('generic', 'root'),
cachethg.UNRESOLVED: ('danger', 'unresolved')}

Yuya Nishihara

unread,
May 25, 2013, 10:38:45 AM5/25/13
to thg...@googlegroups.com
Probably 'noread' was renamed to 'unreadable'. Debian package contains a
symlink, emblem-noread.png -> emblem-unreadable.png.

I'm not familiar with Nautilus, but I guess these icons should be chosen
from emblems.

https://git.gnome.org/browse/gnome-icon-theme/tree/gnome/32x32/emblems

Regards,

André Felipe Dias

unread,
May 26, 2013, 9:05:13 AM5/26/13
to thg...@googlegroups.com
 I can't tell about Debian package, but in Ubuntu 12.04 and 13.04 there are no symlinks from emblem-noread.png to emblem-unreadable.png.

Anyway, I don't agree that icons should be chosen only from emblems since they are insufficient to convey all the states related to version control. The emblem-new icon for example is not semantically correct. It should be replaced by 'list-add'. There is no 'emblem-unkown' but the 'dialog-question' is close enough to the unrevisioned state and it exists in the gnome default icon set.

All that considered, I'd like to propose a new patch:

# HG changeset patch
# User André Felipe Dias <andre...@pronus.eng.br>
# Date 1369355958 10800
#      Thu May 23 21:39:18 2013 -0300
# Node ID ff2310b7775f4bf1fca6d8fc819321d9c8e2c370
# Parent  96275cf8d36474942e299868eefa16deb3bda243
nautilus: overlay icons update

The current nautilus-thg.py extension doesn't use the correct ovelay icons for
'added' and 'ignored' states
that should be replaced by 'list-add' and 'unreadable' icons respectively.
The UNKNOWN state has no associated icon,
but could use the 'dialog-question' one.

All suggested icons exist in the gnome default icon set.

diff -r 96275cf8d364 -r ff2310b7775f contrib/nautilus-thg.py
--- a/contrib/nautilus-thg.py Thu May 23 00:54:27 2013 +0900
+++ b/contrib/nautilus-thg.py Thu May 23 21:39:18 2013 -0300
@@ -230,10 +230,10 @@
     def _get_file_status(self, localpath, repo=None):
         cachestate = cachethg.get_state(localpath, repo)
         cache2state = {cachethg.UNCHANGED:   ('default',   'clean'),
-                       cachethg.ADDED:       ('new',       'added'),
+                       cachethg.ADDED:       ('list-add',  'added'),
                        cachethg.MODIFIED:    ('important', 'modified'),
-                       cachethg.UNKNOWN:     (None,        'unrevisioned'),
-                       cachethg.IGNORED:     ('noread',    'ignored'),
+                       cachethg.UNKNOWN:     ('dialog-question',   'unrevisioned'),
+                       cachethg.IGNORED:     ('unreadable', 'ignored'),

Yuya Nishihara

unread,
May 26, 2013, 10:18:12 AM5/26/13
to thg...@googlegroups.com
On Sun, 26 May 2013 06:05:13 -0700 (PDT), André Felipe Dias wrote:
> On Saturday, May 25, 2013 11:38:45 AM UTC-3, Yuya Nishihara wrote:
[...]
> > Probably 'noread' was renamed to 'unreadable'. Debian package contains a
> > symlink, emblem-noread.png -> emblem-unreadable.png.
> >
> > I'm not familiar with Nautilus, but I guess these icons should be chosen
> > from emblems.
> >
> > https://git.gnome.org/browse/gnome-icon-theme/tree/gnome/32x32/emblems
>
> I can't tell about Debian package, but in Ubuntu 12.04 and 13.04 there are
> no symlinks from emblem-noread.png to emblem-unreadable.png.
>
> Anyway, I don't agree that icons should be chosen only from emblems since
> they are insufficient to convey all the states related to version control.
> The emblem-new icon for example is not semantically correct. It should be
> replaced by 'list-add'. There is no 'emblem-unkown' but the
> 'dialog-question' is close enough to the unrevisioned state and it exists
> in the gnome default icon set.

My question is whether it is valid or not to specify non-emblem icons to
nautilus_file_info_add_emblem() API. Probably it works because of the following
commit [1], but it doesn't say he want to accept any type of icons.

[1]: https://git.gnome.org/browse/nautilus/commit/libnautilus-private/nautilus-file.c?id=46085d802f21ac42e916dc962f545ce6cc7f6591

RabbitVCS, for example, will install their own icons under emblem tree. [2]
It doesn't try to reuse non-emblem icons.

[2]: https://code.google.com/p/rabbitvcs/source/browse/trunk/data/icons/hicolor/scalable/emblems/

André Felipe Dias

unread,
May 26, 2013, 6:29:36 PM5/26/13
to thg...@googlegroups.com



2013/5/26 Yuya Nishihara <yu...@tcha.org>

On Sun, 26 May 2013 06:05:13 -0700 (PDT), André Felipe Dias wrote:
> On Saturday, May 25, 2013 11:38:45 AM UTC-3, Yuya Nishihara wrote:
[...]
> > Probably 'noread' was renamed to 'unreadable'. Debian package contains a
> > symlink, emblem-noread.png -> emblem-unreadable.png.
> >
> > I'm not familiar with Nautilus, but I guess these icons should be chosen
> > from emblems.
> >
> > https://git.gnome.org/browse/gnome-icon-theme/tree/gnome/32x32/emblems
>
>  I can't tell about Debian package, but in Ubuntu 12.04 and 13.04 there are
> no symlinks from emblem-noread.png to emblem-unreadable.png.
>
> Anyway, I don't agree that icons should be chosen only from emblems since
> they are insufficient to convey all the states related to version control.
> The emblem-new icon for example is not semantically correct. It should be
> replaced by 'list-add'. There is no 'emblem-unkown' but the
> 'dialog-question' is close enough to the unrevisioned state and it exists
> in the gnome default icon set.

My question is whether it is valid or not to specify non-emblem icons to
nautilus_file_info_add_emblem() API. Probably it works because of the following
commit [1], but it doesn't say he want to accept any type of icons.

 [1]: https://git.gnome.org/browse/nautilus/commit/libnautilus-private/nautilus-file.c?id=46085d802f21ac42e916dc962f545ce6cc7f6591


Since the commit message says 'Support emblem file names that do not start with “emblem-”',
it seems pretty safe to use any available icon. 

Regards,

André

Yuya Nishihara

unread,
May 27, 2013, 12:11:41 PM5/27/13
to thg...@googlegroups.com
Probably it was intended to support icons of "emblems" context not named as
"emblem-*".

https://bugzilla.gnome.org/show_bug.cgi?id=350643
https://www.google.com/search?q=stock_mail-priority-high

FWIW, XDG spec says

- Context - The context the icon is normally used in.
- The Context allows the designer to group icons on a conceptual level.
It doesn't act as a namespace in the file system, such that icons can have
identical names, ...

http://standards.freedesktop.org/icon-theme-spec/icon-theme-spec-latest.html#context

According to this, it will break nothing to use icons of "actions" context for
emblems, even though it seems less common.

Regards,

André Felipe Dias

unread,
May 27, 2013, 12:22:22 PM5/27/13
to thg...@googlegroups.com
So, will the patch be approved? Is there something else pending?

Regards,



2013/5/27 Yuya Nishihara <yu...@tcha.org>

--
You received this message because you are subscribed to a topic in the Google Groups "TortoiseHg Developers" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/thg-dev/8PpE5ECWUos/unsubscribe?hl=en.
To unsubscribe from this group and all its topics, send an email to thg-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



Yuya Nishihara

unread,
May 27, 2013, 12:35:25 PM5/27/13
to thg...@googlegroups.com
On Mon, 27 May 2013 13:22:22 -0300, André Felipe Dias wrote:
> So, will the patch be approved? Is there something else pending?

I'll wait Steve's comment because he'll know much than I.

I'm still confused to reuse action-type icons for emblems, even if it's
acceptable.

Regards,

Steve Borho

unread,
May 29, 2013, 9:30:46 PM5/29/13
to thg...@googlegroups.com
On Mon, May 27, 2013 at 11:22 AM, André Felipe Dias <andre...@gmail.com> wrote:
So, will the patch be approved? Is there something else pending?

I'm pretty pragmatic about the nautilus extension, just happy someone is looking at it.  If the change doesn't break any of the other major Linux distributions, I'm fine with it.

--
Steve

Yuya Nishihara

unread,
May 30, 2013, 9:34:25 AM5/30/13
to thg...@googlegroups.com
Ok. Gnome 3 should support icons without emblem- prefix, and it works fine
on Ubuntu 12.4, so pushed to stable.

Thanks for improvements.

Regards,
Reply all
Reply to author
Forward
0 new messages