[Tkabber-dev] r1228 - in trunk/tkabber: . plugins/pep

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sun Sep 16 17:35:41 MSD 2007


Author: sergei
Date: 2007-09-16 17:35:40 +0400 (Sun, 16 Sep 2007)
New Revision: 1228

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/plugins/pep/user_tune.tcl
   trunk/tkabber/userinfo.tcl
Log:
	* userinfo.tcl: Fixed bug with reconfiguring photo after it is
	  destroyed.

	* plugins/pep/user_tune.tcl: Replaced positional arguments of publish
	  procedure by optional ones.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2007-09-10 17:16:03 UTC (rev 1227)
+++ trunk/tkabber/ChangeLog	2007-09-16 13:35:40 UTC (rev 1228)
@@ -1,3 +1,11 @@
+2007-09-16  Sergei Golovan  <sgolovan at nes.ru>
+
+	* userinfo.tcl: Fixed bug with reconfiguring photo after it is
+	  destroyed.
+
+	* plugins/pep/user_tune.tcl: Replaced positional arguments of publish
+	  procedure by optional ones.
+
 2007-09-08  Sergei Golovan  <sgolovan at nes.ru>
 
 	* msgs/de.msg, trans/de.msg: Updated German translation (thanks to

Modified: trunk/tkabber/plugins/pep/user_tune.tcl
===================================================================
--- trunk/tkabber/plugins/pep/user_tune.tcl	2007-09-10 17:16:03 UTC (rev 1227)
+++ trunk/tkabber/plugins/pep/user_tune.tcl	2007-09-16 13:35:40 UTC (rev 1228)
@@ -253,12 +253,24 @@
     set_status $msg
 }
 
-proc tune::publish {connid artist title track length source uri args} {
+proc tune::publish {connid args} {
     variable node
 
+    set artist ""
+    set title ""
+    set track ""
+    set length ""
+    set source ""
+    set uri ""
     set callback ""
     foreach {opt val} $args {
 	switch -- $opt {
+	    -artist  { set artist   $val }
+	    -title   { set title    $val }
+	    -track   { set track    $val }
+	    -length  { set length   $val }
+	    -source  { set source   $val }
+	    -uri     { set uri      $val }
 	    -command { set callback $val }
 	}
     }
@@ -401,8 +413,12 @@
 	if {[string equal $myjid [jlib::connection_jid $connid]] || \
 		[string equal $myjid [::msgcat::mc "All"]]} {
 	    publish $connid \
-		    $tuneartist $tunetitle $tunetrack $tunelength \
-		    $tunesource $tuneuri \
+		    -artist $tuneartist \
+		    -title $tunetitle \
+		    -track $tunetrack \
+		    -length $tunelength \
+		    -source $tunesource \
+		    -url $tuneuri \
 		    -command [namespace current]::publish_result
 	    break
 	}

Modified: trunk/tkabber/userinfo.tcl
===================================================================
--- trunk/tkabber/userinfo.tcl	2007-09-10 17:16:03 UTC (rev 1227)
+++ trunk/tkabber/userinfo.tcl	2007-09-16 13:35:40 UTC (rev 1228)
@@ -439,13 +439,19 @@
 proc userinfo::reconfigure_photo {jid} {
     set w [w_from_jid $jid]
     set tab $w.frame.tab
-    set p [[$tab getframe photo].photo getframe]
+
+    if {![winfo exists $tab]} return
+
+    set photo [$tab getframe photo].photo
+    set p [$photo getframe]
     set sw $p.sw
     set sf $p.sf
     set l [$sf getframe].photo
 
     update
 
+    if {![winfo exists $l]} return
+
     $sf configure -areawidth [max [winfo width $l] [winfo width $sw]] \
 		  -areaheight [max [winfo height $l] [winfo height $sw]]
 }



More information about the Tkabber-dev mailing list