Commit 55cded2e authored by Philipp Hörist's avatar Philipp Hörist

Remove unused code

Code was not working for years, seems nobody missed it
parent ff9bc4f9
......@@ -130,8 +130,6 @@
status_before_autoaway = {} # type: Dict[str, str]
# Is Gnome configured to activate on single click ?
single_click = False
SHOW_LIST = ['offline', 'connecting', 'online', 'chat', 'away', 'xa', 'dnd',
'invisible', 'error']
......
......@@ -141,7 +141,6 @@
<property name="headers_visible">False</property>
<property name="reorderable">True</property>
<signal name="button-press-event" handler="on_roster_treeview_button_press_event" swapped="no"/>
<signal name="button-release-event" handler="on_roster_treeview_button_release_event" swapped="no"/>
<signal name="key-press-event" handler="on_roster_treeview_key_press_event" swapped="no"/>
<signal name="row-activated" handler="on_roster_treeview_row_activated" swapped="no"/>
<signal name="row-collapsed" handler="on_roster_treeview_row_collapsed" swapped="no"/>
......
......@@ -2076,17 +2076,7 @@ def __init__(self):
if app.config.get_per('accounts', account, 'is_zeroconf'):
app.ZEROCONF_ACC_NAME = account
break
# Is gnome configured to activate row on single click ?
# try:
# gi.require_version('GConf', '2.0')
# from gi.repository import GConf
# client = GConf.Client.get_default()
# click_policy = client.get_string(
# '/apps/nautilus/preferences/click_policy')
# if click_policy == 'single':
# app.single_click = True
# except Exception:
# pass
# add default status messages if there is not in the config file
if not app.config.get_per('statusmsg'):
default = app.config.statusmsg_default
......
......@@ -3137,20 +3137,6 @@ def on_roster_treeview_key_press_event(self, widget, event):
self.tree.expand_row(path, False)
return True
def on_roster_treeview_button_release_event(self, widget, event):
try:
path = self.tree.get_path_at_pos(int(event.x), int(event.y))[0]
except TypeError:
return False
if event.button == 1: # Left click
if app.single_click and not event.get_state() & Gdk.ModifierType.SHIFT_MASK and \
not event.get_state() & Gdk.ModifierType.CONTROL_MASK:
# Check if button has been pressed on the same row
if self.clicked_path == path:
self.on_row_activated(widget, path)
self.clicked_path = None
def accel_group_func(self, accel_group, acceleratable, keyval, modifier):
# CTRL mask
if modifier & Gdk.ModifierType.CONTROL_MASK:
......@@ -3235,23 +3221,6 @@ def on_response(message, pep_dict):
x_min = AvatarSize.ROSTER
else:
x_min = 0
if (app.single_click and
not event.get_state() & Gdk.ModifierType.SHIFT_MASK and
not event.get_state() & Gdk.ModifierType.CONTROL_MASK):
# Don't handle double click if we press icon of a metacontact
titer = model.get_iter(path)
if x_min < x < x_min + 27 and type_ == 'contact' and \
model.iter_has_child(titer):
if self.tree.row_expanded(path):
self.tree.collapse_row(path)
else:
self.tree.expand_row(path, False)
return
# We just save on which row we press button, and open chat
# window on button release to be able to do DND without opening
# chat window
self.clicked_path = path
return
if type_ == 'group' and x < 27:
# first cell in 1st column (the arrow SINGLE clicked)
......@@ -3680,8 +3649,7 @@ def on_roster_treeview_row_activated(self, widget, path, col=0):
"""
When an iter is double clicked: open the first event window
"""
if not app.single_click:
self.on_row_activated(widget, path)
self.on_row_activated(widget, path)
def on_roster_treeview_row_expanded(self, widget, titer, path):
"""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment