-
Notifications
You must be signed in to change notification settings - Fork 274
Detects Python 2 Activities_ fixes #991 #998
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed, not tested.
Please look at a diff of your changes before making them, some of the No new line at EOF could've been picked up that way.
If you use a tool like cat to view the file with No new line at EOF, you'll understand why you need to remove them.
#: ../src/jarabe/view/launcher.py:159 | ||
#, python-format | ||
msgid "<b>%s</b> cannot start because it was made for an older version." | ||
msgstr "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the No new line at EOF.
del self._launch_timers[activity_id] | ||
|
||
timer = GLib.timeout_add_seconds(90, self._check_activity_launched, | ||
timer = GLib.timeout_add_seconds(10, self._check_activity_launched, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The commit that introduced this is 6528ba5, did you check to confirm if the issue still exists after your change?
|
||
if self.get_launcher(activity_id) is not None: | ||
self.emit('launch-failed', home_activity) | ||
self.emit('launch-failed', home_activity) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why the extra spaces at the end?
if _model is None: | ||
_model = ShellModel() | ||
return _model | ||
return _model |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the No new line at EOF.
launcher.error_text.props.label = _('<b>%s</b> failed to start.') % \ | ||
home_activity.get_activity_name() | ||
if hasattr(home_activity, 'is_python2_activity') and home_activity.is_python2_activity: | ||
launcher.error_text.props.label = _('<b>%s</b> cannot start because it was made for an older version.') % \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A better error message would be specifying that it was made for Python2 and that's old.
|
||
shell.get_model().unregister_launcher(activity_id) | ||
launcher.destroy() | ||
launcher.destroy() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the No new line at EOF.
@chimosky I have my exams this week, I'll correct them by next week. |
|
Issue: #991
Launcher animation running for 90 seconds minute before reporting "failed to start"
No meaningful error in the activity log.
A FileNotFoundError for sugar-activity in shell.log.
The requirements included:
Reduce the launcher animation timeout to 10 seconds.
Display custom message in launcher.
Ensure the activity log reflects the failure (handled in sugar-toolkit-gtk3).
Changes in This PR
Launcher Animation Timeout Reduction: Adjusted the launcher timeout from 90 seconds to 10.
Display of custom Error Message in Launcher due to Python2 activity.
Translation Support: Added the new error message to the translation catalog in sugar.pot. (Currently only in sugar.pot; additional language files pending.)
The following requirements are addressed in a separate PR in sugar-toolkit-gtk3:
Handling the FileNotFoundError exception in activityfactory.py.
Logging the error to the activity log when "sugar-activity" is detected in the exception.
Testing
Tested on Fedora 41 with Sugar 0.121.
Used the Calculate activity (version 44) to verify:
The launcher animation stops after 10 seconds.
The custom error message is displayed in the launcher when the activity fails due to a missing sugar-activity.
Notes
Please review the companion PR in the sugar-toolkit-gtk3 repo sugarlabs/sugar-toolkit-gtk3#487 .
@quozl, @chimosky, would really appreciate if you could review this.