Welcome to mirror list, hosted at ThFree Co, Russian Federation.

dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYann Leboulanger <asterix@lagaule.org>2004-05-19 05:34:57 +0400
committerYann Leboulanger <asterix@lagaule.org>2004-05-19 05:34:57 +0400
commit09dd4975947a4c9f87abad88c5d957a055da9c36 (patch)
tree5a038f1c53aeebca2866123fee9287808f085c84 /plugins
parent4106ff0f55f2db4f153841c5d33ae04e3d23bd92 (diff)
scroll to and select row of user that have sent a message
Diffstat (limited to 'plugins')
-rw-r--r--plugins/gtkgui/gtkgui.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/plugins/gtkgui/gtkgui.py b/plugins/gtkgui/gtkgui.py
index bb830a5a4..cc776adac 100644
--- a/plugins/gtkgui/gtkgui.py
+++ b/plugins/gtkgui/gtkgui.py
@@ -804,6 +804,8 @@ class roster_Window:
user1 = user(jid, jid, ['not in list'], \
'not in list', 'not in list', 'none', '')
self.add_user_to_roster(user1, account)
+ iter = self.get_user_iter(jid, account)
+ path = self.tree.get_model().get_path(iter[0])
autopopup = self.plugin.config['autopopup']
if autopopup == 0 and not \
self.plugin.windows[account]['chats'].has_key(jid):
@@ -815,8 +817,16 @@ class roster_Window:
model.set_value(i, 0, self.pixbufs['message'])
tim = time.strftime("[%H:%M:%S]")
self.plugin.queues[account][jid].put((msg, tim))
+ self.tree.expand_row(path[0:1], FALSE)
+ self.tree.expand_row(path[0:2], FALSE)
+ self.tree.scroll_to_cell(path)
+ self.tree.set_cursor(path)
else:
if not self.plugin.windows[account]['chats'].has_key(jid):
+ self.tree.expand_row(path[0:1], FALSE)
+ self.tree.expand_row(path[0:2], FALSE)
+ self.tree.scroll_to_cell(path)
+ self.tree.set_cursor(path)
self.plugin.windows[account]['chats'][jid] = \
message_Window(self.contacts[account][jid], self.plugin, account)
self.plugin.windows[account]['chats'][jid].print_conversation(msg)