+1999-01-06 Tsukamoto Tetsuo <czkmt@remus.dti.ne.jp>
+
+ * lisp/gnus-offline.el (gnus-offline-popup-menu): New function.
+ (gnus-offline-define-menu-on-miee): Use `easy-menu-add' for adding
+ a menu under XEmacs.
+ (gnus-offline-define-menu-and-key): Don't set
+ `gnus-offline-popup-menu' to `gnus-group-mode-map' under XEmacs.
+ (gnus-offline-after-jobs-done): Don't call
+ `gnus-offline-agent-expire' if `gnus-agent-expire-all' is non-nil.
+
1999-01-04 Tatsuya Ichikawa <t-ichi@po.shiojiri.ne.jp>
* lisp/gnus.el (gnus-version-number): Update to 6.10.052.
;;; gnus-offline.el --- To process mail & news at offline environment.
-;;; $Id: gnus-offline.el,v 1.1.2.5.2.22 1998-12-16 13:21:50 ichikawa Exp $
+;;; $Id: gnus-offline.el,v 1.1.2.5.2.23 1999-01-06 22:22:40 yamaoka Exp $
;;; Copyright (C) 1998 Tatsuya Ichikawa
;;; Yukihiro Ito
(if (eq gnus-offline-articles-to-fetch 'mail)
(gnus-offline-restore-mail-group-level))
(if (eq gnus-offline-news-fetch-method 'nnagent)
- (or (featurep 'xemacs)
+ (or gnus-agent-expire-all
(gnus-offline-agent-expire)))
(if (and (featurep 'xemacs)
(fboundp 'play-sound-file))
(substitute-key-definition
'gnus-agent-toggle-plugged 'gnus-offline-toggle-plugged
gnus-agent-group-mode-map)
- (local-set-key "\C-coe" 'gnus-offline-agent-expire)))))
+ (local-set-key "\C-coe" 'gnus-offline-agent-expire)))
+ (or (featurep 'xemacs)
+ (define-key gnus-group-mode-map
+ (if (eq system-type 'windows-nt) [S-mouse-2] [mouse-3])
+ 'gnus-offline-popup-menu))))
(if (eq gnus-offline-news-fetch-method 'nnagent)
(add-hook 'gnus-summary-mode-hook
'(lambda ()
;;
(defun gnus-offline-define-menu-on-miee ()
"*Set and change menu bar on MIEE menu."
+ (let ((menu
(if (featurep 'meadow)
(easy-menu-change
nil
["Set interval time" gnus-offline-set-interval-time t]
"----"
["Hang up Line." gnus-offline-set-unplugged-state gnus-offline-connected]
- )))))
+ ))))))
+ (and (featurep 'xemacs)
+ (easy-menu-add menu))))
;;
;; define menu without miee.
;;
["Hang up Line." gnus-offline-set-unplugged-state gnus-offline-connected])))
(and (featurep 'xemacs)
(easy-menu-add gnus-offline-menu-on-agent)))
+;;
+;; Popup menu within the group buffer (under Emacs).
+;;
+(defun gnus-offline-popup-menu (event)
+ "Popup menu for Gnus offline."
+ (interactive "e")
+ (let* ((menu (or
+ (and (boundp 'miee-popup-menu)
+ (assoc 'keymap (assoc 'Miee (assoc 'menu-bar global-map))))
+ gnus-offline-menu-on-agent))
+ (pop (x-popup-menu t menu))
+ (func (and pop (lookup-key menu (apply 'vector pop)))))
+ (and pop func (funcall func))))
\f
;;
;; Timer Function