Start Interface after remote cmdline handling
Because otherwise we would lose log information from Interface, because logging levels are set after startup
This commit is contained in:
parent
271af70885
commit
5789c8a870
1 changed files with 7 additions and 12 deletions
17
src/gajim.py
17
src/gajim.py
|
@ -230,20 +230,14 @@ class GajimApplication(Gtk.Application):
|
||||||
signal.signal(signal.SIGINT, sigint_cb)
|
signal.signal(signal.SIGINT, sigint_cb)
|
||||||
signal.signal(signal.SIGTERM, sigint_cb)
|
signal.signal(signal.SIGTERM, sigint_cb)
|
||||||
|
|
||||||
log.info("Encodings: d:%s, fs:%s, p:%s", sys.getdefaultencoding(),
|
print("Encodings: d:{}, fs:{}, p:{}".format(sys.getdefaultencoding(),
|
||||||
sys.getfilesystemencoding(), locale.getpreferredencoding())
|
sys.getfilesystemencoding(), locale.getpreferredencoding()))
|
||||||
|
|
||||||
from gui_interface import Interface
|
|
||||||
self.interface = Interface()
|
|
||||||
self.interface.run(self)
|
|
||||||
|
|
||||||
def do_activate(self):
|
def do_activate(self):
|
||||||
Gtk.Application.do_activate(self)
|
Gtk.Application.do_activate(self)
|
||||||
# If a second instance starts do_activate() is called
|
from gui_interface import Interface
|
||||||
# We bringt the Roster window to the front, GTK exits afterwards.
|
self.interface = Interface()
|
||||||
if self.interface:
|
self.interface.run(self)
|
||||||
self.interface.roster.window.present()
|
|
||||||
return
|
|
||||||
|
|
||||||
def do_shutdown(self, *args):
|
def do_shutdown(self, *args):
|
||||||
Gtk.Application.do_shutdown(self)
|
Gtk.Application.do_shutdown(self)
|
||||||
|
@ -285,6 +279,7 @@ class GajimApplication(Gtk.Application):
|
||||||
if options.contains('loglevel'):
|
if options.contains('loglevel'):
|
||||||
string = options.lookup_value('loglevel').get_string()
|
string = options.lookup_value('loglevel').get_string()
|
||||||
logging_helpers.set_loglevels(string)
|
logging_helpers.set_loglevels(string)
|
||||||
|
if not command_line.get_is_remote():
|
||||||
self.activate()
|
self.activate()
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue