From b9c56ed9141749c64fa4533636751e2001799c32 Mon Sep 17 00:00:00 2001 From: yamaoka Date: Wed, 6 Jan 1999 22:22:43 +0000 Subject: [PATCH] ;; Commit by Tsukamoto-san by way of yamaoka. (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. --- ChangeLog | 10 ++++++++++ lisp/gnus-offline.el | 28 ++++++++++++++++++++++++---- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9299fc1..7951634 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +1999-01-06 Tsukamoto Tetsuo + + * 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 * lisp/gnus.el (gnus-version-number): Update to 6.10.052. diff --git a/lisp/gnus-offline.el b/lisp/gnus-offline.el index 3b3492b..a73f29e 100644 --- a/lisp/gnus-offline.el +++ b/lisp/gnus-offline.el @@ -1,5 +1,5 @@ ;;; 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 @@ -588,7 +588,7 @@ If value is nil , dialup line is disconnected status.") (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)) @@ -739,7 +739,11 @@ If value is nil , dialup line is disconnected status.") (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 () @@ -760,6 +764,7 @@ If value is nil , dialup line is disconnected status.") ;; (defun gnus-offline-define-menu-on-miee () "*Set and change menu bar on MIEE menu." + (let ((menu (if (featurep 'meadow) (easy-menu-change nil @@ -802,7 +807,9 @@ If value is nil , dialup line is disconnected status.") ["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. ;; @@ -835,6 +842,19 @@ If value is nil , dialup line is disconnected status.") ["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)))) ;; ;; Timer Function -- 1.7.10.4