[triggers] Add missing brackets

has_focus is a method of the Gtk.Window instance so it's necessary to add
brackets after the method name. Otherwise python returns just the reference
to the method and not the result of the method.
This commit is contained in:
Robin Müller
2018-05-13 14:00:54 +02:00
parent 5d770f8596
commit 8799a904d7

View File

@@ -115,7 +115,7 @@ class Triggers(GajimPlugin):
if not ctrl: if not ctrl:
# Does not apply in this case # Does not apply in this case
return True return True
has_focus = ctrl.parent_win.window.has_focus has_focus = ctrl.parent_win.window.has_focus()
if has_focus and rule['has_focus'] == 'no': if has_focus and rule['has_focus'] == 'no':
return False return False
elif not has_focus and rule['has_focus'] == 'yes': elif not has_focus and rule['has_focus'] == 'yes':