* wl-vars.el (wl-folder-use-frame): New user option.
authorteranisi <teranisi>
Wed, 13 Jun 2001 02:13:45 +0000 (02:13 +0000)
committerteranisi <teranisi>
Wed, 13 Jun 2001 02:13:45 +0000 (02:13 +0000)
* wl-summary.el (wl-summary-exit): Back to folder frame if
wl-folder-use-frame is non-nil.
(wl-summary-redisplay-internal): Ignore cache
if current folder is draft folder.
(wl-summary-redisplay-no-mime): Ditto.
(wl-summary-redisplay-all-header): Ditto.

* wl-folder.el (wl-folder-select-buffer): Switch to other frame
if wl-folder-use-frame is non-nil.

wl/ChangeLog
wl/wl-folder.el
wl/wl-summary.el
wl/wl-vars.el

index 9d940e1..19dba05 100644 (file)
@@ -1,3 +1,17 @@
+2001-06-13  Yuuichi Teranishi  <teranisi@gohome.org>
+
+       * wl-vars.el (wl-folder-use-frame): New user option.
+
+       * wl-summary.el (wl-summary-exit): Back to folder frame if
+       wl-folder-use-frame is non-nil.
+       (wl-summary-redisplay-internal): Ignore cache
+       if current folder is draft folder.
+       (wl-summary-redisplay-no-mime): Ditto.
+       (wl-summary-redisplay-all-header): Ditto.
+
+       * wl-folder.el (wl-folder-select-buffer): Switch to other frame
+       if wl-folder-use-frame is non-nil.
+
 2001-06-03  TAKAHASHI Kaoru  <kaoru@kaisei.org>
 
        * wl-folder.el (wl-folder-guess-mailing-list-by-folder-name):
index 7c53b55..7afc18d 100644 (file)
@@ -1286,19 +1286,21 @@ If current line is group folder, all subfolders are marked."
 
 (defun wl-folder-select-buffer (buffer)
   (let ((gbw (get-buffer-window buffer))
-       ret-val)
+       exists)
     (if gbw
        (progn (select-window gbw)
-              (setq ret-val t))
-      (condition-case ()
-         (unwind-protect
-             (split-window-horizontally wl-folder-window-width)
-           (other-window 1))
-       (error nil)))
+              (setq exists t))
+      (unless wl-folder-use-frame
+       (condition-case ()
+           (unwind-protect
+               (split-window-horizontally wl-folder-window-width)
+             (other-window 1))
+         (error nil))))
     (set-buffer buffer)
-    (switch-to-buffer buffer)
-    ret-val
-    ))
+    (if wl-folder-use-frame
+       (switch-to-buffer-other-frame buffer)
+      (switch-to-buffer buffer))
+    exists))
 
 (defun wl-folder-toggle-disp-summary (&optional arg folder)
   (interactive)
index 5fdbbe8..b9392a3 100644 (file)
@@ -1077,12 +1077,25 @@ Entering Folder mode calls the value of `wl-summary-mode-hook'."
        (if (setq message-buf (get-buffer wl-message-buf-name))
            (if (setq message-win (get-buffer-window message-buf))
                (delete-window message-win)))
+       (if (and wl-folder-use-frame
+                (> (length (visible-frame-list)) 1))
+           (delete-frame))
        (if (setq folder-buf (get-buffer wl-folder-buffer-name))
-           (if (setq folder-win (get-buffer-window folder-buf))
-               ;; folder win is already displayed.
-               (select-window folder-win)
-             ;; folder win is not displayed.
-             (switch-to-buffer folder-buf))
+           (if wl-folder-use-frame
+               (let (select-frame)
+                 (save-selected-window
+                   (dolist (frame (visible-frame-list))
+                     (select-frame frame)
+                     (if (get-buffer-window folder-buf)
+                         (setq select-frame frame))))
+                 (if select-frame
+                     (select-frame select-frame)
+                   (switch-to-buffer folder-buf)))
+             (if (setq folder-win (get-buffer-window folder-buf))
+                 ;; folder win is already displayed.
+                 (select-window folder-win)
+               ;; folder win is not displayed.
+               (switch-to-buffer folder-buf)))
          ;; currently no folder buffer
          (wl-folder))
        (and wl-folder-move-cur-folder
@@ -5416,7 +5429,10 @@ Use function list is `wl-summary-write-current-folder-functions'."
              (if (setq fld-win (get-buffer-window fld-buf))
                  (delete-window fld-win)))
           (setq wl-current-summary-buffer (current-buffer))
-         (if (wl-message-redisplay fld num 'mime msgdb force-reload)
+         (if (wl-message-redisplay fld num 'mime msgdb
+                                   (or force-reload
+                                       ;; if draft folder, force reload.
+                                       (string= fld wl-draft-folder)))
              (wl-summary-mark-as-read nil
                                       ;; cached, then change server-mark.
                                       (if wl-message-cache-used
@@ -5458,7 +5474,9 @@ Use function list is `wl-summary-write-current-folder-functions'."
          (setq wl-summary-buffer-last-displayed-msg
                wl-summary-buffer-current-msg)
          (setq wl-current-summary-buffer (current-buffer))
-         (wl-normal-message-redisplay fld num 'no-mime msgdb)
+         (wl-normal-message-redisplay fld num 'no-mime msgdb
+                                      ;; if draft folder, force reload.
+                                      (string= fld wl-draft-folder))
          (wl-summary-mark-as-read nil nil t)
          (setq wl-summary-buffer-current-msg num)
          (when wl-summary-recenter
@@ -5485,7 +5503,9 @@ Use function list is `wl-summary-write-current-folder-functions'."
          (setq wl-summary-buffer-last-displayed-msg
                wl-summary-buffer-current-msg)
          (setq wl-current-summary-buffer (current-buffer))
-         (if (wl-message-redisplay fld num 'all-header msgdb); t if displayed.
+         (if (wl-message-redisplay fld num 'all-header msgdb
+                                   ;; if draft folder, force reload.
+                                   (string= fld wl-draft-folder))
              (wl-summary-mark-as-read nil nil t))
          (setq wl-summary-buffer-current-msg num)
          (when wl-summary-recenter
index cf0b3ad..0c6f17d 100644 (file)
@@ -1152,6 +1152,11 @@ Each elements are regexp of field-name."
   :group 'wl-summary
   :group 'wl-pref)
 
+(defcustom wl-folder-use-frame nil
+  "*Use dedicated frame for each folder if non-nil."
+  :type 'boolean
+  :group 'wl-pref)
+
 (defcustom wl-stay-folder-window nil
   "*Stay folder window when folder is selected if non-nil."
   :type 'boolean