-
Notifications
You must be signed in to change notification settings - Fork 4
Python3 port #12
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
Python3 port #12
Conversation
* Run 2to3 * Port telepathy static bindings to TelepathyGLib Signed-off-by: Ibiam Chihurumnaya <ibiamchihurumnaya@gmail.com>
Activity uses telepathy tubes chan, this port aims to move collaboration to collabwrapper. When a user opens the activity, the images shown in the activity are saved in a zip file and shared to other users when the activity is shared. The joined users receive the zip file if they have enough disk space for it. Replace the use of tempfile with activity_zip to save images as a zipfile. Activity currently takes a while to load as load_journal_table searches for images from the root directory and it's subdirectories. TODO - Test collaboration. - Fix issues with zipfile. - Restrict image search to journal objects. Signed-off-by: Ibiam Chihurumnaya <ibiamchihurumnaya@gmail.com>
Activity load time has reduced. Signed-off-by: Ibiam Chihurumnaya <ibiamchihurumnaya@gmail.com>
Some things that were done are no longer needed, this commit removes them. There's no need to extract any file anymore as they're all journal objects already. Remove the redundant step when looping over journal objects. Signed-off-by: Ibiam Chihurumnaya <ibiamchihurumnaya@gmail.com>
When activity is resumed this error is seen in the logs; Warning: g_value_get_int: assertion 'G_VALUE_HOLDS_INT (value)' failed This commit fixes that as it basically blocks the callbacks to the insert-text and activate signals, then sets the text in self.num_page_entry before unblocking both signals. - Pass the path of self.activity_zip to _load_document - Remove sensitive set on self._slides_toolbar.extract_image as the method was removed earlier and no longer exists. Signed-off-by: Ibiam Chihurumnaya <ibiamchihurumnaya@gmail.com>
|
collabwrapper.py is not the latest, is that okay? When testing on Ubuntu 20.04, this is what happens; |
On Ubuntu 20.04 with librsvg 2.48.0 the activity does fail to start and
logs contain;
Traceback (most recent call last):
File "/usr/bin/sugar-activity3", line 5, in <module>
activityinstance.main()
File "/usr/lib/python3/dist-packages/sugar3/activity/activityinstance.py", line 230, in main
instance = create_activity_instance(activity_constructor, activity_handle)
File "/usr/lib/python3/dist-packages/sugar3/activity/activityinstance.py", line 59, in create_activity_instance
activity = constructor(handle)
File "/usr/share/sugar/activities/ViewSlides.activity/viewslides.py", line 160, in __init__
activity.Activity.__init__(self, handle)
File "/usr/lib/python3/dist-packages/sugar3/activity/activity.py", line 468, in __init__
self.set_icon_from_file(bundle.get_icon())
gi.repository.GLib.Error: rsvg-error-quark: Failed to load image “/usr/share/sugar/activities/ViewSlides.activity/activity/ViewSlides.svg”: XML parse error: error code=201 (3) in (null):28:45: Namespace prefix sodipodi for ry on path is not defined
(0)
librsvg 2.47.0 introduced stricter namespaces in the XML parser,
https://gitlab.gnome.org/GNOME/librsvg/-/blob/master/NEWS#L67
so add namespace declarations.
Signed-off-by: Ibiam Chihurumnaya <ibiamchihurumnaya@gmail.com>
Signed-off-by: Ibiam Chihurumnaya <ibiamchihurumnaya@gmail.com>
Thanks for pointing that out, was testing something at the time and forgot to remove my changes, fixed in ceb20b3. Kindly test 7524118 and let me know if the issue is fixed, also let me know if the librsvg version is wrong as that's the last you tested with when fixing a similar issue earlier. |
Use context manager Signed-off-by: Ibiam Chihurumnaya <ibiamchihurumnaya@gmail.com>
|
At the moment the activity works as expected and the only existing issue like the one stated above still exist on master so I don't see that as a hindrance. Although the port to collabwrapper is still a WIP, I think this can be merged and a release made and the port to collabwrapper fixed later. @quozl thoughts? |
|
Sure. Let not the good be the enemy of the perfect.
|
Agreed, thanks. |
TODO