Changeset 6347
- Timestamp:
- 05/21/06 21:35:33 (3 years ago)
- Files:
-
- 1 modified
-
trunk/src/roster_window.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/roster_window.py
r6328 r6347 1716 1716 # hide tooltip, no matter the button is pressed 1717 1717 self.tooltip.hide_tooltip() 1718 try: 1719 path, column, x, y = self.tree.get_path_at_pos(int(event.x), 1720 int(event.y)) 1721 except TypeError: 1722 self.tree.get_selection().unselect_all() 1723 return False 1724 1718 1725 if event.button == 3: # Right click 1719 try:1720 path, column, x, y = self.tree.get_path_at_pos(int(event.x),1721 int(event.y))1722 except TypeError:1723 self.tree.get_selection().unselect_all()1724 return1725 1726 self.tree.get_selection().select_path(path) 1726 1727 model = self.tree.get_model() … … 1730 1731 1731 1732 elif event.button == 2: # Middle click 1732 try:1733 path, column, x, y = self.tree.get_path_at_pos(int(event.x),1734 int(event.y))1735 except TypeError:1736 self.tree.get_selection().unselect_all()1737 return1738 1733 self.tree.get_selection().select_path(path) 1739 1734 model = self.tree.get_model() … … 1741 1736 type = model[iter][C_TYPE] 1742 1737 if type in ('agent', 'contact'): 1743 account = model[iter][C_ACCOUNT].decode('utf-8') 1744 jid = model[iter][C_JID].decode('utf-8') 1745 win = None 1746 c = gajim.contacts.get_contact_with_highest_priority(account, jid) 1747 if gajim.interface.msg_win_mgr.has_window(c.jid, account): 1748 win = gajim.interface.msg_win_mgr.get_window(c.jid, account) 1749 elif c: 1750 self.new_chat(c, account) 1751 win = gajim.interface.msg_win_mgr.get_window(jid, account) 1752 win.set_active_tab(jid, account) 1753 win.window.present() 1738 self.on_roster_treeview_row_activated(widget, path) 1754 1739 elif type == 'account': 1755 1740 account = model[iter][C_ACCOUNT].decode('utf-8') … … 1775 1760 1776 1761 elif event.button == 1: # Left click 1777 try:1778 path, column, x, y = self.tree.get_path_at_pos(int(event.x),1779 int(event.y))1780 except TypeError:1781 self.tree.get_selection().unselect_all()1782 return False1783 1762 model = self.tree.get_model() 1784 1763 iter = model.get_iter(path)
