Posted to tcl by kostix at Sun Dec 24 20:34:53 GMT 2006view raw
- global usetabbar
- if {$usetabbar} {
- foreach page [.nb pages] {
- lappend winids [ifacetk::nbpath $page]
- }
- }
- set prio 0
- foreach chatid [array names opened] {
- set connid [get_connid $chatid]
- set jid [get_jid $chatid]
- set type $chats(type,$chatid)
- if {$type == "groupchat"} {
- set nick [get_our_groupchat_nick $chatid]
- } else {
- set nick ""
- }
- set user [jlib::connection_user $connid]
- set server [jlib::connection_server $connid]
- set resource [jlib::connection_resource $connid]
- if {$usetabbar} {
- set prio [lsearch $winids [::chat::winid $chatid]]
- }
- lappend session [list $prio $user $server $resource \
- [list [namespace current]::restore_window $jid $type $nick] \
- ]
- incr prio
- }