Philipp Hörist pushed to branch master at gajim / gajim
Commits:
-
247ee813
by Philipp Hörist at 2019-01-10T20:37:47Z
-
418459b6
by Philipp Hörist at 2019-01-10T20:50:49Z
-
5b1f8bcc
by Philipp Hörist at 2019-01-10T21:07:52Z
-
911674d5
by Philipp Hörist at 2019-01-10T21:08:11Z
4 changed files:
Changes:
| ... | ... | @@ -89,7 +89,7 @@ class Notification: |
| 89 | 89 |
def _nec_notification(self, obj):
|
| 90 | 90 |
if obj.do_popup:
|
| 91 | 91 |
icon_name = self._get_icon_name(obj)
|
| 92 |
- self.popup(obj.popup_event_type, obj.jid, obj.conn.name,
|
|
| 92 |
+ self.popup(obj.popup_event_type, str(obj.jid), obj.conn.name,
|
|
| 93 | 93 |
obj.popup_msg_type, icon_name=icon_name,
|
| 94 | 94 |
title=obj.popup_title, text=obj.popup_text,
|
| 95 | 95 |
timeout=obj.popup_timeout)
|
| ... | ... | @@ -219,7 +219,7 @@ class Notification: |
| 219 | 219 |
|
| 220 | 220 |
@staticmethod
|
| 221 | 221 |
def _make_id(*args):
|
| 222 |
- return ','.join(args)
|
|
| 222 |
+ return ','.join(map(str, args))
|
|
| 223 | 223 |
|
| 224 | 224 |
|
| 225 | 225 |
class PopupNotification(Gtk.Window):
|
| ... | ... | @@ -1470,10 +1470,13 @@ class Interface: |
| 1470 | 1470 |
app.events.change_jid(account, fjid, jid)
|
| 1471 | 1471 |
resource = None
|
| 1472 | 1472 |
fjid = jid
|
| 1473 |
+ |
|
| 1473 | 1474 |
contact = None
|
| 1474 | 1475 |
if resource:
|
| 1475 |
- contact = app.contacts.get_contact(account, jid, resource) or highest_contact
|
|
| 1476 |
- if contact is None:
|
|
| 1476 |
+ contact = app.contacts.get_contact(account, jid, resource)
|
|
| 1477 |
+ if not contact:
|
|
| 1478 |
+ contact = highest_contact
|
|
| 1479 |
+ if not contact:
|
|
| 1477 | 1480 |
# Maybe we deleted the contact from the roster
|
| 1478 | 1481 |
return
|
| 1479 | 1482 |
|
| ... | ... | @@ -2507,8 +2510,6 @@ class Interface: |
| 2507 | 2510 |
app.gajim_optional_features[a] = []
|
| 2508 | 2511 |
app.caps_hash[a] = ''
|
| 2509 | 2512 |
|
| 2510 |
- self.remote_ctrl = None
|
|
| 2511 |
- |
|
| 2512 | 2513 |
# Handle screensaver
|
| 2513 | 2514 |
if sys.platform not in ('win32', 'darwin'):
|
| 2514 | 2515 |
logind.enable()
|
| ... | ... | @@ -25,6 +25,7 @@ |
| 25 | 25 |
import os
|
| 26 | 26 |
import base64
|
| 27 | 27 |
import mimetypes
|
| 28 |
+import logging
|
|
| 28 | 29 |
|
| 29 | 30 |
from gi.repository import GLib
|
| 30 | 31 |
from gi.repository import Gio
|
| ... | ... | @@ -36,6 +37,8 @@ from gajim.common import ged |
| 36 | 37 |
from gajim.common.connection_handlers_events import MessageOutgoingEvent
|
| 37 | 38 |
from gajim.common.connection_handlers_events import GcMessageOutgoingEvent
|
| 38 | 39 |
|
| 40 |
+log = logging.getLogger('gajim.remote_control')
|
|
| 41 |
+ |
|
| 39 | 42 |
|
| 40 | 43 |
def get_dbus_struct(obj):
|
| 41 | 44 |
"""
|
| ... | ... | @@ -405,6 +408,7 @@ class GajimRemote(Server): |
| 405 | 408 |
self.raise_signal('VcardInfo', (obj.conn.name, obj.vcard_dict))
|
| 406 | 409 |
|
| 407 | 410 |
def raise_signal(self, event_name, data):
|
| 411 |
+ log.info('Send event %s', event_name)
|
|
| 408 | 412 |
self.con.emit_signal(None,
|
| 409 | 413 |
'/org/gajim/dbus/RemoteObject',
|
| 410 | 414 |
'org.gajim.dbus.RemoteInterface',
|
| ... | ... | @@ -102,7 +102,6 @@ class MockInterface(Mock): |
| 102 | 102 |
from gajim import plugins
|
| 103 | 103 |
app.plugin_manager = plugins.PluginManager()
|
| 104 | 104 |
|
| 105 |
- self.remote_ctrl = None
|
|
| 106 | 105 |
self.instances = {}
|
| 107 | 106 |
self.minimized_controls = {}
|
| 108 | 107 |
self.status_sent_to_users = Mock()
|