Commit Graph

53 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
dbe42ac6d9 Make the shell scripts just a tiny wrapper which setup
the python path and run main().
2008-02-04 20:36:09 +01:00
Marco Pesenti Gritti
1c361ea5dd Add a config module into the shell holding path informations.
Get rid of env.get_locale_path()
2008-02-04 19:16:46 +01:00
Marco Pesenti Gritti
33ae2dc548 Remove get_bin_path usage. 2008-02-04 19:04:22 +01:00
Marco Pesenti Gritti
e85a07e2d2 Work around for numpy/gtk issue with turkish locale. Fix #5559. 2008-01-10 18:33:50 +01:00
Tomeu Vizoso
b7e0ccbf81 #5512 import the activity module later. 2007-12-19 20:03:25 +01:00
Marco Pesenti Gritti
6046c8ed46 Reap only activity processes. Fix #5044 2007-11-28 16:10:27 +01:00
Marco Pesenti Gritti
0aa31147db Strip out /usr/bin/env from the interpreter cmd,
it's apparently confusing gdb.
2007-11-13 14:19:07 +01:00
Marco Pesenti Gritti
4c66eec49b Completely get rid of sound in the shell to make
sure it's not causing problems.
2007-11-13 01:50:20 +01:00
Marco Pesenti Gritti
cc9e561153 Reap childs rather than ignoring them. 2007-11-02 17:05:54 +01:00
Marco Pesenti Gritti
d445bc086d Free the sound device when the startup when the sound has been played.
Factored out to a separate sound module from cjb patch.
2007-11-02 11:04:41 +01:00
Simon Schampijer
70079de872 refinements in output of sugar-control 2007-11-01 12:37:43 +01:00
Simon Schampijer
14ffdc1d03 sugar-control: fixed some imports, cleaned some strings 2007-10-31 11:32:54 +01:00
Simon Schampijer
38b87ad7cd sugar-control: add env import 2007-10-31 10:36:38 +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
880f1c637d Parse arguments rather than forking out a shell 2007-10-23 18:22:59 +02:00
Marco Pesenti Gritti
0daccca71f Fake backup script 2007-10-22 22:03:39 +02:00
Tomeu Vizoso
5084ecf4f4 Add the posibility to launch activitis in gdb to sugar-lauch. 2007-10-18 13:32:12 +02:00
Marco Pesenti Gritti
cb0cedbc40 Do not use prgname for the bundle id because xulrunner
is messing with it. Some activity launch fixes.
2007-10-16 14:29:38 +02:00
Marco Pesenti Gritti
68ff71a0cb Split part of the sugar library to sugar-base 2007-10-15 15:39:07 +02:00
Marco Pesenti Gritti
a0bd80bb4e Snapshot 6c7c6a503b. 2007-10-09 23:46:21 +02:00
Marco Pesenti Gritti
b44a2916ba Rework sugar.logger and make activities just
redirect their output to a log.
2007-10-09 18:58:39 +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
6073a396b3 Rename activity service_name to bundle_id 2007-10-09 13:15:06 +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
44b7eaefcc Make sure we import the right pygobject 2007-09-29 11:53:09 +02:00
Bert Freudenberg
11df3e4eb2 Support dbus introspection in sugar-native-factory (#2477) 2007-09-25 16:07:48 +02:00
Dan Winship
6cfae625a3 update sugar-install-bundle for Bundle -> ActivityBundle 2007-09-21 15:16:53 -04:00
Bernardo Innocenti
b8ce5083b7 use exec to run dbus-session to eliminate the parent shell. 2007-09-17 18:12:05 -04:00
Marco Pesenti Gritti
294a5231b9 2647, if security is enabled let rainbow launch activities.
Also notify rainbow when active activity changes.
Patch by Ashsong, had to merge it manually.
2007-08-27 18:25:45 +02:00
Dan Williams
0408ea189d Fix errors in native factory 2007-08-20 17:01:14 -04:00
Tomeu Vizoso
ecca1dca00 Add caching to the activity and object type registries. 2007-07-09 20:14:24 +02:00
Marco Pesenti Gritti
30bee7e43a Adapt to API changes 2007-06-29 22:14:27 +02:00
Marco Pesenti Gritti
858e43dea9 Add the native factory by bertf 2007-06-29 13:15:36 +02:00
Marco Pesenti Gritti
0e4efae7ae Add missing shebang 2007-06-20 15:42:21 +02:00
Tomeu Vizoso
cb9dd212e9 Add to Bundle facilities for dealing with not-yet-installed bundles. 2007-06-15 11:36:08 +02:00
Tomeu Vizoso
b320ea36cf Some activity registry fixes. Thanks cjb. 2007-06-13 11:50:05 +02:00
Tomeu Vizoso
22689ed1da Several fixes for the object type registry and the activity registry. 2007-06-12 21:57:49 +02:00
Marco Pesenti Gritti
d271e1f481 Fix new instance message 2007-05-31 14:22:26 +02:00
Marco Pesenti Gritti
11437e3484 Add mime matching to the registry. 2007-05-27 20:43:31 +02:00
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.
2007-05-27 20:24:10 +02:00
Marco Pesenti Gritti
4a8493f95e Fix mozilla components loading when sugar is running from source.
We don't attempt to load components from source, since that would
be insanely complicated.
2007-05-15 11:50:21 +02:00
Marco Pesenti Gritti
5b55fbc99e Use the sugar-xo theme on the xo 2007-05-11 16:55:43 +02:00
Marco Pesenti Gritti
152361c592 Do not fallback to SUGAR_PREFIX for the sugar path. Require SUGAR_PATH. 2007-05-01 16:42:43 +02:00
Marco Pesenti Gritti
ba23a6ed3a Add a SUGAR_PATH env to override $prefix/share/sugar 2007-04-15 13:54:53 +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