all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] remove save and undo text on tool-bar for gtk version
@ 2020-09-30 16:48 Caio Henrique
  2020-09-30 16:58 ` Robert Pluim
  2020-09-30 17:00 ` Eli Zaretskii
  0 siblings, 2 replies; 5+ messages in thread
From: Caio Henrique @ 2020-09-30 16:48 UTC (permalink / raw)
  To: emacs-devel

[-- 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.
____________

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2020-09-30 17:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-30 16:48 [PATCH] remove save and undo text on tool-bar for gtk version Caio Henrique
2020-09-30 16:58 ` Robert Pluim
2020-09-30 17:32   ` Caio Henrique
2020-09-30 17:00 ` Eli Zaretskii
2020-09-30 17:30   ` Caio Henrique

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.