Commit 5789c8a8 authored by Philipp Hörist's avatar Philipp Hörist

Start Interface after remote cmdline handling

Because otherwise we would lose log information
from Interface, because logging levels are set after
startup
parent 271af708
......@@ -230,21 +230,15 @@ class GajimApplication(Gtk.Application):
signal.signal(signal.SIGINT, sigint_cb)
signal.signal(signal.SIGTERM, sigint_cb)
log.info("Encodings: d:%s, fs:%s, p:%s", sys.getdefaultencoding(),
sys.getfilesystemencoding(), locale.getpreferredencoding())
print("Encodings: d:{}, fs:{}, p:{}".format(sys.getdefaultencoding(),
sys.getfilesystemencoding(), locale.getpreferredencoding()))
def do_activate(self):
Gtk.Application.do_activate(self)
from gui_interface import Interface
self.interface = Interface()
self.interface.run(self)
def do_activate(self):
Gtk.Application.do_activate(self)
# If a second instance starts do_activate() is called
# We bringt the Roster window to the front, GTK exits afterwards.
if self.interface:
self.interface.roster.window.present()
return
def do_shutdown(self, *args):
Gtk.Application.do_shutdown(self)
# Save the entropy from OpenSSL PRNG
......@@ -285,7 +279,8 @@ class GajimApplication(Gtk.Application):
if options.contains('loglevel'):
string = options.lookup_value('loglevel').get_string()
logging_helpers.set_loglevels(string)
self.activate()
if not command_line.get_is_remote():
self.activate()
return 0
def frozen_logging(self, 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