diff --git a/src/sugar3/activity/activity.py b/src/sugar3/activity/activity.py index 970ccb48..0f555fc3 100644 --- a/src/sugar3/activity/activity.py +++ b/src/sugar3/activity/activity.py @@ -454,7 +454,7 @@ class Activity(Window, Gtk.Container): def _initialize_journal_object(self): title = _('%s Activity') % get_bundle_name() - + icon_color = get_color().to_string() jobject = datastore.create() @@ -851,7 +851,7 @@ class Activity(Window, Gtk.Container): This method is called by the close() method below. In general, activities should not override this method. This method is part of the - public API of an Acivity, and should behave in standard ways. Use your + public API of an Activity, and should behave in standard ways. Use your own implementation of write_file() to save your Activity specific data. ''' @@ -1048,6 +1048,11 @@ class Activity(Window, Gtk.Container): pservice.share_activity(self, private=private) def _show_keep_failed_dialog(self): + ''' + A keep error means the activity write_file method raised an + exception before writing the file, or the datastore cannot be + written to. + ''' alert = Alert() alert.props.title = _('Keep error') alert.props.msg = _('Keep error: all changes will be lost') @@ -1060,11 +1065,11 @@ class Activity(Window, Gtk.Container): alert.add_button(Gtk.ResponseType.OK, _('Stop anyway'), stop_icon) self.add_alert(alert) - alert.connect('response', self._keep_failed_dialog_response_cb) + alert.connect('response', self.__keep_failed_dialog_response_cb) self.reveal() - def _keep_failed_dialog_response_cb(self, alert, response_id): + def __keep_failed_dialog_response_cb(self, alert, response_id): self.remove_alert(alert) if response_id == Gtk.ResponseType.OK: self.close(skip_save=True)