16 Commits (4e137f6e4f131e5bb5b468d02af8f646da1fc28a)

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>
13 years ago
Marco Pesenti Gritti 488402df7d Split sugar-toolkit out of sugar shell. 17 years ago
Marco Pesenti Gritti dbe42ac6d9 Make the shell scripts just a tiny wrapper which setup
the python path and run main().
17 years ago
Tomeu Vizoso b7e0ccbf81 #5512 import the activity module later. 17 years ago
Marco Pesenti Gritti cb0cedbc40 Do not use prgname for the bundle id because xulrunner
is messing with it. Some activity launch fixes.
17 years ago
Marco Pesenti Gritti 68ff71a0cb Split part of the sugar library to sugar-base 17 years ago
Marco Pesenti Gritti b44a2916ba Rework sugar.logger and make activities just
redirect their output to a log.
17 years ago
Marco Pesenti Gritti 6073a396b3 Rename activity service_name to bundle_id 17 years ago
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.
17 years ago
Marco Pesenti Gritti 44b7eaefcc Make sure we import the right pygobject 17 years ago
Marco Pesenti Gritti 30bee7e43a Adapt to API changes 17 years ago
Tomeu Vizoso b320ea36cf Some activity registry fixes. Thanks cjb. 17 years ago
Tomeu Vizoso 22689ed1da Several fixes for the object type registry and the activity registry. 17 years ago
Marco Pesenti Gritti d271e1f481 Fix new instance message 17 years ago
Marco Pesenti Gritti 42fef182f4 Refactor the bundle registry. Move it inside
the shell and expose the parts that should be
public to the shell dbus service.
17 years ago
Marco Pesenti Gritti 49ff2f86de Move not shell specific scripts in bin 17 years ago