Philipp Hörist pushed to branch master at gajim / gajim
Commits: 247ee813 by Philipp Hörist at 2019-01-10T20:37:47Z Remove unused vars
- - - - - 418459b6 by Philipp Hörist at 2019-01-10T20:50:49Z DBus: Add some logging
- - - - - 5b1f8bcc by Philipp Hörist at 2019-01-10T21:07:52Z Make sure args are always str
- - - - - 911674d5 by Philipp Hörist at 2019-01-10T21:08:11Z Fix status tray notification
Clicking on a new message notification in the status tray didnt open the chat
- - - - -
4 changed files:
- gajim/gtk/notification.py - gajim/gui_interface.py - gajim/remote_control.py - test/lib/gajim_mocks.py
Changes:
===================================== gajim/gtk/notification.py ===================================== @@ -89,7 +89,7 @@ class Notification: def _nec_notification(self, obj): if obj.do_popup: icon_name = self._get_icon_name(obj) - self.popup(obj.popup_event_type, obj.jid, obj.conn.name, + self.popup(obj.popup_event_type, str(obj.jid), obj.conn.name, obj.popup_msg_type, icon_name=icon_name, title=obj.popup_title, text=obj.popup_text, timeout=obj.popup_timeout) @@ -219,7 +219,7 @@ class Notification:
@staticmethod def _make_id(*args): - return ','.join(args) + return ','.join(map(str, args))
class PopupNotification(Gtk.Window):
===================================== gajim/gui_interface.py ===================================== @@ -1470,10 +1470,13 @@ class Interface: app.events.change_jid(account, fjid, jid) resource = None fjid = jid + contact = None if resource: - contact = app.contacts.get_contact(account, jid, resource) or highest_contact - if contact is None: + contact = app.contacts.get_contact(account, jid, resource) + if not contact: + contact = highest_contact + if not contact: # Maybe we deleted the contact from the roster return
@@ -2507,8 +2510,6 @@ class Interface: app.gajim_optional_features[a] = [] app.caps_hash[a] = ''
- self.remote_ctrl = None - # Handle screensaver if sys.platform not in ('win32', 'darwin'): logind.enable()
===================================== gajim/remote_control.py ===================================== @@ -25,6 +25,7 @@ import os import base64 import mimetypes +import logging
from gi.repository import GLib from gi.repository import Gio @@ -36,6 +37,8 @@ from gajim.common import ged from gajim.common.connection_handlers_events import MessageOutgoingEvent from gajim.common.connection_handlers_events import GcMessageOutgoingEvent
+log = logging.getLogger('gajim.remote_control') +
def get_dbus_struct(obj): """ @@ -405,6 +408,7 @@ class GajimRemote(Server): self.raise_signal('VcardInfo', (obj.conn.name, obj.vcard_dict))
def raise_signal(self, event_name, data): + log.info('Send event %s', event_name) self.con.emit_signal(None, '/org/gajim/dbus/RemoteObject', 'org.gajim.dbus.RemoteInterface',
===================================== test/lib/gajim_mocks.py ===================================== @@ -102,7 +102,6 @@ class MockInterface(Mock): from gajim import plugins app.plugin_manager = plugins.PluginManager()
- self.remote_ctrl = None self.instances = {} self.minimized_controls = {} self.status_sent_to_users = Mock()
View it on GitLab: https://dev.gajim.org/gajim/gajim/compare/b84054b58cf940061d494c75496e45d7f0...