[Tkabber-dev] r711 - in trunk/tkabber: . ifacetk jabberlib-tclxml pixmaps/default/services pixmaps/default/tkabber pixmaps/gabber/services pixmaps/jajc/services pixmaps/kroc/services plugins/windows

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Tue Sep 12 20:34:32 MSD 2006


Author: sergei
Date: 2006-09-12 20:34:01 +0400 (Tue, 12 Sep 2006)
New Revision: 711

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/ifacetk/idefault.tcl
   trunk/tkabber/ifacetk/iface.tcl
   trunk/tkabber/jabberlib-tclxml/jabberlib.tcl
   trunk/tkabber/pixmaps/default/services/aim_away.gif
   trunk/tkabber/pixmaps/default/services/aim_chat.gif
   trunk/tkabber/pixmaps/default/services/aim_dnd.gif
   trunk/tkabber/pixmaps/default/services/aim_online.gif
   trunk/tkabber/pixmaps/default/services/aim_xa.gif
   trunk/tkabber/pixmaps/default/services/icq_chat.gif
   trunk/tkabber/pixmaps/default/services/msn_away.gif
   trunk/tkabber/pixmaps/default/services/msn_xa.gif
   trunk/tkabber/pixmaps/default/services/rss_away.gif
   trunk/tkabber/pixmaps/default/services/rss_chat.gif
   trunk/tkabber/pixmaps/default/services/rss_offline.gif
   trunk/tkabber/pixmaps/default/services/rss_online.gif
   trunk/tkabber/pixmaps/default/services/rss_xa.gif
   trunk/tkabber/pixmaps/default/tkabber/chat-bookmark.gif
   trunk/tkabber/pixmaps/gabber/services/aim_away.gif
   trunk/tkabber/pixmaps/gabber/services/aim_chat.gif
   trunk/tkabber/pixmaps/gabber/services/aim_dnd.gif
   trunk/tkabber/pixmaps/gabber/services/aim_offline.gif
   trunk/tkabber/pixmaps/gabber/services/aim_online.gif
   trunk/tkabber/pixmaps/gabber/services/aim_xa.gif
   trunk/tkabber/pixmaps/gabber/services/icq_chat.gif
   trunk/tkabber/pixmaps/gabber/services/msn_away.gif
   trunk/tkabber/pixmaps/gabber/services/msn_chat.gif
   trunk/tkabber/pixmaps/gabber/services/msn_dnd.gif
   trunk/tkabber/pixmaps/gabber/services/msn_online.gif
   trunk/tkabber/pixmaps/gabber/services/msn_xa.gif
   trunk/tkabber/pixmaps/gabber/services/rss_away.gif
   trunk/tkabber/pixmaps/gabber/services/rss_offline.gif
   trunk/tkabber/pixmaps/gabber/services/rss_xa.gif
   trunk/tkabber/pixmaps/gabber/services/sms.gif
   trunk/tkabber/pixmaps/gabber/services/yahoo_away.gif
   trunk/tkabber/pixmaps/gabber/services/yahoo_chat.gif
   trunk/tkabber/pixmaps/gabber/services/yahoo_dnd.gif
   trunk/tkabber/pixmaps/gabber/services/yahoo_offline.gif
   trunk/tkabber/pixmaps/gabber/services/yahoo_online.gif
   trunk/tkabber/pixmaps/gabber/services/yahoo_xa.gif
   trunk/tkabber/pixmaps/jajc/services/aim_dnd.gif
   trunk/tkabber/pixmaps/jajc/services/icq_away.gif
   trunk/tkabber/pixmaps/jajc/services/msn_dnd.gif
   trunk/tkabber/pixmaps/jajc/services/yahoo_offline.gif
   trunk/tkabber/pixmaps/kroc/services/aim_dnd.gif
   trunk/tkabber/pixmaps/kroc/services/icq_away.gif
   trunk/tkabber/pixmaps/kroc/services/msn_dnd.gif
   trunk/tkabber/pixmaps/kroc/services/rss_away.gif
   trunk/tkabber/pixmaps/kroc/services/rss_chat.gif
   trunk/tkabber/pixmaps/kroc/services/rss_offline.gif
   trunk/tkabber/pixmaps/kroc/services/rss_online.gif
   trunk/tkabber/pixmaps/kroc/services/rss_xa.gif
   trunk/tkabber/pixmaps/kroc/services/yahoo_offline.gif
   trunk/tkabber/plugins/windows/console.tcl
   trunk/tkabber/plugins/windows/mousewheel.tcl
   trunk/tkabber/utils.tcl
