[Tkabber-dev] r921 - in trunk/tkabber: . jabberlib-tclxml pixmaps/default/tkabber

tkabber-svn at jabber.ru tkabber-svn at jabber.ru
Sun Feb 11 13:27:23 MSK 2007


Author: sergei
Date: 2007-02-11 13:27:18 +0300 (Sun, 11 Feb 2007)
New Revision: 921

Removed:
   trunk/tkabber/pixmaps/default/tkabber/new-msg.gif
   trunk/tkabber/pixmaps/default/tkabber/search_bk.gif
   trunk/tkabber/pixmaps/default/tkabber/search_case.gif
   trunk/tkabber/pixmaps/default/tkabber/search_exact.gif
   trunk/tkabber/pixmaps/default/tkabber/search_fw.gif
Modified:
   trunk/tkabber/ChangeLog
   trunk/tkabber/chats.tcl
   trunk/tkabber/custom.tcl
   trunk/tkabber/jabberlib-tclxml/jabberlib.tcl
Log:
	* pixmaps/default/tkabber/new-msg.gif,
	  pixmaps/default/tkabber/search_bk.gif,
	  pixmaps/default/tkabber/search_exact.gif,
	  pixmaps/default/tkabber/search_case.gif,
	  pixmaps/default/tkabber/search_fw.gif: Removed, as they are no
	  longer used.

	* custom.tcl: Added saving customize tab during state saving.

	* jabberlib-tclxml/jabberlib.tcl: Added procedures, which return
	  requested username, server and resource (before resource binding).
	  They are used in saving sessions.

	* chats.tcl: Bind chat tabs to requested JIDs, and not to real ones
	  (this helps if resource binding changes JID, as at gmail.com).


Modified: trunk/tkabber/ChangeLog
===================================================================
--- trunk/tkabber/ChangeLog	2007-02-10 21:50:10 UTC (rev 920)
+++ trunk/tkabber/ChangeLog	2007-02-11 10:27:18 UTC (rev 921)
@@ -1,3 +1,21 @@
+2007-02-11  Sergei Golovan  <sgolovan at nes.ru>
+
+	* pixmaps/default/tkabber/new-msg.gif,
+	  pixmaps/default/tkabber/search_bk.gif,
+	  pixmaps/default/tkabber/search_exact.gif,
+	  pixmaps/default/tkabber/search_case.gif,
+	  pixmaps/default/tkabber/search_fw.gif: Removed, as they are no
+	  longer used.
+
+	* custom.tcl: Added saving customize tab during state saving.
+
+	* jabberlib-tclxml/jabberlib.tcl: Added procedures, which return
+	  requested username, server and resource (before resource binding).
+	  They are used in saving sessions.
+
+	* chats.tcl: Bind chat tabs to requested JIDs, and not to real ones
+	  (this helps if resource binding changes JID, as at gmail.com).
+
 2007-02-10  Sergei Golovan  <sgolovan at nes.ru>
 
 	* pixmaps/default/services/aim*, pixmaps/default/services/gg*,

Modified: trunk/tkabber/chats.tcl
===================================================================
--- trunk/tkabber/chats.tcl	2007-02-10 21:50:10 UTC (rev 920)
+++ trunk/tkabber/chats.tcl	2007-02-11 10:27:18 UTC (rev 921)
@@ -1420,9 +1420,9 @@
 		set nick ""
 	    }
 
-	    set user [jlib::connection_user $connid]
-	    set server [jlib::connection_server $connid]
-	    set resource [jlib::connection_resource $connid]
+	    set user [jlib::connection_requested_user $connid]
+	    set server [jlib::connection_requested_server $connid]
+	    set resource [jlib::connection_requested_resource $connid]
 
 	    lappend session [list $prio $user $server $resource \
 		[list [namespace current]::restore_window $jid $type $nick] \

Modified: trunk/tkabber/custom.tcl
===================================================================
--- trunk/tkabber/custom.tcl	2007-02-10 21:50:10 UTC (rev 920)
+++ trunk/tkabber/custom.tcl	2007-02-11 10:27:18 UTC (rev 921)
@@ -168,8 +168,10 @@
     set w .customize
     if {[winfo exists $w]} {
 	if {$::usetabbar} {
-	.nb raise [::ifacetk::nbpage $w]
+	    .nb raise [::ifacetk::nbpage $w]
 	}
+	goto $gid
+	focus $w.fields
 	return    
     }
 
@@ -233,7 +235,7 @@
 
 proc custom::go {} {
     variable curgroup
-    goto $curgroup $offset
+    goto $curgroup
 }
 
 proc custom::goto {gid} {
@@ -826,4 +828,39 @@
     debugmsg custom [array get history]
 }
 
+##############################################################################
+
+proc custom::restore_window {gid args} {
+    open_window $gid
+}
+
+proc custom::save_session {vsession} {
+    upvar 2 $vsession session
+    global usetabbar
+    variable history
+
+    # We don't need JID at all, so make it empty (special case)
+    set user     ""
+    set server   ""
+    set resource ""
+
+    # TODO
+    if {!$usetabbar} return
+
+    set prio 0
+    foreach page [.nb pages] {
+	set path [ifacetk::nbpath $page]
+
+	if {[string equal $path .customize]} {
+	    lassign [lindex $history(list) $history(pos)] gid
+	    lappend session [list $prio $user $server $resource \
+		[list [namespace current]::restore_window $gid] \
+	    ]
+	}
+	incr prio
+    }
+}
+
+hook::add save_session_hook [namespace current]::custom::save_session
+
 # vim:ts=8:sw=4:sts=4:noet

Modified: trunk/tkabber/jabberlib-tclxml/jabberlib.tcl
===================================================================
--- trunk/tkabber/jabberlib-tclxml/jabberlib.tcl	2007-02-10 21:50:10 UTC (rev 920)
+++ trunk/tkabber/jabberlib-tclxml/jabberlib.tcl	2007-02-11 10:27:18 UTC (rev 921)
@@ -760,6 +760,26 @@
 
 ######################################################################
 
+proc jlib::connection_requested_user {connid} {
+    variable connjid
+
+    return $connjid($connid,user)
+}
+
+proc jlib::connection_requested_server {connid} {
+    variable connjid
+
+    return $connjid($connid,server)
+}
+
+proc jlib::connection_requested_resource {connid} {
+    variable connjid
+
+    return $connjid($connid,resource)
+}
+
+######################################################################
+
 proc jlib::register_xmlns {connid xmlns callback} {
     variable lib
 

Deleted: trunk/tkabber/pixmaps/default/tkabber/new-msg.gif
===================================================================
(Binary files differ)

Deleted: trunk/tkabber/pixmaps/default/tkabber/search_bk.gif
===================================================================
(Binary files differ)

Deleted: trunk/tkabber/pixmaps/default/tkabber/search_case.gif
===================================================================
(Binary files differ)

Deleted: trunk/tkabber/pixmaps/default/tkabber/search_exact.gif
===================================================================
(Binary files differ)

Deleted: trunk/tkabber/pixmaps/default/tkabber/search_fw.gif
===================================================================
(Binary files differ)



More information about the Tkabber-dev mailing list