[Tkabber-dev] r1043 - in trunk/tkabber: . plugins/unix plugins/windows

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sat Mar 10 22:29:19 MSK 2007


Author: sergei
Date: 2007-03-10 22:29:19 +0300 (Sat, 10 Mar 2007)
New Revision: 1043

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/plugins/unix/dockingtray.tcl
   trunk/tkabber/plugins/unix/systray.tcl
   trunk/tkabber/plugins/unix/tktray.tcl
   trunk/tkabber/plugins/windows/taskbar.tcl
Log:
	* plugins/windows/taskbar.tcl, plugins/unix/dockingtray.tcl,
	  plugins/unix/systray.tcl, plugins/unix/tktray.tcl: Added extra
	  checks for icon existence.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2007-03-10 16:18:58 UTC (rev 1042)
+++ trunk/tkabber/ChangeLog	2007-03-10 19:29:19 UTC (rev 1043)
@@ -22,6 +22,10 @@
 	* msgs/uk.msg: Updated Ukrainian translation (thanks to Artem
 	  Bondarenko).
 
+	* plugins/windows/taskbar.tcl, plugins/unix/dockingtray.tcl,
+	  plugins/unix/systray.tcl, plugins/unix/tktray.tcl: Added extra
+	  checks for icon existence.
+
 2007-03-09  Sergei Golovan  <sgolovan at nes.ru>
 
 	* ifacetk/iface.tcl, splash.tcl, tkabber.tcl: Withdraw main window at

Modified: trunk/tkabber/plugins/unix/dockingtray.tcl
===================================================================
--- trunk/tkabber/plugins/unix/dockingtray.tcl	2007-03-10 16:18:58 UTC (rev 1042)
+++ trunk/tkabber/plugins/unix/dockingtray.tcl	2007-03-10 19:29:19 UTC (rev 1043)
@@ -80,7 +80,9 @@
 proc dockingtray::configure {icon status} {
     variable s2p
 
-    $icon.mb configure -image $s2p($status)
+    if {![cequal $icon ""] && [winfo exists $icon]} {
+	$icon.mb configure -image $s2p($status)
+    }
 }
 
 ##########################################################################

Modified: trunk/tkabber/plugins/unix/systray.tcl
===================================================================
--- trunk/tkabber/plugins/unix/systray.tcl	2007-03-10 16:18:58 UTC (rev 1042)
+++ trunk/tkabber/plugins/unix/systray.tcl	2007-03-10 19:29:19 UTC (rev 1043)
@@ -80,7 +80,9 @@
 proc systray::configure {icon status} {
     variable s2p
 
-    configureti $icon -pixmap $s2p($status)
+    if {![cequal $icon ""] && [winfo exists $icon]} {
+	configureti $icon -pixmap $s2p($status)
+    }
 }
 
 ##########################################################################

Modified: trunk/tkabber/plugins/unix/tktray.tcl
===================================================================
--- trunk/tkabber/plugins/unix/tktray.tcl	2007-03-10 16:18:58 UTC (rev 1042)
+++ trunk/tkabber/plugins/unix/tktray.tcl	2007-03-10 19:29:19 UTC (rev 1043)
@@ -74,14 +74,14 @@
 proc tktray::configure {icon status} {
     variable s2p
 
-    $icon configure -image $s2p($status)
+    if {![cequal $icon ""] && [winfo exists $icon]} {
+	$icon configure -image $s2p($status)
+    }
 }
 
 ##########################################################################
 
 proc tktray::destroy {icon} {
-    variable engine
-
     if {![cequal $icon ""] && [winfo exists $icon]} {
 	::destroy $icon
     }
@@ -90,7 +90,11 @@
 ##########################################################################
 
 proc tktray::location {icon} {
-    return [lrange [$icon bbox] 0 1]
+    if {![cequal $icon ""] && [winfo exists $icon]} {
+	return [lrange [$icon bbox] 0 1]
+    } else {
+	return {0 0}
+    }
 }
 
 ##########################################################################

Modified: trunk/tkabber/plugins/windows/taskbar.tcl
===================================================================
--- trunk/tkabber/plugins/windows/taskbar.tcl	2007-03-10 16:18:58 UTC (rev 1042)
+++ trunk/tkabber/plugins/windows/taskbar.tcl	2007-03-10 19:29:19 UTC (rev 1043)
@@ -93,8 +93,10 @@
     variable icon
     variable s2p
 
-    winico taskbar modify $icon -pos $s2p($status) \
-	   -text [ifacetk::systray::balloon_text]
+    if {[info exists icon] && ![cequal $icon ""]} {
+	winico taskbar modify $icon -pos $s2p($status) \
+	       -text [ifacetk::systray::balloon_text]
+    }
 }
 
 ##########################################################################
@@ -102,7 +104,7 @@
 proc taskbar::destroy {m} {
     variable icon
 
-    if {![cequal $icon ""]} {
+    if {[info exists icon] && ![cequal $icon ""]} {
 	winico taskbar delete $icon
 	::destroy $m
     }



More information about the Tkabber-dev mailing list