Closed icarito closed 8 years ago
Also tested running activities from GNOME under OLPC-OS.
Here's a feature page: https://wiki.sugarlabs.org/go/Features/FreeDesktop_integration
The intention is to support this experiment. Might even include in patch? https://github.com/icarito/sugar-launcher-applet
Reviewed c85738d. Like it.
Suggest packaged activities might also provide .desktop files.
Suggest sugar-activity might also accept path to unpacked bundle.
Very nice. A few suggestions:
It would be nice if the changes to the POT for sugar-toolkit-gtk3 could be incorporated in this pull request, please.
Hi @icarito, thanks for the patch.
An important consideration for this patch is code architecture. I think that right now, it is not a good architecture. It is hacking around things that the toolkit (and also activities) previosuly assumed were present; eg. compensating for the lack of gsettings.
I think that maybe we could do this better by having a "launcher script" that setup the environment for the activity (eg. ensure that the gsettings are set up properly), and then launch the activity as per the activity.info description. That script could be shipped with sugar, or sugar-toolkit-gtk3.
Maybe the script could look like: sugar-external-launch-activity /usr/sugar/activities/Browse.activity
?
I'm fine with this level of hacking around things at this stage of feature development; none of the hacks should cause problems in this release. Architectural improvements can come later.
We already have sugar-launch
so perhaps it could be adjusted to recognise that the process environment is not Sugar but some other desktop. That would let us use the same tool in multiple places.
What is the need to "handle the lack of gsettings"? If the user has installed sugar, won't they have the gsettings schemas installed and therefore available? This is what happened when I tested on my Fedora machine.
What is the need to "handle the lack of gsettings"?
org.sugarlabs.user may be either not set, or not available.
If the user has installed sugar, won't they have the gsettings schemas installed and therefore available?
Not if they have only installed the toolkit.
Not if the GSettings infrastructure is unavailable, as happens on some desktop environments that predate or are not subsets of Gnome.
Everybuddy thanks for your kind reviews. I think I've handled most everybuddy's concerns with the latest version of the patch. Of course more could be done. Looking forward.
Love it. Looking good.
Just 1 thing before the merge. Please move the import statements to the top of the file, with the other import statements.
Done!
I imagine sugar-toolkit-gtk3 might be uploaded to the python cheese shop :-)
Hi this decouples sugar-toolkit-gtk3 from the sugar-shell which might be a first step towards running under broadwayd (HTML5). @godiard @quozl are we good enough to merge? Thanks in advance!
Suggest packaged activities might also provide .desktop files.
Do you mean activities themselves should provide .desktop files? Perhaps we could provide a script activity_info2desktopfile
.
@icarito,
Na, this stuff is all good. @quozl, feel free to do the merge in future. I will actually merge it this time.
@samdroid-apps moving imports to the top of the file broke GTK2 activities! I've provided #317 to fix it, or we could move the import to the conditional in this case.
(credit goes to @quozl for figuring the issue out!)
@leonardcj I had answered your concern by updating the commit message but I guess github doesn't email updated commit logs:
It would be nice if the changes to the POT for sugar-toolkit-gtk3 could be incorporated in this pull request, please.
- There were no changes to POT files as part of this patch. Maybe it is worth translating low level command line tools, not sure. Currently they aren't, and changing that goes beyond the scope of this patch.
Please also review and merge the companion patch to sugar-toolkit: https://github.com/sugarlabs/sugar-toolkit/pull/3
Thanks in advance!
Try it outside Sugar. Go to an Activity directory and run 'sugar-activity'. Tested it with Terminal, Finance, Write, Browse, Memorize under XFCE4. Tested in Gnome under OLPC-OS. Also works from Sugar Terminal Activity. Does not affect regular Sugar operation.