emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

message-mode toolbars, was: Re: "Why is emacs so square?"


From: Dmitry Gutov
Subject: message-mode toolbars, was: Re: "Why is emacs so square?"
Date: Fri, 24 Apr 2020 06:25:30 +0300
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.4.1

On 22.04.2020 18:17, Clément Pit-Claudel wrote:
IIUC, the claim is that there (likely) are standard icons close to the ones we 
use, and that using the corresponding icon names would give us good-looking 
icons by default on Gtk.
Concretely, for the actions shown in the message toolbar, this would be these:

mail-attachment
document-send or mail-send
tools-check-spelling
mail-mark-important

Thanks for the list. Below is a patch that makes use of it.

The spec doesn't seem to have actions for marking an email unimportant or 
requesting an email receipt.

Unfortunately, it doesn't. Nothing for "save-draft" either, but we're currently using the "gtk-close" icon for that.

Also, I dug a little deeper into that rabbit hole, and turns out, Gnus normally defines two sets of icons for its toolbars. The first is called "gnome", and the other is "retro". And in 2016 the relevant check was reverted (commit d88118db37d), so we've been using the "retro" version since. I'm guessing Lars doesn't use GTK or toolbars at all.

It seems the two versions of toolbars have diverged in contents too, so aside from reverting a part of that commit, someone will need to do the work of merging them. Hopefully into one.

Anyway, here's the patch improving the icons a little:

diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index adefa0efd6..bb6a55dc80 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -7969,7 +7969,7 @@ message-tool-bar-gnome
     (mml-attach-file "attach" mml-mode-map :vert-only t)
     (mml-preview "mail/preview" mml-mode-map)
     (mml-secure-message-sign-encrypt "lock" mml-mode-map :visible nil)
-    (message-insert-importance-high "important" nil :visible nil)
+    (message-insert-importance-high "mail/important" nil :visible nil)
     (message-insert-importance-low "unimportant" nil :visible nil)
(message-insert-disposition-notification-to "receipt" nil :visible nil))
   "List of items for the message tool bar (GNOME style).
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index 5b8feb14a5..865a8bd4c5 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -1413,7 +1413,7 @@ x-gtk-stock-map
     ("etc/images/info" . ("dialog-information" "gtk-info"))
     ("etc/images/bookmark_add" . "n:bookmark_add")
     ;; Used in Gnus and/or MH-E:
-    ("etc/images/attach" . "gtk-attach")
+    ("etc/images/attach" . ("mail-attachment" "gtk-attach"))
     ("etc/images/connect" . "gtk-connect")
     ("etc/images/contact" . "gtk-contact")
     ("etc/images/delete" . ("edit-delete" "gtk-delete"))
@@ -1431,18 +1431,20 @@ x-gtk-stock-map
     ("etc/images/sort-descending" . ("view-sort-descending"
                                     "gtk-sort-descending"))
     ("etc/images/sort-row-ascending" . "gtk-sort-row-ascending")
+    ("etc/images/spell" . ("tools-check-spelling" "gtk-spell-check"))
     ("images/gnus/toggle-subscription" . "gtk-task-recurring")
     ("images/mail/compose" . "gtk-mail-compose")
     ("images/mail/copy" . "gtk-mail-copy")
     ("images/mail/forward" . "gtk-mail-forward")
     ("images/mail/inbox" . "gtk-inbox")
+    ("images/mail/important" . "mail-mark-important")
     ("images/mail/move" . "gtk-mail-move")
     ("images/mail/not-spam" . "gtk-not-spam")
     ("images/mail/outbox" . "gtk-outbox")
     ("images/mail/reply-all" . "gtk-mail-reply-to-all")
     ("images/mail/reply" . "gtk-mail-reply")
     ("images/mail/save-draft" . "gtk-mail-handling")
-    ("images/mail/send" . "gtk-mail-send")
+    ("images/mail/send" . ("mail-send" "gtk-mail-send"))
     ("images/mail/spam" . "gtk-spam")
     ;; Used for GDB Graphical Interface
     ("images/gud/break" . "gtk-no")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]