1 ;;; mew-toolbar-frame.el -*-Emacs-Lisp-*-
4 ;;; Run Mew from toolbar in a separate frame.
7 ;;; Mew XEmacs ToolBar Frame
9 ;;; Time-stamp: <99/07/02 16:37:17 jado@sophia>
12 ;;; Require it when initialize.
16 (provide 'mew-toolbar-frame)
20 (setq toolbar-mail-reader 'Mew)
21 (setq toolbar-mail-commands-alist
22 (cons '(Mew . toolbar-mew) toolbar-mail-commands-alist))
24 (defvar toolbar-mail-use-separate-frame t
25 "*Whether Mew is invoked in a separate frame.")
26 (defvar toolbar-mail-frame nil
27 "The frame in which Mew is displayed.")
28 (defvar toolbar-mail-frame-plist nil
29 "*The properties of the frame in which mail is displayed.")
30 (define-obsolete-variable-alias 'toolbar-mail-frame-properties
31 'toolbar-mail-frame-plist)
34 "Run Mew in a separate frame."
36 (if (not toolbar-mail-use-separate-frame)
38 (unless (frame-live-p toolbar-mail-frame)
39 (setq toolbar-mail-frame (make-frame toolbar-mail-frame-plist))
40 (add-hook 'mew-suspend-hook
42 (when (frame-live-p toolbar-mail-frame)
43 (if (cdr (frame-list))
44 (delete-frame toolbar-mail-frame))
45 (setq toolbar-mail-frame nil))))
46 (add-hook 'mew-quit-hook
48 (when (frame-live-p toolbar-mail-frame)
49 (if (cdr (frame-list))
50 (delete-frame toolbar-mail-frame))
51 (setq toolbar-mail-frame nil))))
52 (select-frame toolbar-mail-frame)
54 (when (framep toolbar-mail-frame)
55 (when (frame-iconified-p toolbar-mail-frame)
56 (deiconify-frame toolbar-mail-frame))
57 (select-frame toolbar-mail-frame)
58 (raise-frame toolbar-mail-frame))))
60 ;;; mew-toolbar-frame.el ends here