Log:
	* pixmaps/*: Fixed corrupt pixmaps.

	* ifacetk/idefault.tcl: Added virtual events for scrolling up,
	  down, left, and right.

	* util.tcl: Increased horizontal mouswheel scroll increment. Use
	  virtual events for scrolling.

	* plugins/windows/mouswheel.tcl: Added horizontal scrolling using
	  mousewheel key. Use virtual events for scrolling.

	* ifacetk/iface.tcl: Use virtual scrolling events for tab
	  switching using mousewheel.

	* plugins/windows/console.tcl: Added missing Id keyword.

	* jabberlib-tclxml/jabberlib.tcl: Added xml packet size logging
	  possibility. It can be used for traffic accounting (thanks to
	  Artem A.).


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2006-09-10 18:01:50 UTC (rev 710)
+++ trunk/tkabber/ChangeLog	2006-09-12 16:34:01 UTC (rev 711)
@@ -1,3 +1,25 @@
+2006-09-12  Sergei Golovan  <sgolovan at nes.ru>
+
+	* pixmaps/*: Fixed corrupt pixmaps.
+
+	* ifacetk/idefault.tcl: Added virtual events for scrolling up,
+	  down, left, and right.
+
+	* util.tcl: Increased horizontal mouswheel scroll increment. Use
+	  virtual events for scrolling.
+
+	* plugins/windows/mouswheel.tcl: Added horizontal scrolling using
+	  mousewheel key. Use virtual events for scrolling.
+
+	* ifacetk/iface.tcl: Use virtual scrolling events for tab
+	  switching using mousewheel.
+
+	* plugins/windows/console.tcl: Added missing Id keyword.
+
+	* jabberlib-tclxml/jabberlib.tcl: Added xml packet size logging
+	  possibility. It can be used for traffic accounting (thanks to
+	  Artem A.).
+
 2006-09-10  Sergei Golovan  <sgolovan at nes.ru>
 
 	* roster.tcl, pixmaps/*/icondef.xml: Replaced x-gadugadu gateway

Modified: trunk/tkabber/ifacetk/idefault.tcl
===================================================================
--- trunk/tkabber/ifacetk/idefault.tcl	2006-09-10 18:01:50 UTC (rev 710)
+++ trunk/tkabber/ifacetk/idefault.tcl	2006-09-12 16:34:01 UTC (rev 711)
@@ -70,6 +70,13 @@
     option add *Entry.font font widgetDefault
 }
 
+event add <<ScrollUp>>    <4>
+event add <<ScrollDown>>  <5>
+event add <<ScrollLeft>>  <6>
+event add <<ScrollRight>> <7>
+event add <<ScrollLeft>>  <Shift-4>
+event add <<ScrollRight>> <Shift-5>
+
 if {$::tcl_platform(platform) == "windows"} {
 
     # workaround for shortcuts in russian keyboard layout

Modified: trunk/tkabber/ifacetk/iface.tcl
===================================================================
--- trunk/tkabber/ifacetk/iface.tcl	2006-09-10 18:01:50 UTC (rev 710)
+++ trunk/tkabber/ifacetk/iface.tcl	2006-09-12 16:34:01 UTC (rev 711)
@@ -773,8 +773,8 @@
 	    }
 
 	.nb bindtabs <3> [list [namespace current]::tab_menu %X %Y]
-	.nb bindtabs <4> [list [namespace current]::tab_move .nb -1]
-	.nb bindtabs <5> [list [namespace current]::tab_move .nb 1]
+	.nb bindtabs <<ScrollUp>> [list [namespace current]::tab_move .nb -1]
+	.nb bindtabs <<ScrollDown>> [list [namespace current]::tab_move .nb 1]
 
 	DragSite::register .nb.c -draginitcmd [namespace current]::draginitcmd
 	DropSite::register .nb.c -dropovercmd [namespace current]::dropovercmd \

Modified: trunk/tkabber/jabberlib-tclxml/jabberlib.tcl
===================================================================
--- trunk/tkabber/jabberlib-tclxml/jabberlib.tcl	2006-09-10 18:01:50 UTC (rev 710)
+++ trunk/tkabber/jabberlib-tclxml/jabberlib.tcl	2006-09-12 16:34:01 UTC (rev 711)
@@ -273,6 +273,7 @@
     set lib($connid,keyfile) $keyfile
     set lib($connid,send_to) $send_to
     set lib($connid,disconnecting) 0
+    set lib($connid,bytes_counter) 0
 
     catch { unset lib($connid,features) }
     set lib($connid,version) 0.0
@@ -461,6 +462,7 @@
 		       -vars [list xmlns $::NS(iq-auth)]]]
     }
     set lib($connid,sessionid) $sessionid
