all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Caio Henrique <caiohcs0@gmail.com>
To: emacs-devel@gnu.org
Subject: [PATCH] remove save and undo text on tool-bar for gtk version
Date: Wed, 30 Sep 2020 13:48:53 -0300	[thread overview]
Message-ID: <87blhntdl6.fsf@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 493 bytes --]

Hi, these suggestions to improve the tool-bar consistency and also save
horizontal space got lost in the "Changes for emacs 28" discussion, so
I'm changing the subject. This only affects the gtk version, AFAIK windows
only shows the icons.

There were two proposals:
1 - remove :vertonly from all tool-bar items and change the default
value of tool-bar-style to image
2 - simply add :vertonly to save and undo

IMO option 1 is better, since option 2 makes the value text-image-horiz
useless.


[-- Attachment #2: tool bar gtk --]
[-- Type: image/png, Size: 28526 bytes --]

[-- Attachment #3: Type: text/plain, Size: 3690 bytes --]


Here is the 2nd proposal patch:
____________
diff --git a/lisp/tool-bar.el b/lisp/tool-bar.el
index 7df1e28e06..bec45c1ea4 100644
--- a/lisp/tool-bar.el
+++ b/lisp/tool-bar.el
@@ -256,9 +256,9 @@ tool-bar-setup
   (tool-bar-add-item-from-menu 'dired "diropen" nil :vert-only t)
   (tool-bar-add-item-from-menu 'kill-this-buffer "close" nil :vert-only t)
   (tool-bar-add-item-from-menu 'save-buffer "save" nil
-			       :label "Save")
+			       :label "Save" :vert-only t)
   (define-key-after (default-value 'tool-bar-map) [separator-1] menu-bar-separator)
-  (tool-bar-add-item-from-menu 'undo "undo" nil)
+  (tool-bar-add-item-from-menu 'undo "undo" nil :vert-only t)
   (define-key-after (default-value 'tool-bar-map) [separator-2] menu-bar-separator)
   (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [cut])
 			       "cut" nil :vert-only t)
____________


Here is the 1st proposal patch:
____________
diff --git a/lisp/tool-bar.el b/lisp/tool-bar.el
index 7df1e28e06..c45c7ae8ed 100644
--- a/lisp/tool-bar.el
+++ b/lisp/tool-bar.el
@@ -249,26 +249,19 @@ tool-bar-local-item-from-menu
 (defun tool-bar-setup ()
   (setq tool-bar-separator-image-expression
 	(tool-bar--image-expression "separator"))
-  (tool-bar-add-item-from-menu 'find-file "new" nil :label "New File"
-			       :vert-only t)
-  (tool-bar-add-item-from-menu 'menu-find-file-existing "open" nil
-			       :label "Open" :vert-only t)
-  (tool-bar-add-item-from-menu 'dired "diropen" nil :vert-only t)
-  (tool-bar-add-item-from-menu 'kill-this-buffer "close" nil :vert-only t)
-  (tool-bar-add-item-from-menu 'save-buffer "save" nil
-			       :label "Save")
+  (tool-bar-add-item-from-menu 'find-file "new" nil :label "New File")
+  (tool-bar-add-item-from-menu 'menu-find-file-existing "open" nil :label "Open")
+  (tool-bar-add-item-from-menu 'dired "diropen" nil)
+  (tool-bar-add-item-from-menu 'kill-this-buffer "close" nil)
+  (tool-bar-add-item-from-menu 'save-buffer "save" nil :label "Save")
   (define-key-after (default-value 'tool-bar-map) [separator-1] menu-bar-separator)
   (tool-bar-add-item-from-menu 'undo "undo" nil)
   (define-key-after (default-value 'tool-bar-map) [separator-2] menu-bar-separator)
-  (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [cut])
-			       "cut" nil :vert-only t)
-  (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [copy])
-			       "copy" nil :vert-only t)
-  (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [paste])
-			       "paste" nil :vert-only t)
+  (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [cut]) "cut" nil)
+  (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [copy]) "copy" nil)
+  (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [paste]) "paste" nil)
   (define-key-after (default-value 'tool-bar-map) [separator-3] menu-bar-separator)
-  (tool-bar-add-item-from-menu 'isearch-forward "search"
-			       nil :label "Search" :vert-only t)
+  (tool-bar-add-item-from-menu 'isearch-forward "search" nil :label "Search")
   ;;(tool-bar-add-item-from-menu 'ispell-buffer "spell")
 
   ;; There's no icon appropriate for News and we need a command rather
diff --git a/src/xdisp.c b/src/xdisp.c
index 152946363e..673be19b51 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -34993,7 +34993,7 @@ syms_of_xdisp (void)
  any other        - use system default or image if no system default.
 
 This variable only affects the GTK+ toolkit version of Emacs.  */);
-  Vtool_bar_style = Qnil;
+  Vtool_bar_style = Qimage;
 
   DEFVAR_INT ("tool-bar-max-label-size", tool_bar_max_label_size,
     doc: /* Maximum number of characters a label can have to be shown.
____________

             reply	other threads:[~2020-09-30 16:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-30 16:48 Caio Henrique [this message]
2020-09-30 16:58 ` [PATCH] remove save and undo text on tool-bar for gtk version Robert Pluim
2020-09-30 17:32   ` Caio Henrique
2020-09-30 17:00 ` Eli Zaretskii
2020-09-30 17:30   ` Caio Henrique

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87blhntdl6.fsf@gmail.com \
    --to=caiohcs0@gmail.com \
    --cc=emacs-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.