Commit Graph

15 Commits

Author SHA1 Message Date
Daniel Drake
4e137f6e4f sugar-activity: import and make independent of sugar-toolkit GTK versions
As we move to adding support for a second UI toolkit (GTK+ 3.x),
the sugar-activity binary used by all activities must become
backend-toolkit-independent. It would be wasteful to have two backend
toolkits loaded in memory, and in the GTK2/GTK3 case, it is impossible
(importing both results in an instant crash).

To achieve this, we split the existing sugar-toolkit activity/main.py:main()
functionality into two parts, moving it into the sugar-activity binary and
the Activity class as follows:
 1. All toolkit-specific stuff is moved into the Activity class (i.e.
   everything that interacts with GTK)
 2. Everything that can be reasonably/easily moved into the Activity class
   is also moved.
 3. What remains is the stuff that is inherently involved with the
   construction of the Activity object, not related to UI toolkits. This
   is moved into the sugar-activity binary.

main.py is then removed from sugar-toolkit, and sugar-activity is moved
from sugar to sugar-toolkit-gtk3 in order to keep toolkit-related code
with the toolkit itself.

With this work done, the one remaining question is how to invoke the main
loop. An optional run_main_loop() method is added to the activity class,
for GTK2 this will run the GTK2 main loop, for GTK3 the GTK3 main loop will
be run, etc.

Signed-off-by: Daniel Drake <dsd@laptop.org>
2011-12-13 17:35:30 -03:00
Marco Pesenti Gritti
488402df7d Split sugar-toolkit out of sugar shell. 2008-02-06 10:20:33 +01:00
Marco Pesenti Gritti
44efc2a131 Complete paths cleanup and remove SUGAR_PREFIX and
SUGAR_PATH environment variables.
2008-02-05 01:21:55 +01:00
Marco Pesenti Gritti
aca3ae6c88 Remove get_service_path and use the usual wrapper script approach. 2008-02-05 01:02:33 +01:00
Marco Pesenti Gritti
b72f00e30b Integrate control panel in the build so that I can actually
distcheck.
2007-10-31 00:05:16 +01:00
Marco Pesenti Gritti
0daccca71f Fake backup script 2007-10-22 22:03:39 +02:00
Marco Pesenti Gritti
a0bd80bb4e Snapshot 6c7c6a503b. 2007-10-09 23:46:21 +02:00
Marco Pesenti Gritti
7c59d10a06 Actually remove the factory 2007-10-09 16:24:38 +02:00
Marco Pesenti Gritti
c2982f2774 Implement a sugar-launch command. Works like the old sugar-activity
but should deal fine with native activities too.
2007-10-09 15:25:24 +02:00
Marco Pesenti Gritti
6ebe910e93 In preparation of enabling rainbow by default, remove
the factory service from the public API. The Exec field
will now launch an activity instance.
Add a -s argument to sugar-activity to enable the single
process mode for activities that really need it.
2007-10-08 14:56:12 +02:00
Marco Pesenti Gritti
858e43dea9 Add the native factory by bertf 2007-06-29 13:15:36 +02:00
Marco Pesenti Gritti
5a4bf4be6b Some paths tweaks, refactorings to make sugar self contained as much as possible 2007-04-15 13:04:38 +02:00
Marco Pesenti Gritti
49ff2f86de Move not shell specific scripts in bin 2007-04-06 15:22:22 +02:00
Marco Pesenti Gritti
04654a7eef Fix distcheck, fix the gtkrc path 2007-03-22 21:06:30 +01:00
Marco Pesenti Gritti
9af06c0b26 Add a script to start sugar. Move the gtkrc to avoid conflicts when
installing on a complete system.
2007-03-22 20:34:07 +01:00