+    set lib($connid,bytes_counter) 0
 }
 
 ######################################################################
@@ -589,6 +591,8 @@
 			       [namespace current]::out_keepalive $connid]
     }
 
+    incr lib($connid,bytes_counter) [string bytelength $msg]
+
     ::LOG "(jlib::inmsg) ($connid) '$msg'"
     ::LOG_INPUT $connid $msg
     wrapper:parser $lib($connid,wrap) parse $msg
@@ -802,7 +806,14 @@
 ######################################################################
 
 proc jlib::parse {connid xmldata} {
+
+    variable lib
+    set size 0
+    catch {set size $lib($connid,bytes_counter) }
+    set lib($connid,bytes_counter) 0
+    
     after idle [list [namespace current]::parse1 $connid $xmldata]
+    after idle [list ::LOG_INPUT_SIZE $connid $xmldata $size]
 }
 
 proc jlib::parse1 {connid xmldata} {
@@ -1384,7 +1395,9 @@
 	set data [wrapper:createtag iq -vars $vars]
     }
     ::LOG_OUTPUT_XML $connid $data
-    outmsg [wrapper:createxml $data] -connection $connid
+    set text [wrapper:createxml $data] 
+    ::LOG_OUTPUT_SIZE $connid $data [string bytelength $text] 
+    outmsg $text -connection $connid 
 }
 
 ######################################################################
@@ -1502,7 +1515,9 @@
 
     set data [wrapper:createtag message -vars $vars -subtags $children]
     ::LOG_OUTPUT_XML $connid $data
-    outmsg [wrapper:createxml $data] -connection $connid
+    set text [wrapper:createxml $data] 
+    ::LOG_OUTPUT_SIZE $connid $data [string bytelength $text] 
+    outmsg $text -connection $connid 
 }
 
 ######################################################################
@@ -1580,7 +1595,9 @@
 
     set data [wrapper:createtag presence -vars $vars -subtags $children]
     ::LOG_OUTPUT_XML $connid $data
-    outmsg [wrapper:createxml $data] -connection $connid
+    set text [wrapper:createxml $data] 
+    ::LOG_OUTPUT_SIZE $connid $data [string bytelength $text] 
+    outmsg $text -connection $connid 
 }
 
 ######################################################################
@@ -1708,8 +1725,10 @@
 
 proc ::LOG_OUTPUT     {connid t} {}
 proc ::LOG_OUTPUT_XML {connid x} {}
+proc ::LOG_OUTPUT_SIZE {connid x size} {}
 proc ::LOG_INPUT      {connid t} {}
 proc ::LOG_INPUT_XML  {connid x} {}
+proc ::LOG_INPUT_SIZE {connid x size} {}
 
 ######################################################################
 proc jlib::noop {args} {}

Modified: trunk/tkabber/pixmaps/default/services/aim_away.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/default/services/aim_chat.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/default/services/aim_dnd.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/default/services/aim_online.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/default/services/aim_xa.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/default/services/icq_chat.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/default/services/msn_away.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/default/services/msn_xa.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/default/services/rss_away.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/default/services/rss_chat.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/default/services/rss_offline.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/default/services/rss_online.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/default/services/rss_xa.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/default/tkabber/chat-bookmark.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/gabber/services/aim_away.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/gabber/services/aim_chat.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/gabber/services/aim_dnd.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/gabber/services/aim_offline.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/gabber/services/aim_online.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/gabber/services/aim_xa.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/gabber/services/icq_chat.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/gabber/services/msn_away.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/gabber/services/msn_chat.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/gabber/services/msn_dnd.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/gabber/services/msn_online.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/gabber/services/msn_xa.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/gabber/services/rss_away.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/gabber/services/rss_offline.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/gabber/services/rss_xa.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/gabber/services/sms.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/gabber/services/yahoo_away.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/gabber/services/yahoo_chat.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/gabber/services/yahoo_dnd.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/gabber/services/yahoo_offline.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/gabber/services/yahoo_online.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/gabber/services/yahoo_xa.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/jajc/services/aim_dnd.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/jajc/services/icq_away.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/jajc/services/msn_dnd.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/jajc/services/yahoo_offline.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/kroc/services/aim_dnd.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/kroc/services/icq_away.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/kroc/services/msn_dnd.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/kroc/services/rss_away.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/kroc/services/rss_chat.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/kroc/services/rss_offline.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/kroc/services/rss_online.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/kroc/services/rss_xa.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/pixmaps/kroc/services/yahoo_offline.gif
===================================================================
(Binary files differ)

