diff --git a/gajim/dialogs.py b/gajim/dialogs.py index 1d567a423004ab11537939c676eaa3cde96f0297..17fc1e96244df1c7dd94bc4c9c8c21390cb02aa7 100644 --- a/gajim/dialogs.py +++ b/gajim/dialogs.py @@ -2755,19 +2755,10 @@ class SynchroniseSelectContactsDialog: class StartChatDialog(Gtk.ApplicationWindow): def __init__(self): - # Must be before ApplicationWindow.__init__ - # or we get our own window - active_window = app.app.get_active_window() - Gtk.ApplicationWindow.__init__(self) self.set_name('StartChatDialog') self.set_application(app.app) - mode = app.config.get('one_message_window') != 'always_with_roster' - if active_window == app.interface.roster.window and mode: - self.set_position(Gtk.WindowPosition.CENTER) - else: - self.set_transient_for(active_window) - self.set_type_hint(Gdk.WindowTypeHint.DIALOG) + self.set_position(Gtk.WindowPosition.CENTER) self.set_show_menubar(False) self.set_title(_('Start new Conversation')) self.set_default_size(-1, 400) diff --git a/gajim/gajim.py b/gajim/gajim.py index b9208639a6ef13cec823028561ae7bceb361d0d2..ae3045bfdd1ff8152431c06cd62e9c4638317630 100644 --- a/gajim/gajim.py +++ b/gajim/gajim.py @@ -103,6 +103,9 @@ class GajimApplication(Gtk.Application): self.add_main_option('show-next-pending-event', 0, GLib.OptionFlags.NONE, GLib.OptionArg.NONE, _('Pops up a window with the next pending event')) + self.add_main_option('start-chat', 0, GLib.OptionFlags.NONE, + GLib.OptionArg.NONE, + _('Start a new chat')) self.connect('handle-local-options', self._handle_local_options) self.connect('command-line', self._handle_remote_options) @@ -307,6 +310,7 @@ class GajimApplication(Gtk.Application): remote_commands = ['ipython', 'show-next-pending-event', + 'start-chat', ] for cmd in remote_commands: