Do not use single click for roster and gc-roster to open chats if an usefull modifier key is

pressed. See #2072.
This commit is contained in:
Jean-Marie Traissard 2007-05-14 17:29:06 +00:00
parent 983ea67c00
commit 5b758a4977
2 changed files with 4 additions and 3 deletions

View File

@ -1837,7 +1837,7 @@ class GroupchatControl(ChatControlBase):
widget.get_selection().unselect_all() widget.get_selection().unselect_all()
return return
if gajim.single_click: if gajim.single_click and not event.state & gtk.gdk.SHIFT_MASK:
self.on_row_activated(widget, path) self.on_row_activated(widget, path)
return True return True
else: else:
@ -1846,7 +1846,7 @@ class GroupchatControl(ChatControlBase):
nick = model[iter][C_NICK].decode('utf-8') nick = model[iter][C_NICK].decode('utf-8')
if not nick in gajim.contacts.get_nick_list(self.account, if not nick in gajim.contacts.get_nick_list(self.account,
self.room_jid): self.room_jid):
#it's a group # it's a group
col = widget.get_column(0) col = widget.get_column(0)
avatar_cell = col.get_cell_renderers()[0] avatar_cell = col.get_cell_renderers()[0]
(pos, avatar_size) = col.cell_get_position(avatar_cell) (pos, avatar_size) = col.cell_get_position(avatar_cell)

View File

@ -2998,7 +2998,8 @@ class RosterWindow:
elif event.button == 1: # Left click elif event.button == 1: # Left click
model = self.tree.get_model() model = self.tree.get_model()
type_ = model[path][C_TYPE] 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) self.on_row_activated(widget, path)
else: else:
if type_ == 'group' and x < 27: if type_ == 'group' and x < 27: