comparison lisp/ediff/ediff-wind.el @ 12:bcdc7deadc19 r19-15b7

Import from CVS: tag r19-15b7
author cvs
date Mon, 13 Aug 2007 08:48:16 +0200
parents ac2d302a0011
children 9ee227acff29
comparison
equal deleted inserted replaced
11:91ffe8bd52e4 12:bcdc7deadc19
22 ;; Boston, MA 02111-1307, USA. 22 ;; Boston, MA 02111-1307, USA.
23 23
24 ;;; Code: 24 ;;; Code:
25 25
26 (require 'ediff-init) 26 (require 'ediff-init)
27 ;;(if ediff-xemacs-p
28 ;; (nil) (require 'ediff-tbar)
29 (defun ediff-compute-toolbar-width () 0)
27 30
28 ;; Compiler pacifier 31 ;; Compiler pacifier
29 (defvar icon-title-format) 32 (defvar icon-title-format)
30 (defvar top-toolbar-height) 33 (defvar top-toolbar-height)
31 (defvar bottom-toolbar-height) 34 (defvar bottom-toolbar-height)
851 dont-iconify-ctl-frame)) 854 dont-iconify-ctl-frame))
852 855
853 ;; 1 more line for the modeline 856 ;; 1 more line for the modeline
854 (setq lines (1+ (count-lines (point-min) (point-max))) 857 (setq lines (1+ (count-lines (point-min) (point-max)))
855 fheight lines 858 fheight lines
856 fwidth (+ (ediff-help-message-line-length) 2) 859 fwidth (max (+ (ediff-help-message-line-length) 2)
860 (ediff-compute-toolbar-width))
857 adjusted-parameters (append (list 861 adjusted-parameters (append (list
858 ;; possibly change surrogate minibuffer 862 ;; possibly change surrogate minibuffer
859 (cons 'minibuffer 863 (cons 'minibuffer
860 (minibuffer-window 864 (minibuffer-window
861 designated-minibuffer-frame)) 865 designated-minibuffer-frame))
874 (progn 878 (progn
875 (set-specifier top-toolbar-height (list ctl-frame 0)) 879 (set-specifier top-toolbar-height (list ctl-frame 0))
876 (set-specifier bottom-toolbar-height (list ctl-frame 0)) 880 (set-specifier bottom-toolbar-height (list ctl-frame 0))
877 (set-specifier left-toolbar-width (list ctl-frame 0)) 881 (set-specifier left-toolbar-width (list ctl-frame 0))
878 (set-specifier right-toolbar-width (list ctl-frame 0)) 882 (set-specifier right-toolbar-width (list ctl-frame 0))
879 ;; XEmacs needed a redisplay, as it had trouble setting
880 ;; height correctly otherwise.
881 ;;(sit-for 0)
882 )) 883 ))
883 884
884 ;; Under OS/2 (emx) we have to call modify frame parameters twice, in order 885 ;; Under OS/2 (emx) we have to call modify frame parameters twice, in order
885 ;; to make sure that at least once we do it for non-iconified frame. If 886 ;; to make sure that at least once we do it for non-iconified frame. If
886 ;; appears that in the OS/2 port of Emacs, one can't modify frame 887 ;; appears that in the OS/2 port of Emacs, one can't modify frame
891 892
892 (goto-char (point-min)) 893 (goto-char (point-min))
893 894
894 (modify-frame-parameters ctl-frame adjusted-parameters) 895 (modify-frame-parameters ctl-frame adjusted-parameters)
895 (make-frame-visible ctl-frame) 896 (make-frame-visible ctl-frame)
896 897 (ediff-make-bottom-toolbar) ; no effect if the toolbar is not requested
898
897 ;; This works around a bug in 19.25 and earlier. There, if frame gets 899 ;; This works around a bug in 19.25 and earlier. There, if frame gets
898 ;; iconified, the current buffer changes to that of the frame that 900 ;; iconified, the current buffer changes to that of the frame that
899 ;; becomes exposed as a result of this iconification. 901 ;; becomes exposed as a result of this iconification.
900 ;; So, we make sure the current buffer doesn't change. 902 ;; So, we make sure the current buffer doesn't change.
901 (select-frame ctl-frame) 903 (select-frame ctl-frame)
1059 1061
1060 ;; control buffer format 1062 ;; control buffer format
1061 (setq mode-line-format 1063 (setq mode-line-format
1062 (list (if (ediff-narrow-control-frame-p) " " "-- ") 1064 (list (if (ediff-narrow-control-frame-p) " " "-- ")
1063 mode-line-buffer-identification 1065 mode-line-buffer-identification
1064 " Quick Help")) 1066 " Quick Help"))
1065 ;; control buffer id 1067 ;; control buffer id
1066 (setq mode-line-buffer-identification 1068 (setq mode-line-buffer-identification
1067 (if (ediff-narrow-control-frame-p) 1069 (if (ediff-narrow-control-frame-p)
1068 (ediff-make-narrow-control-buffer-id 'skip-name) 1070 (ediff-make-narrow-control-buffer-id 'skip-name)
1069 (ediff-make-wide-control-buffer-id))) 1071 (ediff-make-wide-control-buffer-id)))
1187 (eq (window-buffer A-wind) ediff-buffer-A) 1189 (eq (window-buffer A-wind) ediff-buffer-A)
1188 (eq (window-buffer B-wind) ediff-buffer-B) 1190 (eq (window-buffer B-wind) ediff-buffer-B)
1189 (or (not ediff-3way-job) 1191 (or (not ediff-3way-job)
1190 (eq (window-buffer C-wind) ediff-buffer-C)) 1192 (eq (window-buffer C-wind) ediff-buffer-C))
1191 (string= ediff-window-config-saved 1193 (string= ediff-window-config-saved
1192 (format "\%S\%S\%S\%S\%S\%S\%S" 1194 (format "%S%S%S%S%S%S%S"
1193 ctl-wind A-wind B-wind C-wind 1195 ctl-wind A-wind B-wind C-wind
1194 ediff-split-window-function 1196 ediff-split-window-function
1195 (ediff-multiframe-setup-p) 1197 (ediff-multiframe-setup-p)
1196 ediff-wide-display-p))))))) 1198 ediff-wide-display-p)))))))
1197 1199
1198 1200
1199 ;;; Local Variables: 1201 ;;; Local Variables:
1200 ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun) 1202 ;;; eval: (put 'ediff-defvar-local 'lisp-indent-hook 'defun)
1201 ;;; eval: (put 'ediff-eval-in-buffer 'lisp-indent-hook 1) 1203 ;;; eval: (put 'ediff-eval-in-buffer 'lisp-indent-hook 1)
1204 ;;; eval: (put 'ediff-eval-in-buffer 'edebug-form-spec '(form body))
1202 ;;; End: 1205 ;;; End:
1203 1206
1204 (provide 'ediff-wind) 1207 (provide 'ediff-wind)
1205 1208
1206 1209