Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSascha Silbe <sascha-pgp@silbe.org>2010-08-18 13:35:03 (GMT)
committer Sascha Silbe <sascha-pgp@silbe.org>2010-08-18 13:35:03 (GMT)
commite154274b7da6c61cc8c7493efa690ec015c0439a (patch)
tree9b91e0fe4e2d0b650445fa505bfb36a88f0b9dc7
parent9d4532b0ea53dfbcd45590ce4f317835c3d954a7 (diff)
parentb8991e17501251e0e2b70a3cf41ba76459327b21 (diff)
Merge commit 'b8991e17501251e0e2b70a3cf41ba76459327b21' into t/bug-1786
-rw-r--r--configure.ac2
-rw-r--r--po/nl.po44
-rw-r--r--src/sugar/bundle/activitybundle.py5
-rw-r--r--src/sugar/datastore/datastore.py6
-rw-r--r--src/sugar/graphics/alert.py45
5 files changed, 79 insertions, 23 deletions
diff --git a/configure.ac b/configure.ac
index 07210c4..f66d564 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,4 +1,4 @@
-AC_INIT([sugar-toolkit],[0.89.1],[],[sugar-toolkit])
+AC_INIT([sugar-toolkit],[0.89.3],[],[sugar-toolkit])
AC_PREREQ([2.59])
diff --git a/po/nl.po b/po/nl.po
index fe97897..1b1fc01 100644
--- a/po/nl.po
+++ b/po/nl.po
@@ -2,48 +2,52 @@
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
-"POT-Creation-Date: 2009-08-26 00:33-0400\n"
-"PO-Revision-Date: 2009-09-05 07:26-0400\n"
-"Last-Translator: Myckel Habets <myckel@sdf.lonestar.org>\n"
+"POT-Creation-Date: 2010-01-20 13:10-0500\n"
+"PO-Revision-Date: 2010-06-28 21:09+0200\n"
+"Last-Translator: whe <heppew@yahoo.com>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: nl\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
-"X-Generator: Pootle 1.2.1\n"
+"X-Generator: Pootle 2.0.3\n"
-#: ../src/sugar/activity/activity.py:329
+#: ../src/sugar/activity/activity.py:338
#, python-format
msgid "%s Activity"
-msgstr "%s activiteit"
+msgstr "%s Activiteit"
-#: ../src/sugar/activity/activity.py:714
+#: ../src/sugar/activity/activity.py:738
msgid "Keep error"
msgstr "Bewaarfout"
-#: ../src/sugar/activity/activity.py:715
+#: ../src/sugar/activity/activity.py:739
msgid "Keep error: all changes will be lost"
msgstr "Bewaarfout: alle veranderingen zijn verloren gegaan"
-#: ../src/sugar/activity/activity.py:718
+#: ../src/sugar/activity/activity.py:742
msgid "Don't stop"
msgstr "Niet stoppen"
-#: ../src/sugar/activity/activity.py:721
+#: ../src/sugar/activity/activity.py:745
msgid "Stop anyway"
msgstr "Toch stoppen"
#: ../src/sugar/activity/namingalert.py:82
msgid "Name this entry"
-msgstr "Benoem deze ingang"
+msgstr "Benoem deze invoer"
#: ../src/sugar/activity/namingalert.py:87
-#: ../src/sugar/activity/widgets.py:162
+#: ../src/sugar/activity/widgets.py:166
msgid "Keep"
msgstr "Behouden"
@@ -59,35 +63,35 @@ msgstr "Beschrijving:"
msgid "Tags:"
msgstr "Labels:"
-#: ../src/sugar/activity/widgets.py:79
+#: ../src/sugar/activity/widgets.py:83
msgid "Stop"
msgstr "Stop"
-#: ../src/sugar/activity/widgets.py:91
+#: ../src/sugar/activity/widgets.py:95
msgid "Undo"
msgstr "Ongedaan maken"
-#: ../src/sugar/activity/widgets.py:99
+#: ../src/sugar/activity/widgets.py:103
msgid "Redo"
msgstr "Herhalen"
-#: ../src/sugar/activity/widgets.py:106
+#: ../src/sugar/activity/widgets.py:110
msgid "Copy"
msgstr "Kopiëren"
-#: ../src/sugar/activity/widgets.py:113
+#: ../src/sugar/activity/widgets.py:117
msgid "Paste"
msgstr "Plakken"
-#: ../src/sugar/activity/widgets.py:123
+#: ../src/sugar/activity/widgets.py:127
msgid "Private"
msgstr "Privé"
-#: ../src/sugar/activity/widgets.py:130
+#: ../src/sugar/activity/widgets.py:134
msgid "My Neighborhood"
msgstr "Mijn omgeving"
-#: ../src/sugar/activity/widgets.py:341
+#: ../src/sugar/activity/widgets.py:345
msgid "Activity"
msgstr "Activiteit"
diff --git a/src/sugar/bundle/activitybundle.py b/src/sugar/bundle/activitybundle.py
index c83257f..673db67 100644
--- a/src/sugar/bundle/activitybundle.py
+++ b/src/sugar/bundle/activitybundle.py
@@ -25,6 +25,7 @@ import locale
import os
import tempfile
import logging
+import warnings
from sugar import env
from sugar import util
@@ -151,6 +152,8 @@ class ActivityBundle(Bundle):
self._bundle_id = cp.get(section, 'bundle_id')
# FIXME deprecated
elif cp.has_option(section, 'service_name'):
+ warnings.warn('use bundle_id instead of service_name ' \
+ 'in your activity.info', DeprecationWarning)
self._bundle_id = cp.get(section, 'service_name')
else:
raise MalformedBundleException(
@@ -165,6 +168,8 @@ class ActivityBundle(Bundle):
# FIXME class is deprecated
if cp.has_option(section, 'class'):
+ warnings.warn('use exec instead of class ' \
+ 'in your activity.info', DeprecationWarning)
self.activity_class = cp.get(section, 'class')
elif cp.has_option(section, 'exec'):
self.bundle_exec = cp.get(section, 'exec')
diff --git a/src/sugar/datastore/datastore.py b/src/sugar/datastore/datastore.py
index 1618cef..656afcc 100644
--- a/src/sugar/datastore/datastore.py
+++ b/src/sugar/datastore/datastore.py
@@ -250,9 +250,11 @@ class RawObject(object):
# to create hardlinks to jobject files
# and w/o this, it wouldn't work since we have file from mounted device
if self._file_path is None:
+ data_path = os.path.join(env.get_profile_path(), 'data')
self._file_path = tempfile.mktemp(
- prefix='rawobject',
- dir=os.path.join(env.get_profile_path(), 'data'))
+ prefix='rawobject', dir=data_path)
+ if not os.path.exists(data_path):
+ os.makedirs(data_path)
os.symlink(self.object_id, self._file_path)
return self._file_path
diff --git a/src/sugar/graphics/alert.py b/src/sugar/graphics/alert.py
index 4441909..a4dd017 100644
--- a/src/sugar/graphics/alert.py
+++ b/src/sugar/graphics/alert.py
@@ -28,6 +28,7 @@ create a simple alert message.
STABLE.
"""
# Copyright (C) 2007, One Laptop Per Child
+# Copyright (C) 2010, Anish Mangal <anishmangal2002@gmail.com>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -290,6 +291,50 @@ class ConfirmationAlert(Alert):
self.add_button(gtk.RESPONSE_OK, _('Ok'), icon)
icon.show()
+class ErrorAlert(Alert):
+ """
+ This is a ready-made one button (Ok) alert.
+
+ An error alert is a nice shortcut from a standard Alert because it
+ comes with the 'OK' button already built-in. When clicked, the
+ 'OK' button will emit a response with a response_id of gtk.RESPONSE_OK.
+
+ Examples
+ --------
+
+ .. code-block:: python
+ from sugar.graphics.alert import ErrorAlert
+ ...
+ #### Method: _alert_error, create a Error alert (with ok
+ button standard)
+ # and add it to the UI.
+ def _alert_error(self):
+ alert = ErrorAlert()
+ alert.props.title=_('Title of Alert Goes Here')
+ alert.props.msg = _('Text message of alert goes here')
+ alert.connect('response', self._alert_response_cb)
+ self.add_alert(alert)
+
+
+ #### Method: _alert_response_cb, called when an alert object throws a
+ response event.
+ def _alert_response_cb(self, alert, response_id):
+ #remove the alert from the screen, since either a response button
+ #was clicked or there was a timeout
+ self.remove_alert(alert)
+
+ #Do any work that is specific to the response_id.
+ if response_id is gtk.RESPONSE_OK:
+ print 'Ok Button was clicked. Do any work upon ok here ...'
+
+ """
+
+ def __init__(self, **kwargs):
+ Alert.__init__(self, **kwargs)
+
+ icon = Icon(icon_name='dialog-ok')
+ self.add_button(gtk.RESPONSE_OK, _('Ok'), icon)
+ icon.show()
class _TimeoutIcon(hippo.CanvasText, hippo.CanvasItem):
"""An icon with a round border"""