From 5b758a4977126f6e6be005c3fb2fc10f044693d4 Mon Sep 17 00:00:00 2001 From: Jean-Marie Traissard Date: Mon, 14 May 2007 17:29:06 +0000 Subject: [PATCH] Do not use single click for roster and gc-roster to open chats if an usefull modifier key is pressed. See #2072. --- src/groupchat_control.py | 4 ++-- src/roster_window.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/groupchat_control.py b/src/groupchat_control.py index 4a68cef8f..67655e7e3 100644 --- a/src/groupchat_control.py +++ b/src/groupchat_control.py @@ -1837,7 +1837,7 @@ class GroupchatControl(ChatControlBase): widget.get_selection().unselect_all() return - if gajim.single_click: + if gajim.single_click and not event.state & gtk.gdk.SHIFT_MASK: self.on_row_activated(widget, path) return True else: @@ -1846,7 +1846,7 @@ class GroupchatControl(ChatControlBase): nick = model[iter][C_NICK].decode('utf-8') if not nick in gajim.contacts.get_nick_list(self.account, self.room_jid): - #it's a group + # it's a group col = widget.get_column(0) avatar_cell = col.get_cell_renderers()[0] (pos, avatar_size) = col.cell_get_position(avatar_cell) diff --git a/src/roster_window.py b/src/roster_window.py index 9bde6ed4d..43b9852c9 100644 --- a/src/roster_window.py +++ b/src/roster_window.py @@ -2998,7 +2998,8 @@ class RosterWindow: elif event.button == 1: # Left click model = self.tree.get_model() type_ = model[path][C_TYPE] - if gajim.single_click: + if gajim.single_click and not event.state & gtk.gdk.SHIFT_MASK and \ + not event.state & gtk.gdk.CONTROL_MASK: self.on_row_activated(widget, path) else: if type_ == 'group' and x < 27: