diff options
author | Aleksey Lim <alsroot@member.fsf.org> | 2009-04-01 09:23:01 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@member.fsf.org> | 2009-04-01 09:23:01 (GMT) |
commit | 41815a6b9b1eadf4fae451cd9c31e5d4fbc05377 (patch) | |
tree | 20fbde7df447f0cfe02c48e875c5d44d58c1ac13 | |
parent | f55d264abf8861eff708572ece0896429fafc948 (diff) |
"share or invite" hint even on resume of shared instance #402
-rw-r--r-- | pippy_app.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/pippy_app.py b/pippy_app.py index 215f349..bc842b3 100644 --- a/pippy_app.py +++ b/pippy_app.py @@ -25,7 +25,7 @@ import time from datetime import datetime from activity import ViewSourceActivity -from sugar.activity.activity import Activity, ActivityToolbox +from sugar.activity.activity import Activity, ActivityToolbox, SCOPE_PRIVATE from sugar.graphics.alert import NotifyAlert from sugar.graphics.style import (Color, COLOR_BLACK, COLOR_WHITE, COLOR_BUTTON_GREY, FONT_BOLD, FONT_NORMAL) @@ -87,7 +87,10 @@ class Chat(ViewSourceActivity): self._one_to_one_connection(handle.uri) else: # we are creating the activity - self._alert(_('Off-line'), _('Share, or invite someone.')) + if not self.metadata or self.metadata.get('share-scope', + SCOPE_PRIVATE) == SCOPE_PRIVATE: + # if we are in private session + self._alert(_('Off-line'), _('Share, or invite someone.')) self.connect('shared', self._shared_cb) def _shared_cb(self, activity): |