[Tkabber] GPG button

Marshall Rose tkabber@jabber.ru
Thu, 9 Jan 2003 15:23:02 -0800

This is a multi-part message in MIME format.

Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

> Is it a bug? (for tkabber with GPG support)
> Menu->Services->Send message , click on the lock icon, the icon does not
> change, changes only the icon on toolbar.

here is a patch that fixes that.

alexey - please apply it.

however, it doesn't really address the problem because the value of the (empty)
to: field is updated without updating the triggers on the button. after studying
this for a while, i've come to the conclusion that it can't be properly fixed.

since each user in your roster has a pull-down menu that includes "Send
Message..." (with an encryption button that does work), this leads me to believe
that the correct solution is to omit the button altogether when the to: field is

alexey - comments?


Content-Type: text/plain;
Content-Disposition: attachment;
Content-Transfer-Encoding: 7bit

Index: messages.tcl
RCS file: /var/spool/cvs/tkabber/messages.tcl,v
retrieving revision 1.38
diff -u -r1.38 messages.tcl
--- messages.tcl	18 Dec 2002 20:23:43 -0000	1.38
+++ messages.tcl	9 Jan 2003 23:19:34 -0000
@@ -420,24 +420,24 @@
     set bbox1 [ButtonBox $mw.bottom.buttons1 -spacing 0]
     if {![cequal [info commands ::ssj::sign:toggleP] ""]} {
+	set b $bbox1.b[llength [winfo children $bbox1]]
 	$bbox1 add -image [message::signed:icon] \
 	       -helptype balloon -helptext [::msgcat::mc "Toggle signing"] \
 	       -height 24 -width 24 -relief link -bd 1 \
 	       -command ssj::sign:toggleP
 	ssj::signed:trace "
-	    $mw.bottom.signed configure -image \[message::signed:icon\]
+	    $b configure -image \[message::signed:icon\]
-	#pack $mw.bottom.signed -side left
     if {![cequal [info commands ::ssj::encrypt:toggleP] ""]} {
+	set b $bbox1.b[llength [winfo children $bbox1]]
 	$bbox1 add -image [message::encrypted:icon $to] \
 	       -helptype balloon -helptext [::msgcat::mc "Toggle encryption"] \
 	       -height 24 -width 24 -relief link -bd 1 \
-	       -command [list ssj::encrypt:toggleP $to]
+	       -command [list eval ssj::encrypt:toggleP $to]
 	ssj::encrypted:trace "
-	    $mw.bottom.encrypted configure -image \[message::encrypted:icon $to\]
+	    $b configure -image \[message::encrypted:icon $to\]
 	" $to
-	#pack $mw.bottom.encrypted -side left
     pack $bbox1 -side left -fill x -padx 2m -pady 2m