diff options
author | Jan Djärv <jan.h.d@swipnet.se> | 2010-11-20 15:51:25 +0100 |
---|---|---|
committer | Jan Djärv <jan.h.d@swipnet.se> | 2010-11-20 15:51:25 +0100 |
commit | d2bd51898e48c2fd47a98a42654842a65feea7ad (patch) | |
tree | 445b7d1580622915a8b4d0e2886be772640face3 /lisp/tool-bar.el | |
parent | 0e7c0582af3a7ee210dfa6a1ab6c41b23bea1951 (diff) | |
download | emacs-d2bd51898e48c2fd47a98a42654842a65feea7ad.tar.gz |
Add keyword :vert-only for tool bar items with labels not shown horizontally.
* lisp/info.el (info-tool-bar-map): Add some :vert-only keywords.
* lisp/tool-bar.el (tool-bar-setup): Add some :vert-only keywords.
* src/dispextern.h (tool_bar_item_idx): Add TOOL_BAR_ITEM_VERT_ONLY.
* src/gtkutil.c (xg_make_tool_item): Take vert_only as argument.
Set important to ! vert_only.
(xg_show_toolbar_item): Don't show label horizontally if
tool item isn't important.
(update_frame_tool_bar): Get TOOL_BAR_ITEM_VERT_ONLY and pass it to
xg_make_tool_item, or update important on existing tool item.
* src/keyboard.c (QCvert_only): New variable.
(parse_tool_bar_item): Check for QCvert_only.
(syms_of_keyboard): Initialize QCvert_only.
Diffstat (limited to 'lisp/tool-bar.el')
-rw-r--r-- | lisp/tool-bar.el | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/lisp/tool-bar.el b/lisp/tool-bar.el index 6630d85cd3e..4b6fd970d8a 100644 --- a/lisp/tool-bar.el +++ b/lisp/tool-bar.el @@ -260,31 +260,33 @@ holds a keymap." ;; People say it's bad to have EXIT on the tool bar, since users ;; might inadvertently click that button. ;;(tool-bar-add-item-from-menu 'save-buffers-kill-emacs "exit") - (tool-bar-add-item-from-menu 'find-file "new" nil :label "New File") - (tool-bar-add-item-from-menu 'menu-find-file-existing "open") - (tool-bar-add-item-from-menu 'dired "diropen") - (tool-bar-add-item-from-menu 'kill-this-buffer "close") - (tool-bar-add-item-from-menu 'save-buffer "save" nil + (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 + :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 :vert-only t :visible '(or buffer-file-name (not (eq 'special (get major-mode 'mode-class))))) - (tool-bar-add-item-from-menu 'write-file "saveas" nil + (tool-bar-add-item-from-menu 'write-file "saveas" nil :vert-only t :visible '(or buffer-file-name (not (eq 'special (get major-mode 'mode-class))))) - (tool-bar-add-item-from-menu 'undo "undo" nil + (tool-bar-add-item-from-menu 'undo "undo" nil :vert-only t :visible '(not (eq 'special (get major-mode 'mode-class)))) (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [cut]) - "cut" nil + "cut" nil :vert-only t :visible '(not (eq 'special (get major-mode 'mode-class)))) (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [copy]) - "copy") + "copy" nil :vert-only t) (tool-bar-add-item-from-menu (lookup-key menu-bar-edit-menu [paste]) - "paste" nil + "paste" nil :vert-only t :visible '(not (eq 'special (get major-mode 'mode-class)))) (tool-bar-add-item-from-menu 'nonincremental-search-forward "search" |