summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKali Kaneko <kali@leap.se>2015-11-30 12:15:09 -0400
committerKali Kaneko <kali@leap.se>2015-12-10 03:32:40 -0400
commit8d3309701af51df3046aa0df10545dfa35a64ef7 (patch)
treed628b28cb3f5b277b64fdabdac569ba67fe32512
parent97de43f5ef1b7fa4735e3371581bfaf4c3919de3 (diff)
[feat] multi-user events.
Adapt to users emitting the userid/uuid too. - Resolves: #7656 - Releases: 0.10.0
-rw-r--r--changes/next-changelog.rst3
-rw-r--r--src/leap/bitmask/gui/mail_status.py11
-rw-r--r--src/leap/bitmask/services/mail/conductor.py3
3 files changed, 12 insertions, 5 deletions
diff --git a/changes/next-changelog.rst b/changes/next-changelog.rst
index c40257b8..77094e78 100644
--- a/changes/next-changelog.rst
+++ b/changes/next-changelog.rst
@@ -11,7 +11,8 @@ I've added a new category `Misc` so we can track doc/style/packaging stuff.
Features
~~~~~~~~
- `#7552 <https://leap.se/code/issues/7552>`_: Improve UI message and add some margin above the msg box.
-- `#1234 <https://leap.se/code/issues/1234>`_: Description of the new feature corresponding with issue #1234.
+- `#7552 <https://leap.se/code/issues/7552>`_: Improve UI message and add some margin above the msg box.
+- `#7656 <https://leap.se/code/issues/7656>`_: Adapt to multi-user aware events.
- New feature without related issue number.
Bugfixes
diff --git a/src/leap/bitmask/gui/mail_status.py b/src/leap/bitmask/gui/mail_status.py
index f7957c95..419a85c0 100644
--- a/src/leap/bitmask/gui/mail_status.py
+++ b/src/leap/bitmask/gui/mail_status.py
@@ -233,12 +233,15 @@ class MailStatusWidget(QtGui.QWidget):
self._action_mail_status.setText(tray_status)
self._update_systray_tooltip()
- def _mail_handle_soledad_events(self, event, content):
+ def _mail_handle_soledad_events(self, event, user_data, content=""):
"""
Callback for handling events that are emitted from Soledad
:param event: The event that triggered the callback.
:type event: str
+ :param user_id: The user_data of the soledad user. Ignored right now,
+ since we're only contemplating single-user in soledad.
+ :type user_id: dict
:param content: The content of the event.
:type content: dict
"""
@@ -346,7 +349,7 @@ class MailStatusWidget(QtGui.QWidget):
logger.warning("don't know to to handle %s" % (event,))
self._set_mail_status(ext_status, ready=1)
- def _mail_handle_smtp_events(self, event):
+ def _mail_handle_smtp_events(self, event, content=""):
"""
Callback for the SMTP events
@@ -380,12 +383,14 @@ class MailStatusWidget(QtGui.QWidget):
# ----- XXX deprecate (move to mail conductor)
- def _mail_handle_imap_events(self, event, content):
+ def _mail_handle_imap_events(self, event, uuid, content=""):
"""
Callback for the IMAP events
:param event: The event that triggered the callback.
:type event: str
+ :param uuid: The UUID for the user. Ignored right now.
+ :type uuid: str
:param content: The content of the event.
:type content: list
"""
diff --git a/src/leap/bitmask/services/mail/conductor.py b/src/leap/bitmask/services/mail/conductor.py
index b79ea9c7..738531e6 100644
--- a/src/leap/bitmask/services/mail/conductor.py
+++ b/src/leap/bitmask/services/mail/conductor.py
@@ -73,12 +73,13 @@ class IMAPControl(object):
self._backend.imap_stop_service()
- def _handle_imap_events(self, event, content):
+ def _handle_imap_events(self, event, userid=None, content=None):
"""
Callback handler for the IMAP events
:param event: The event that triggered the callback.
:type event: str
+ :param userid: The user id of the logged in user. Ignored.
:param content: The content of the event.
:type content: list
"""