From 67af1cb77d56bd327b1710f3751fd3da115fe6d4 Mon Sep 17 00:00:00 2001 From: Pootle daemon Date: Sun, 7 Mar 2010 17:52:52 +0200 Subject: [PATCH 1/6] Commit from Sugar Labs: Translation System by user Clytie.: 40 of 40 messages translated (0 fuzzy). --- po/vi.po | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/po/vi.po b/po/vi.po index 06606aa4..062173a7 100644 --- a/po/vi.po +++ b/po/vi.po @@ -5,7 +5,7 @@ msgid "" msgstr "" "Project-Id-Version: sugar-toolkit\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2009-08-26 00:33-0400\n" +"POT-Creation-Date: 2010-01-20 13:10-0500\n" "PO-Revision-Date: 2009-09-25 09:03-0400\n" "Last-Translator: Clytie Siddall \n" "Language-Team: Vietnamese \n" @@ -16,24 +16,24 @@ msgstr "" "Plural-Forms: nplurals=1; plural=0;\n" "X-Generator: Pootle 1.2.1\n" -#: ../src/sugar/activity/activity.py:329 +#: ../src/sugar/activity/activity.py:338 #, python-format msgid "%s Activity" msgstr "Hoạt động %s" -#: ../src/sugar/activity/activity.py:714 +#: ../src/sugar/activity/activity.py:738 msgid "Keep error" msgstr "Giữ lỗi" -#: ../src/sugar/activity/activity.py:715 +#: ../src/sugar/activity/activity.py:739 msgid "Keep error: all changes will be lost" msgstr "Giữ lỗi: tất cả các thay đổi sẽ bị mất" -#: ../src/sugar/activity/activity.py:718 +#: ../src/sugar/activity/activity.py:742 msgid "Don't stop" msgstr "Không dừng" -#: ../src/sugar/activity/activity.py:721 +#: ../src/sugar/activity/activity.py:745 msgid "Stop anyway" msgstr "Vẫn dừng" @@ -42,7 +42,7 @@ msgid "Name this entry" msgstr "Đặt tên mục nhập này" #: ../src/sugar/activity/namingalert.py:87 -#: ../src/sugar/activity/widgets.py:162 +#: ../src/sugar/activity/widgets.py:166 msgid "Keep" msgstr "Giữ" @@ -58,35 +58,35 @@ msgstr "Mô tả:" msgid "Tags:" msgstr "Thẻ:" -#: ../src/sugar/activity/widgets.py:79 +#: ../src/sugar/activity/widgets.py:83 msgid "Stop" msgstr "Dừng" -#: ../src/sugar/activity/widgets.py:91 +#: ../src/sugar/activity/widgets.py:95 msgid "Undo" msgstr "Hủy bước" -#: ../src/sugar/activity/widgets.py:99 +#: ../src/sugar/activity/widgets.py:103 msgid "Redo" msgstr "Hoàn lại" -#: ../src/sugar/activity/widgets.py:106 +#: ../src/sugar/activity/widgets.py:110 msgid "Copy" msgstr "Chép" -#: ../src/sugar/activity/widgets.py:113 +#: ../src/sugar/activity/widgets.py:117 msgid "Paste" msgstr "Dán" -#: ../src/sugar/activity/widgets.py:123 +#: ../src/sugar/activity/widgets.py:127 msgid "Private" msgstr "Riêng" -#: ../src/sugar/activity/widgets.py:130 +#: ../src/sugar/activity/widgets.py:134 msgid "My Neighborhood" msgstr "Hàng xóm mình" -#: ../src/sugar/activity/widgets.py:341 +#: ../src/sugar/activity/widgets.py:345 msgid "Activity" msgstr "Hoạt động" From 3bf70d642c0015ff50655d106026169893aaffbd Mon Sep 17 00:00:00 2001 From: Aleksey Lim Date: Mon, 8 Mar 2010 10:55:07 +0000 Subject: [PATCH 2/6] Override canvas property in Activity class #1795 --- src/sugar/activity/activity.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/sugar/activity/activity.py b/src/sugar/activity/activity.py index d4892d04..ec12dca6 100644 --- a/src/sugar/activity/activity.py +++ b/src/sugar/activity/activity.py @@ -393,6 +393,9 @@ class Activity(Window, gtk.Container): """Returns the bundle_id from the activity.info file""" return os.environ['SUGAR_BUNDLE_ID'] + def get_canvas(self): + return Window.get_canvas(self) + def set_canvas(self, canvas): """Sets the 'work area' of your activity with the canvas of your choice. @@ -403,6 +406,8 @@ class Activity(Window, gtk.Container): if not self._read_file_called: canvas.connect('map', self.__canvas_map_cb) + canvas = property(get_canvas, set_canvas) + def __screen_size_changed_cb(self, screen): self._adapt_window_to_screen() From 6921bcd67dc8008d4ea7a7840b89d988aab2dc81 Mon Sep 17 00:00:00 2001 From: Aleksey Lim Date: Tue, 9 Mar 2010 18:56:21 +0000 Subject: [PATCH 3/6] Do not fail while closing object less activities #1714 --- src/sugar/activity/activity.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/sugar/activity/activity.py b/src/sugar/activity/activity.py index ec12dca6..dea36a06 100644 --- a/src/sugar/activity/activity.py +++ b/src/sugar/activity/activity.py @@ -805,7 +805,8 @@ class Activity(Window, gtk.Container): if not self.can_close(): return - if skip_save or self.metadata.get('title_set_by_user', '0') == '1': + if skip_save or self._jobject is None or \ + self.metadata.get('title_set_by_user', '0') == '1': if not self._closing: if not self._prepare_close(skip_save): return From f8ef93bd2106d24dfb9d20934abc4d0c1e7ce741 Mon Sep 17 00:00:00 2001 From: James Cameron Date: Tue, 9 Mar 2010 09:29:30 +1100 Subject: [PATCH 4/6] Removes the use of O_SYNC on logs #1656 With O_SYNC on open of log files, on systems with slow filesystem random write performance, there is random activity startup time. --- src/sugar/activity/activityfactory.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/sugar/activity/activityfactory.py b/src/sugar/activity/activityfactory.py index eda7d9a9..c12630e9 100644 --- a/src/sugar/activity/activityfactory.py +++ b/src/sugar/activity/activityfactory.py @@ -149,8 +149,7 @@ def open_log_file(activity): while True: path = env.get_logs_path('%s-%s.log' % (activity.get_bundle_id(), i)) try: - fd = os.open(path, os.O_EXCL | os.O_CREAT \ - | os.O_SYNC | os.O_WRONLY, 0644) + fd = os.open(path, os.O_EXCL | os.O_CREAT | os.O_WRONLY, 0644) f = os.fdopen(fd, 'w', 0) return (path, f) except OSError, e: From 63a5dcef05d108f73ed7610e593143123b193443 Mon Sep 17 00:00:00 2001 From: Wade Brainerd Date: Fri, 16 Oct 2009 22:42:03 -0400 Subject: [PATCH 5/6] Deprecate host_version #1509 --- src/sugar/bundle/contentbundle.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/sugar/bundle/contentbundle.py b/src/sugar/bundle/contentbundle.py index 4b483cbd..48e05a1f 100644 --- a/src/sugar/bundle/contentbundle.py +++ b/src/sugar/bundle/contentbundle.py @@ -74,18 +74,6 @@ class ContentBundle(Bundle): section = 'Library' - if cp.has_option(section, 'host_version'): - version = cp.get(section, 'host_version') - try: - if int(version) != 1: - raise MalformedBundleException( - 'Content bundle %s has unknown host_version ' - 'number %s' % (self._path, version)) - except ValueError: - raise MalformedBundleException( - 'Content bundle %s has invalid host_version number %s' % - (self._path, version)) - if cp.has_option(section, 'name'): self._name = cp.get(section, 'name') else: From d006092d37b180bb0490ab7e1182662afc5ae5cf Mon Sep 17 00:00:00 2001 From: Tomeu Vizoso Date: Sat, 6 Feb 2010 13:11:22 +0100 Subject: [PATCH 6/6] Log saving errors in activities #1703 --- src/sugar/activity/activity.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sugar/activity/activity.py b/src/sugar/activity/activity.py index dea36a06..c91a023c 100644 --- a/src/sugar/activity/activity.py +++ b/src/sugar/activity/activity.py @@ -522,7 +522,7 @@ class Activity(Window, gtk.Container): if self._closing: self._show_keep_failed_dialog() self._closing = False - logging.debug('Error saving activity object to datastore: %s', err) + raise RuntimeError('Error saving activity object to datastore: %s', err) def _cleanup_jobject(self): if self._jobject: @@ -774,7 +774,7 @@ class Activity(Window, gtk.Container): try: self.save() except: - logging.info(traceback.format_exc()) + logging.exception('Error saving activity object to datastore') self._show_keep_failed_dialog() return False