Gnus development mailing list
 help / color / mirror / Atom feed
* Feature request: Plugged/Unplugged via Mouse-2
@ 2001-06-27 21:39 Pavel Janík
  2001-07-28 16:33 ` ShengHuo ZHU
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Janík @ 2001-06-27 21:39 UTC (permalink / raw)


Hi,

we can toggle topics off via Mouse-2 on "Topic" in the mode-line. What
about Mouse-2 on Unplugged to become Plugged and Mouse-2 on Plugged to
become Unplugged? It shouldn't be that hard - if no one will implement it
over weekend, I can do it myself.
-- 
Pavel Janík

printk(KERN_WARNING "Warning: defective CD-ROM (volume sequence
number). Enabling \"cruft\" mount option.\n");
                  -- 2.2.16 fs/isofs/inode.c


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Feature request: Plugged/Unplugged via Mouse-2
  2001-06-27 21:39 Feature request: Plugged/Unplugged via Mouse-2 Pavel Janík
@ 2001-07-28 16:33 ` ShengHuo ZHU
  2001-08-01  0:10   ` Pavel Janík
  0 siblings, 1 reply; 4+ messages in thread
From: ShengHuo ZHU @ 2001-07-28 16:33 UTC (permalink / raw)


Pavel@Janik.cz (Pavel Janík) writes:

> Hi,
> 
> we can toggle topics off via Mouse-2 on "Topic" in the mode-line. What
> about Mouse-2 on Unplugged to become Plugged and Mouse-2 on Plugged to
> become Unplugged? It shouldn't be that hard - if no one will implement it
> over weekend, I can do it myself.

Have you got this implemented?

ShengHuo


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Feature request: Plugged/Unplugged via Mouse-2
  2001-07-28 16:33 ` ShengHuo ZHU
@ 2001-08-01  0:10   ` Pavel Janík
  2001-08-01  0:52     ` ShengHuo ZHU
  0 siblings, 1 reply; 4+ messages in thread
From: Pavel Janík @ 2001-08-01  0:10 UTC (permalink / raw)
  Cc: ding

   From: ShengHuo ZHU <zsh@cs.rochester.edu>
   Date: Sat, 28 Jul 2001 09:33:06 -0700

Hi,

   > > we can toggle topics off via Mouse-2 on "Topic" in the mode-line. What
   > > about Mouse-2 on Unplugged to become Plugged and Mouse-2 on Plugged to
   > > become Unplugged? It shouldn't be that hard - if no one will implement it
   > > over weekend, I can do it myself.
   > 
   > Have you got this implemented?

yes, I have this implemented, but I do not think that this should be added
to Gnus as is, because it will not work for other Emacs flavors. But here
it is (maybe I should also add help-echo property there):

--- gnus/lisp/gnus-agent.el	Mon Jul 30 10:15:12 2001
+++ gnus-pj/lisp/gnus-agent.el	Wed Aug  1 01:57:19 2001
@@ -318,11 +318,17 @@
 	(setq gnus-plugged plugged)
 	(gnus-agent-possibly-synchronize-flags)
 	(gnus-run-hooks 'gnus-agent-plugged-hook)
-	(setcar (cdr gnus-agent-mode-status) " Plugged"))
+	(setcar (cdr gnus-agent-mode-status)
+		(propertize " Plugged"
+			    'local-map
+			    (make-mode-line-mouse2-map 'gnus-agent-toggle-plugged))))
     (gnus-agent-close-connections)
     (setq gnus-plugged plugged)
     (gnus-run-hooks 'gnus-agent-unplugged-hook)
-    (setcar (cdr gnus-agent-mode-status) " Unplugged"))
+    (setcar (cdr gnus-agent-mode-status)
+	    (propertize " Unplugged"
+			'local-map
+			(make-mode-line-mouse2-map 'gnus-agent-toggle-plugged))))
   (set-buffer-modified-p t))
 
 (defun gnus-agent-close-connections ()


-- 
Pavel Janík

You're right, this should be fixed. Do you happen to have a patch?
                  -- Rik van Riel in linux-kernel about VM bug


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Feature request: Plugged/Unplugged via Mouse-2
  2001-08-01  0:10   ` Pavel Janík
@ 2001-08-01  0:52     ` ShengHuo ZHU
  0 siblings, 0 replies; 4+ messages in thread
From: ShengHuo ZHU @ 2001-08-01  0:52 UTC (permalink / raw)


Pavel@Janik.cz (Pavel Janík) writes:

>    From: ShengHuo ZHU <zsh@cs.rochester.edu>
>    Date: Sat, 28 Jul 2001 09:33:06 -0700
> 
> Hi,
> 
>   > > we can toggle topics off via Mouse-2 on "Topic" in the mode-line. What
>   > > about Mouse-2 on Unplugged to become Plugged and Mouse-2 on Plugged to
>   > > become Unplugged? It shouldn't be that hard - if no one will implement it
>   > > over weekend, I can do it myself.
>   > 
>   > Have you got this implemented?
> 
> yes, I have this implemented, but I do not think that this should be added
> to Gnus as is, because it will not work for other Emacs flavors. But here
> it is (maybe I should also add help-echo property there):

Installed with modification. Thanks.

ShengHuo


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-08-01  0:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-06-27 21:39 Feature request: Plugged/Unplugged via Mouse-2 Pavel Janík
2001-07-28 16:33 ` ShengHuo ZHU
2001-08-01  0:10   ` Pavel Janík
2001-08-01  0:52     ` ShengHuo ZHU

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).