[Tkabber-dev] r2045 - in trunk/tkabber: . ifacetk plugins/general

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Tue Dec 31 16:36:25 MSK 2013


Author: sergei
Date: 2013-12-31 16:36:25 +0400 (Tue, 31 Dec 2013)
New Revision: 2045

Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/chats.tcl
   trunk/tkabber/disco.tcl
   trunk/tkabber/ifacetk/bwidget_workarounds.tcl
   trunk/tkabber/muc.tcl
   trunk/tkabber/plugins/general/headlines.tcl
   trunk/tkabber/plugins/general/offline.tcl
Log:
	* chats.tcl: Changed default value for smart scroll to enabled.

	* muc.tcl: Request only unseen history by default.

	* disco.tcl, ifacetk/bwidget_workarounds.tcl,
	  plugins/general/headlines.tcl, plugins/general/offline.tcl: Use the
	  chat font linespace for the vertical space between tree branches.
	  It isn't perfect, but works in most cases.


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2013-12-31 10:34:32 UTC (rev 2044)
+++ trunk/tkabber/ChangeLog	2013-12-31 12:36:25 UTC (rev 2045)
@@ -8,6 +8,15 @@
 
 	* msgs/ru.msg: Updated Russian translation.
 
+	* chats.tcl: Changed default value for smart scroll to enabled.
+
+	* muc.tcl: Request only unseen history by default.
+
+	* disco.tcl, ifacetk/bwidget_workarounds.tcl,
+	  plugins/general/headlines.tcl, plugins/general/offline.tcl: Use the
+	  chat font linespace for the vertical space between tree branches.
+	  It isn't perfect, but works in most cases.
+
 2013-12-30  Sergei Golovan  <sgolovan at nes.ru>
 
 	* README, doc/tkabber.html, doc/tkabber.xml: Added section which

Modified: trunk/tkabber/chats.tcl
===================================================================
--- trunk/tkabber/chats.tcl	2013-12-31 10:34:32 UTC (rev 2044)
+++ trunk/tkabber/chats.tcl	2013-12-31 12:36:25 UTC (rev 2045)
@@ -15,7 +15,7 @@
 namespace eval chat {
     set enrichid 0
     custom::defgroup Chat [::msgcat::mc "Chat options."] -group Tkabber
-    custom::defvar options(smart_scroll) 0 \
+    custom::defvar options(smart_scroll) 1 \
 	[::msgcat::mc "Enable chat window autoscroll only when last message is shown."] \
 	-type boolean -group Chat
     custom::defvar options(stop_scroll) 0 \

Modified: trunk/tkabber/disco.tcl
===================================================================
--- trunk/tkabber/disco.tcl	2013-12-31 10:34:32 UTC (rev 2044)
+++ trunk/tkabber/disco.tcl	2013-12-31 12:36:25 UTC (rev 2045)
@@ -360,7 +360,7 @@
 
     set sw [ScrolledWindow $w.sw]
 
-    set tw [Tree $w.tree -deltax 16 -deltay 18 -dragenabled 1 \
+    set tw [Tree $w.tree -dragenabled 1 \
 		-draginitcmd [list [namespace current]::draginitcmd $w]]
     $sw setwidget $tw
 

Modified: trunk/tkabber/ifacetk/bwidget_workarounds.tcl
===================================================================
--- trunk/tkabber/ifacetk/bwidget_workarounds.tcl	2013-12-31 10:34:32 UTC (rev 2044)
+++ trunk/tkabber/ifacetk/bwidget_workarounds.tcl	2013-12-31 12:36:25 UTC (rev 2045)
@@ -106,6 +106,23 @@
 proc Tree::create {path args} {
     eval [list Tree::create:old $path] $args
 
+    set deltax 0
+    set deltay 0
+    foreach {key val} $args {
+	switch -- $key {
+	    -deltax { set deltax 1 }
+	    -deltay { set deltay 1 }
+	}
+    }
+
+    if {!$deltax} {
+	$path configure -deltax [font measure $::ChatFont M]
+    }
+
+    if {!$deltay} {
+	$path configure -deltay [font metrics $::ChatFont -linespace]
+    }
+
     Tree::bindText  $path <Control-Button-1> [list $path selection set]
     Tree::bindImage $path <Control-Button-1> [list $path selection set]
 

Modified: trunk/tkabber/muc.tcl
===================================================================
--- trunk/tkabber/muc.tcl	2013-12-31 10:34:32 UTC (rev 2044)
+++ trunk/tkabber/muc.tcl	2013-12-31 12:36:25 UTC (rev 2045)
@@ -33,7 +33,7 @@
 	[::msgcat::mc "Maximum number of stanzas in the history in MUC\
 		       compatible conference rooms."] \
 	-type integer -group Chat
-    custom::defvar options(request_only_unseen_history) 0 \
+    custom::defvar options(request_only_unseen_history) 1 \
 	[::msgcat::mc "Request only unseen (which aren't displayed in the\
 		       chat window) messages in the history in MUC compatible\
 		       conference rooms."] \

Modified: trunk/tkabber/plugins/general/headlines.tcl
===================================================================
--- trunk/tkabber/plugins/general/headlines.tcl	2013-12-31 10:34:32 UTC (rev 2044)
+++ trunk/tkabber/plugins/general/headlines.tcl	2013-12-31 12:36:25 UTC (rev 2045)
@@ -187,7 +187,7 @@
     }
 
     set sw [ScrolledWindow $uw.sw]
-    Tree $tw -deltax 16 -deltay 18 \
+    Tree $tw \
 	 -selectcommand [list [namespace current]::update_body \
 			      $dw.date.ts $dw.from.jid $dw.subject.subj $hw.body]
     $sw setwidget $tw

Modified: trunk/tkabber/plugins/general/offline.tcl
===================================================================
--- trunk/tkabber/plugins/general/offline.tcl	2013-12-31 10:34:32 UTC (rev 2044)
+++ trunk/tkabber/plugins/general/offline.tcl	2013-12-31 12:36:25 UTC (rev 2045)
@@ -58,7 +58,7 @@
     }
 
     set sw [ScrolledWindow $w.sw]
-    set tw [Tree $w.tree -deltax 16 -deltay 18 -dragenabled 0]
+    set tw [Tree $w.tree -dragenabled 0]
     $sw setwidget $tw
 
     pack $sw -side top -expand yes -fill both



More information about the Tkabber-dev mailing list