Modified: trunk/tkabber/plugins/windows/console.tcl
===================================================================
--- trunk/tkabber/plugins/windows/console.tcl	2006-09-10 18:01:50 UTC (rev 710)
+++ trunk/tkabber/plugins/windows/console.tcl	2006-09-12 16:34:01 UTC (rev 711)
@@ -1,3 +1,4 @@
+# $Id$
 # Add a console menu item under windows
 
 namespace eval Console {

Modified: trunk/tkabber/plugins/windows/mousewheel.tcl
===================================================================
--- trunk/tkabber/plugins/windows/mousewheel.tcl	2006-09-10 18:01:50 UTC (rev 710)
+++ trunk/tkabber/plugins/windows/mousewheel.tcl	2006-09-12 16:34:01 UTC (rev 711)
@@ -1,3 +1,4 @@
+# $Id$
 
 namespace eval mousewheel {
 }
@@ -2,11 +3,21 @@
 
-proc mousewheel::convert_to_button {d x y} {
+proc mousewheel::convert_to_button {modifier d x y} {
 
+    switch -- $modifier {
+	shift {
+	    set scroll_up <<ScrollLeft>>
+	    set scroll_down <<ScrollRight>>
+	}
+	default {
+	    set scroll_up <<ScrollUp>>
+	    set scroll_down <<ScrollDown>>
+	}
+    }
     if {$d < 0} {
 	for {set i 0} {$i > $d} {incr i -120} {
-	    event generate [winfo containing $x $y] <5>
+	    event generate [winfo containing $x $y] $scroll_down
 	}
     } else {
 	for {set i 0} {$i < $d} {incr i 120} {
-	    event generate [winfo containing $x $y] <4>
+	    event generate [winfo containing $x $y] $scroll_up
 	}
@@ -18,19 +29,39 @@
 bind Text <MouseWheel> " "
 bind ListBox <MouseWheel> " "
 
-bind Text <4> {
+bind Text <<ScrollUp>> {
     %W yview scroll -5 units
 }
-bind Text <5> {
+bind Text <<ScrollDown>> {
     %W yview scroll 5 units
 }
-bind Listbox <4> {
+bind Listbox <<ScrollUp>> {
     %W yview scroll -5 units
 }
-bind Listbox <5> {
+bind Listbox <<ScrollDown>> {
     %W yview scroll 5 units
 }
 
-bind all <MouseWheel> [list [namespace current]::mousewheel::convert_to_button %D %X %Y]
+bind Text <Shift-MouseWheel> " "
+bind ListBox <Shift-MouseWheel> " "
+
+bind Text <<ScrollLeft>> {
+    %W xview scroll -10 units
+}
+bind Text <<ScrollRight>> {
+    %W xview scroll 10 units
+}
+bind Listbox <<ScrollLeft>> {
+    %W xview scroll -10 units
+}
+bind Listbox <<ScrollRight>> {
+    %W xview scroll 10 units
+}
+
+bind all <MouseWheel> \
+     [list [namespace current]::mousewheel::convert_to_button none %D %X %Y]
 bind all <MouseWheel> +break
+bind all <Shift-MouseWheel> \
+     [list [namespace current]::mousewheel::convert_to_button shift %D %X %Y]
+bind all <Shift-MouseWheel> +break
 

Modified: trunk/tkabber/utils.tcl
===================================================================
--- trunk/tkabber/utils.tcl	2006-09-10 18:01:50 UTC (rev 710)
+++ trunk/tkabber/utils.tcl	2006-09-12 16:34:01 UTC (rev 711)
@@ -240,21 +240,21 @@
     if {[cequal $w1 ""]} {
 	set w1 $w
     }
-    bind $w <4> \
+    bind $w <<ScrollUp>> \
 	"if {\[lindex \[$w1 yview\] 0\] > 0} {
 	    $w1 yview scroll -5 units
 	 }"
-    bind $w <5> \
+    bind $w <<ScrollDown>> \
 	"if {\[lindex \[$w1 yview\] 1\] < 1} {
 	    $w1 yview scroll 5 units
 	 }"
-    bind $w <6> \
+    bind $w <<ScrollLeft>> \
 	"if {\[lindex \[$w1 xview\] 0\] > 0} {
-	    $w1 xview scroll -1 units
+	    $w1 xview scroll -10 units
 	 }"
-    bind $w <7> \
+    bind $w <<ScrollRight>> \
 	"if {\[lindex \[$w1 xview\] 1\] < 1} {
-	    $w1 xview scroll 1 units
+	    $w1 xview scroll 10 units
 	 }"
 }
 



More information about the Tkabber-dev mailing list