[Tkabber-dev] r1737 - in trunk/tkabber: . ifacetk

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sun Mar 15 20:32:49 MSK 2009


Author: sergei
Date: 2009-03-15 20:32:49 +0300 (Sun, 15 Mar 2009)
New Revision: 1737

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/ifacetk/systray.tcl
Log:
	* ifacetk/systray.tcl: Fixed creating popup menu when the main window
	  doesn't have a menubar yet.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2009-03-15 15:18:52 UTC (rev 1736)
+++ trunk/tkabber/ChangeLog	2009-03-15 17:32:49 UTC (rev 1737)
@@ -14,6 +14,9 @@
 	  theme name and clean themes array before reloading. This helps to
 	  load iconsets plugin.
 
+	* ifacetk/systray.tcl: Fixed creating popup menu when the main window
+	  doesn't have a menubar yet.
+
 2009-03-14  Sergei Golovan  <sgolovan at nes.ru>
 
 	* chats.tcl, muc.tcl: Converted chat and conference menus into dynamic

Modified: trunk/tkabber/ifacetk/systray.tcl
===================================================================
--- trunk/tkabber/ifacetk/systray.tcl	2009-03-15 15:18:52 UTC (rev 1736)
+++ trunk/tkabber/ifacetk/systray.tcl	2009-03-15 17:32:49 UTC (rev 1737)
@@ -107,27 +107,29 @@
     $m add separator
     
     menu $m.presence -title [::msgcat::mc "Presence"] -tearoff $tearoff
-    set pm [.mainframe getmenu presence]
-    set id [$pm index [::msgcat::mc "Available"]]
-    for {set i 0} {$i < 7} {incr i} {
-	if {[catch { $pm entryconfigure $id -label }]} {
-	    $m.presence add separator
-	} else {
-	    $m.presence add command \
-		-label [lindex [$pm entryconfigure $id -label] 4] \
-		-command  [lindex [$pm entryconfigure $id -command] 4]
-	}
-	incr id
-    }
 
+    $m.presence add command -label [::msgcat::mc "Available"] \
+		-command {set userstatus available}
+    $m.presence add command -label [::msgcat::mc "Free to chat"] \
+		-command {set userstatus chat}
+    $m.presence add command -label [::msgcat::mc "Away"] \
+		-command {set userstatus away}
+    $m.presence add command -label [::msgcat::mc "Extended away"] \
+		-command {set userstatus xa}
+    $m.presence add command -label [::msgcat::mc "Do not disturb"] \
+		-command {set userstatus dnd}
+    $m.presence add separator
+    $m.presence add command -label [::msgcat::mc "Change priority..."] \
+		-command change_priority_dialog
+
     $m add cascade -label [::msgcat::mc "Presence"] -menu $m.presence
-    set tm [.mainframe getmenu tkabber]
-    set id [$tm index [::msgcat::mc "Log in..."]]
-    for {set i 0} {$i < 3} {incr i} {
-        $m add command -label [lindex [$tm entryconfigure $id -label] 4] \
-		       -command  [lindex [$tm entryconfigure $id -command] 4]
-	incr id
-    }
+
+    $m add command -label [::msgcat::mc "Log in..."] \
+	   -command ::ifacetk::login_dialog
+    $m add command -label [::msgcat::mc "Log out"] \
+	   -command ::ifacetk::logout_dialog
+    $m add command -label [::msgcat::mc "Log out with reason..."] \
+	   -command show_logout_dialog
     $m add separator
     $m add command -label [::msgcat::mc "Show main window"] \
 		   -command [namespace code restore]



More information about the Tkabber-dev mailing list