# HG changeset patch # User stephent # Date 1015332791 0 # Node ID 47ae55dda77746650afe313f3b222dd004111895 # Parent 177fa09febec159ceec5660bbcf021fe904d7814 [xemacs-hg @ 2002-03-05 12:53:10 by stephent] preserve window size on toolbar reposition <87664idofd.fsf@tleeps18.sk.tsukuba.ac.jp> diff -r 177fa09febec -r 47ae55dda777 lisp/ChangeLog --- a/lisp/ChangeLog Tue Mar 05 12:44:46 2002 +0000 +++ b/lisp/ChangeLog Tue Mar 05 12:53:11 2002 +0000 @@ -1,3 +1,11 @@ +2002-02-28 Stephen J. Turnbull + + * toolbar.el (toolbar-visible-p): + (toolbar-captioned-p): + Prefix * to docstring, improve line break. + (default-toolbar-position): Prefix * to docstring, improve line break. + Reconfigure frame to preserve window dimensions if toolbar is moved. + 2002-01-27 Stephen J. Turnbull * code-files.el (convert-mbox-coding-system): Improve comment. @@ -3658,7 +3666,7 @@ * gutter-items.el (make-search-dialog): Change to new callback-ex api. -2000-04-26 Bjrn Torkelsson +2000-04-26 Björn Torkelsson * help.el: (describe-installation): decode-coding-string is not defined in a non MULE environment. @@ -4534,7 +4542,7 @@ unexist function to help-map. (describe-coding-system): Don't use already assigend `C'. -2000-01-23 Bjrn Torkelsson +2000-01-23 Björn Torkelsson * info.el (Info-save-auto-generated-dir): nil -> 'never to make it work in custom. @@ -4570,7 +4578,7 @@ part of the tag entry first instead of only looking in the context area. -2000-01-23 Bjrn Torkelsson +2000-01-23 Björn Torkelsson * gutter-items.el: fixed typo(s) in customizing default-gutter-position * toobar.el: fixed typo(s) in customizing default-toolbar-position @@ -7953,7 +7961,7 @@ mswindows-make-font-bold / -bold-italic: Supplied device was not being passed into call to mswindows-find-smaller-font. -1998-09-10 Bjrn Torkelsson +1998-09-10 Björn Torkelsson * package-get.el (package-get-remote): Fix the path where to find the packages on xemacs.org. @@ -8716,7 +8724,7 @@ * sound.el: default sound-ext to .wav under mswindows, .au otherwise. load-default sounds without extensions. -1998-05-27 Bjrn Torkelsson +1998-05-27 Björn Torkelsson * menubar-items.el (default-menubar): Dim out "Submit Bug Report" if send-pr is not bound. diff -r 177fa09febec -r 47ae55dda777 lisp/toolbar.el --- a/lisp/toolbar.el Tue Mar 05 12:44:46 2002 +0000 +++ b/lisp/toolbar.el Tue Mar 05 12:53:11 2002 +0000 @@ -32,8 +32,8 @@ (defcustom toolbar-visible-p ;; added for the options menu - dverna apr. 98 (specifier-instance default-toolbar-visible-p) - "Whether the default toolbar is globally visible. This option can be -customized through the options menu." + "*Whether the default toolbar is globally visible. +This option can be customized through the options menu." :group 'display :type 'boolean :set #'(lambda (var val) @@ -43,8 +43,8 @@ (defcustom toolbar-captioned-p ;; added for the options menu - dverna apr. 98 (specifier-instance toolbar-buttons-captioned-p) - "Whether the toolbars buttons are globally captioned. This option can be -customized through the options menu." + "*Whether the toolbars buttons are globally captioned. +This option can be customized through the options menu." :group 'display :type 'boolean :set #'(lambda (var val) @@ -54,16 +54,26 @@ (defcustom default-toolbar-position ;; added for the options menu - dverna (default-toolbar-position) - "The location of the default toolbar. It can be 'top, 'bottom, 'left or -'right. This option can be customized through the options menu." + "*The location of the default toolbar: 'top, 'bottom, 'left, or 'right. +This option can be customized through the options menu." :group 'display :type '(choice (const :tag "top" top) (const :tag "bottom" bottom) (const :tag "left" left) (const :tag "right" right)) :set #'(lambda (var val) - (set-default-toolbar-position val) - (setq default-toolbar-position val)) + (let* ((height (window-height)) + (hdiff (- (frame-height) height)) + (width (window-width))) + (set-default-toolbar-position val) + (setq default-toolbar-position val) + ;; needed or dimensions don't update? + (redisplay-frame) + ;; This probably only works correctly if there is only one + ;; Emacs window. If windows are split, it probably results in + ;; small adjustments in their sizes. + (set-frame-size (selected-frame) width (+ height hdiff)) + ) ) (defvar toolbar-help-enabled t