Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWalter Bender <walter@sugarlabs.org>2013-12-12 23:01:24 (GMT)
committer Walter Bender <walter@sugarlabs.org>2013-12-12 23:01:24 (GMT)
commit52c14d37d047c048862eda8ae53017289dafd44b (patch)
tree49682a87e1ee9736ee17d1aeca9d9bd870221ab5
parentf168a54cd74ef70dc9e68eb3964e79427d1d91cf (diff)
Show alert afyer export
-rw-r--r--pippy_app.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/pippy_app.py b/pippy_app.py
index f534bde..ce8fa46 100644
--- a/pippy_app.py
+++ b/pippy_app.py
@@ -42,6 +42,7 @@ from sugar3.activity.widgets import EditToolbar
from sugar3.activity.widgets import StopButton
from sugar3.activity.activity import get_bundle_path
from sugar3.activity.activity import get_bundle_name
+from sugar3.graphics.alert import NotifyAlert
from sugar3.graphics import style
from sugar3.graphics.toggletoolbutton import ToggleToolButton
@@ -465,6 +466,11 @@ Discard changes?')
def _export_document_cb(self, __):
self.copy()
+ alert = NotifyAlert()
+ alert.props.title = _('Saved')
+ alert.props.msg = _('The document has been saved to journal.')
+ alert.connect('response', lambda x, i: self.remove_alert(x))
+ self.add_alert(alert)
def _create_bundle_cb(self, __):
from shutil import copytree, copy2, rmtree
@@ -636,8 +642,6 @@ Do you want to overwrite it?')
try:
text = open(file_path).read()
except:
- from sugar3.graphics.alert import NotifyAlert
-
alert = NotifyAlert(10)
alert.props.title = _('Error')
alert.props.msg = _('Error reading data.')