Philipp Hörist pushed to branch gajim_1.0 at gajim / gajim
Commits: 3db5e027 by Philipp Hörist at 2018-03-17T17:39:32+01:00 Update ChangeLog
- - - - - f83cdf69 by Philipp Hörist at 2018-03-17T17:48:57+01:00 Port show-next-pending-event from gajim-remote
Delete some already ported methods
- - - - - 2b2f1687 by Philipp Hörist at 2018-03-17T17:49:24+01:00 Add --start-chat command
- - - - - 78c04169 by Philipp Hörist at 2018-03-17T17:50:17+01:00 Add [URI...] to commandline --help
- - - - -
6 changed files:
- ChangeLog - gajim/app_actions.py - gajim/dialogs.py - gajim/gajim.py - gajim/gajim_remote.py - gajim/remote_control.py
Changes:
===================================== ChangeLog ===================================== --- a/ChangeLog +++ b/ChangeLog @@ -1,33 +1,10 @@ -Gajim 1.0.0 (15 March 2018) - - * Add support for geo: URIs - * More improvements for HiDPI Screens - * Fixed various MAM related issues - * Various other small bugfixes - -Gajim 0.99.2 (17 February 2018) - - * Speed up DB querys on MAM sync - * Fix config file encoding - * Bug fixes +Gajim 1.0.0 (17 March 2018)
-Gajim 0.99.1 (08 February 2018) - + * Ported to GTK3 / Python3 * Integrate HTTPUpload * Add Navigation buttons in History Window - * Added XEP-0368 (SRV records for XMPP over TLS) * Improvements for HiDPI Screens - * Move Chat Menu button so we are not forced to use CSD * Depend on the python keyring package for password storage - * Bug fixes - -Gajim 0.98.2 (17 December 2017) - - * Fix DB migration - -Gajim 0.98.1 (15 December 2017) - - * Ported to GTK3 / Python3 * Flatpak support * Lots of refactoring * New Emoji support @@ -40,14 +17,22 @@ Gajim 0.98.1 (15 December 2017) * Added mam:1 and mam:2 support (mam:0 was removed) * Added MAM for MUCs support * Added support for showing XEP-0084 Avatars + * Add support for geo: URIs * Added xmpp URI handling directly in Gajim * Removed Gajim-Remote * Removed XEP-0012 (Last Activity) * Removed XEP-0136 (Message Archiving) * Added XEP-0156 (Discovering Alternative XMPP Connection Methods) * Added XEP-0319 (Last User Interaction in Presence) + * Added XEP-0368 (SRV records for XMPP over TLS) * Added XEP-0380 (Explicit Message Encryption) * Added Jingle FT:5 support + * Lots of other small bugfixes + + KNOWN ISSUES: + + - Meta Contacts: Filtering the roster could lead to a crash in some circumstances. Use CTRL + N for starting new chats as a workaround + - Audio/Video support is currently not maintained and most likely not working
Gajim 0.16.9 (30 November 2017)
===================================== gajim/app_actions.py ===================================== --- a/gajim/app_actions.py +++ b/gajim/app_actions.py @@ -286,3 +286,13 @@ class AppActions(): win.present() else: app.interface.create_ipython_window() + + def show_next_pending_event(self, action, param): + """ + Show the window(s) with next pending event in tabbed/group chats + """ + if app.events.get_nb_events(): + account, jid, event = app.events.get_first_systray_event() + if not event: + return + app.interface.handle_event(account, jid, event.type_)
===================================== gajim/dialogs.py ===================================== --- 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)
===================================== gajim/gajim.py ===================================== --- a/gajim/gajim.py +++ b/gajim/gajim.py @@ -98,7 +98,15 @@ class GajimApplication(Gtk.Application): _('Show all warnings')) self.add_main_option('ipython', ord('i'), GLib.OptionFlags.NONE, GLib.OptionArg.NONE, - _('open ipython shell')) + _('Open IPython shell')) + 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.add_main_option_entries(self._get_remaining_entry())
self.connect('handle-local-options', self._handle_local_options) self.connect('command-line', self._handle_remote_options) @@ -114,6 +122,17 @@ class GajimApplication(Gtk.Application): if GLib.get_application_name() != 'Gajim': GLib.set_application_name('Gajim')
+ @staticmethod + def _get_remaining_entry(): + option = GLib.OptionEntry() + option.arg = GLib.OptionArg.STRING_ARRAY + option.arg_data = None + option.arg_description = ('[URI …]') + option.flags = GLib.OptionFlags.NONE + option.long_name = GLib.OPTION_REMAINING + option.short_name = 0 + return [option] + def _startup(self, application): from gajim import gtkexcepthook gtkexcepthook.init() @@ -301,24 +320,26 @@ class GajimApplication(Gtk.Application): # Parse all options that should be executed on a remote instance options = command_line.get_options_dict()
- if options.contains('ipython'): - self.activate_action('ipython') - return 0 + remote_commands = ['ipython', + 'show-next-pending-event', + 'start-chat', + ] + + remaining = options.lookup_value(GLib.OPTION_REMAINING, + GLib.VariantType.new('as')) + + for cmd in remote_commands: + if options.contains(cmd): + self.activate_action(cmd) + return 0
- uri = self._parse_uris(command_line) - if uri is not None: - self._open_uris(uri) + if remaining is not None: + self._open_uris(remaining.unpack()) return 0
self.activate() return 0
- @staticmethod - def _parse_uris(command_line): - args = command_line.get_arguments() - if len(args) > 1: - return args[1:] - def _handle_local_options(self, application, options: GLib.VariantDict) -> int: # Parse all options that have to be executed before ::startup @@ -425,6 +446,7 @@ class GajimApplication(Gtk.Application): ('about', action.on_about), ('faq', action.on_faq), ('ipython', action.toggle_ipython), + ('show-next-pending-event', action.show_next_pending_event), ]
act = Gio.SimpleAction.new('add-contact', GLib.VariantType.new('s'))
===================================== gajim/gajim_remote.py ===================================== --- a/gajim/gajim_remote.py +++ b/gajim/gajim_remote.py @@ -85,14 +85,6 @@ class GajimRemote: _('show help on command'), False) ] ], - 'toggle_roster_appearance': [ - _('Shows or hides the roster window'), - [] - ], - 'show_next_pending_event': [ - _('Pops up a window with the next pending event'), - [] - ], 'list_contacts': [ _('Lists all contacts in roster, one for each line'), [ @@ -257,10 +249,6 @@ class GajimRemote: _('Check if Gajim is running'), [] ], - 'toggle_ipython': [ - _('Shows or hides the ipython window'), - [] - ],
}
===================================== gajim/remote_control.py ===================================== --- a/gajim/remote_control.py +++ b/gajim/remote_control.py @@ -646,50 +646,6 @@ class SignalObject(dbus.service.Object): result.append(item) return result
- @dbus.service.method(INTERFACE, in_signature='', out_signature='') - def toggle_roster_appearance(self): - """ - Show/hide the roster window - """ - win = app.interface.roster.window - if win.get_property('visible'): - GLib.idle_add(win.hide) - else: - win.present() - # preserve the 'steal focus preservation' - if self._is_first(): - win.window.present() - else: - win.window.present_with_time(int(time())) - - @dbus.service.method(INTERFACE, in_signature='', out_signature='') - def show_roster(self): - """ - Show the roster window - """ - win = app.interface.roster.window - win.present() - # preserve the 'steal focus preservation' - if self._is_first(): - win.window.present() - else: - win.window.present_with_time(int(time())) - - @dbus.service.method(INTERFACE, in_signature='', out_signature='') - def toggle_ipython(self): - """ - Show/hide the ipython window - """ - win = app.ipython_window - if win: - if win.window.is_visible(): - GLib.idle_add(win.hide) - else: - win.show_all() - win.present() - else: - app.interface.create_ipython_window() - @dbus.service.method(INTERFACE, in_signature='', out_signature='a{ss}') def prefs_list(self): prefs_dict = DBUS_DICT_SS()
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/4fec13b76da57d1441472f247ccc84e65a...
--- View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/4fec13b76da57d1441472f247ccc84e65a... You're receiving this email because of your account on dev.gajim.org.