Logind listener: make string translatable

This commit is contained in:
André Apitzsch 2018-01-27 00:20:53 +01:00
parent 32e23ff58b
commit 6f20e5e6e3
1 changed files with 1 additions and 4 deletions

View File

@ -42,7 +42,6 @@ def signal_received(connection, sender_name, object_path,
global fd global fd
connected = None
log.info('Signal received: %s - %s', interface_name, parameters) log.info('Signal received: %s - %s', interface_name, parameters)
# signal is sent right before (with the parameter True) and after # signal is sent right before (with the parameter True) and after
@ -88,7 +87,7 @@ def get_inhibitor(connection):
'org.freedesktop.login1.Manager', 'org.freedesktop.login1.Manager',
'Inhibit', 'Inhibit',
GLib.Variant('(ssss)', ('sleep', 'org.gajim.Gajim', GLib.Variant('(ssss)', ('sleep', 'org.gajim.Gajim',
'Disconnect from the network', 'delay')), _('Disconnect from the network'), 'delay')),
GLib.VariantType.new('(h)'), GLib.VariantType.new('(h)'),
Gio.DBusCallFlags.NONE, -1, None, None) Gio.DBusCallFlags.NONE, -1, None, None)
@ -97,8 +96,6 @@ def get_inhibitor(connection):
def appeared(connection, name, name_owner, *user_data): def appeared(connection, name, name_owner, *user_data):
'''Set up a listener for suspend signals''' '''Set up a listener for suspend signals'''
global supported
supported = True
log.info('%s appeared', name) log.info('%s appeared', name)
if name == 'org.freedesktop.login1': if name == 'org.freedesktop.login1':
connection.signal_subscribe( connection.signal_subscribe(