Commit Graph

135 Commits

Author SHA1 Message Date
Gonzalo Odiard
e47feb3b0f Make webactivity and webkit1 implementations independient
We can't import webkit and Webkit2 in the same process
and that was introduced in 4ea52b3173

Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
2014-04-09 13:04:37 -03:00
Sam Parkinson
4ea52b3173 Now show sugar object choosers as file pickers in web activities 2014-03-29 21:48:28 +00:00
Daniel Narvaez
01ed63ee4b Fixes for pep8 1.5 2014-03-29 19:25:34 +00:00
Sam Parkinson
cbf325d994 Extend API for activities notifications
Add a new method, called notify_user, to the base
Activity class.

This method can be used by activity developers to
send notifications to the new notification front
end. ie.,

    self.notify_user('New High Score!',
                     'Your score is over 8999')
2014-03-28 12:20:51 -04:00
gauravp94
cf45a7a732 Add verbosity to the activity tests 2014-03-17 00:25:24 +05:30
gauravp94
d4b2e87276 port optparse to argparse in bundlebuilder.py 2014-03-11 02:06:35 +05:30
Gonzalo Odiard
62b60fa1e1 Inhibit suspend while a activity is shared
In some network environments, suspend/reume can make loose
messages and break collaboration. This patch inhibit suspend
when collaboration start. The implementation can be used by activities
or Sugar to inhibit suspend/resume when needed.

More information in http://dev.laptop.org/ticket/10363

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
2014-01-31 11:08:41 -03:00
Gonzalo Odiard
cf7a5905fd Remove unused code
Fixes pyflakes error

Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
2014-01-31 01:48:32 +01:00
Gonzalo Odiard
30b67cc3d1 Webkit1 compatibility: send 404 error if the file don't exists
Signed-off-by: Gonzalo Odiard <godiard@sugarlabs.org>
2014-01-30 12:08:55 -03:00
Sam Parkinson
8c8c913cb2 Fixes #1929, update toolbar examples in activity doc strings 2014-01-27 11:15:28 +11:00
Sai Vineet
29738c9087 Add Activity Testing API and check command to setup.py
./setup.py check now invokes tests in tests/ directory. tests directory should
have integration(UI tests) and unit(unit tests) sub directories, but it isn't
necessary to have any dir. of the above.
2014-01-03 14:33:58 +00:00
Emil Dudev
db2ba3e579 GConf to GSettings port 2013-12-27 17:39:02 +00:00
akskumarnot
81b388c554 Use proper formatting syntax, fixes #2170 2013-12-26 15:57:33 +01:00
Gonzalo Odiard
f52b4e1a96 Make webactivity compatible with webkit1
If a env variable SUGAR_USE_WEBKIT1 exists,
uses a different module to start the activity using a local webserver,
borrowed from wikipedia activity.
When use webkit1 the web inspector is not enabled, because do not work.

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
2013-12-13 10:56:21 -03:00
Gonzalo Odiard
c47b842fb9 Fix mistake in the last commit
Error detected by the tests.

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
2013-12-02 17:46:18 -03:00
Gonzalo Odiard
b8074549f6 Fix cloning activity in sugar - SL #4608
Probably this code was not included in the initial port from gtk2 to
gtk3, because is only used by Sugar, but now we need it.

I changed the way the parameter dist_name is used,
then a complementary patch in sugar is needed

Fixes #4608

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
2013-11-29 16:14:07 -03:00
Daniel Narvaez
e908aeb8ca Remove unused imports 2013-09-11 16:34:48 +02:00
Daniel Narvaez
d12a1d5131 Fix translations domains to point to new toolkit 2013-09-11 16:02:47 +02:00
Daniel Narvaez
b83ddaefaf Revert "Fix translations domains to point to new toolkit"
This reverts commit abe0de3ef8.
2013-09-11 15:59:34 +02:00
Daniel Narvaez
abe0de3ef8 Fix translations domains to point to new toolkit 2013-09-11 15:27:46 +02:00
Daniel Narvaez
9717e5954b Fix translations in non standard prefix
This drops a lot of code at the same time. The code in
__init__ was:

* Using a SUGAR_PREFIX environment variable that is not
defined anywhere
* Hardcoding prefix to /usr
* Setting up the sugar-base domain which doesn't exist anymore

The i18n module code was overcomplex because it was thought
for language packs which we don't support anymore, it was
not handling correctly locales with a country prefix, it
was hard coding the python prefix and it was not sorting
the directories as it intended too anyway.

The logic is very simple now. Use the locale directory in
the same prefix sugar-toolkit-gtk3 was installed, unless
SUGAR_LOCALEDIR is defined (for self contained bundles).
2013-09-10 22:55:11 +02:00
Manuel Quiñones
fa7a765f4e Drop session.py
SessionManager has been moved to shell, and the other class has
nothing inside.
2013-09-02 21:38:49 +02:00
Manuel Quiñones
d45560e3c7 Web activity: quit the GTK main loop when activity is destroyed
Fixes #4603 .

In GTK activities, this is done by _ActivitySession when the activity
unregisters itself, in _complete_close method.

Making the web activity aware of session logout will be handled in
another patch for the shell, see http://bugs.sugarlabs.org/ticket/4611
2013-08-30 08:36:28 -03:00
Manuel Quiñones
c8fa6bd694 Web activity: set activity name as the title of the window - SL #4605
At least View Source uses it.
2013-08-30 08:22:10 -03:00
Daniel Drake
147d80aa78 ActivityFactory: don't run which to check for rainbow
One less thing to do in the common activity startup path.
Also, which might not be available.
2013-07-13 11:05:41 -06:00
Daniel Narvaez
363eef5293 Fix pep8 2013-07-05 00:57:03 +02:00
surajgillespie
8c736d3870 Pass activity name to the webactivity 2013-07-05 00:53:23 +02:00
Daniel Drake
efaf9f9b2f Avoid use of uuid module
Upon import of uuid, that module uses ctypes.util to find libuuid/libc,
which involves forking a shell process which then forks and runs ldconfig.

ldconfig performs a whole bunch of disk accesses. This is a slowdown.

uuid.getnode() is also documented to be slow. Lets avoid using it in
the activity launch path; we don't need such a high degree of
randomness.

This makes activities launch 1-2 seconds faster on XO-1.
2013-07-04 11:43:54 -06:00
William Orr
8a6c935dd0 pep8'd sugar3.activity 2013-06-11 15:06:49 +02:00
Daniel Narvaez
9396b09ee4 Send bundleId and objectId to javascript
Also use the json module to generate the environemnt
dictionary string. This takes care of a None objectId
cleanly.
2013-06-10 15:46:54 +02:00
Gonzalo Odiard
58bab9cf6a Do not use the translated summary to get the value from gettext in the bundle builder
This patch is a rebased push from pull request #31

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
2013-06-10 15:46:54 +02:00
Daniel Narvaez
1f5e39f3a8 Cleanup environment initialization
We are not setting up a single sugar.window.environment object.
2013-06-10 15:46:54 +02:00
Daniel Narvaez
a1b73ff527 Rename HTML to web 2013-06-10 15:46:54 +02:00
Daniel Narvaez
8e381f9e2f Make the inspector toggle work reliably 2013-06-10 15:46:54 +02:00
Daniel Narvaez
28fe9b757f Use a relative path in the activities url
It's just a bit cleaner.
2013-06-10 15:46:54 +02:00
Daniel Narvaez
a30af509c2 Rework HTMLActivity to not inherit from Activity
This will make the activity use less memory and start faster.
2013-06-10 15:46:54 +02:00
Daniel Narvaez
3aadcbcbf0 Move the websocket service to the shell
It's a first step to make html activities much lighter. It also
just makes a lot more sense to have them interact directly with
the system rather than proxying through the python activity.
2013-06-10 15:46:54 +02:00
Daniel Narvaez
b276f61da1 Use javascript to setup websocket port and key 2013-06-10 15:46:54 +02:00
Daniel Narvaez
2fcac13791 Toggle the inspector on and off with ctrl-shift-i 2013-06-10 15:46:53 +02:00
Daniel Narvaez
0abae0e7d0 Use a custom scheme for app content
To get the origin right.
2013-06-10 15:46:53 +02:00
Daniel Narvaez
9f71aa864f Remove various unused bits 2013-05-05 01:44:03 +02:00
Daniel Narvaez
6c4a9b34a1 Add a get_xo_color API 2013-05-03 08:42:35 -03:00
Daniel Narvaez
671ad1ae3e Require authentication before making API calls
Otherwise anything might access the bus.

Note: This will not work if the user moves to another html page.  They
will not have a port/key passed in the query string of the URL, so
they won't be able to connect.
2013-05-03 08:40:44 -03:00
Daniel Narvaez
ff5612caee Add API to close an html activity
We are exposing it using a websocket server. The port of the server
is passed in the search string of the file:// url.
2013-05-03 08:40:24 -03:00
Daniel Narvaez
d4019684a3 Add exec script to build pure html activities
An hello world activity using the script
http://git.sugarlabs.org/hello-world/mainline/trees/html
2013-04-23 16:05:20 +02:00
Daniel Narvaez
c5f30a9fbe Support out of source directory builds
It works similarly to automake. The current working directory
is used as build directory.
2013-04-09 11:36:49 +02:00
Daniel Narvaez
07d593fe52 Rework the install to use git files
Instead of installing everything except a few ignored files. This
is consistent with the other packagers.
2013-04-09 11:36:04 +02:00
Daniel Narvaez
9db81af598 Remove a few unused keywords 2013-04-05 17:05:42 +02:00
Daniel Narvaez
db448c4eea Remove a lot of unused imports
Signed-off-by: Daniel Narvaez <dwnarvaez@gmail.com>
2013-04-03 22:01:55 +02:00
Simon Schampijer
dcbdcd77fe i18n get_locale_path: handle the case when the default locale is not set, SL #4450
If the default locale is not set (see SL #4450 for a use case), get_locale_path
does now return None so that the sugar-activity script can handle that case
cleanly.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Reviewed-by: Daniel Drake <dsd@laptop.org>
2013-03-08 10:29:17 +01:00
Manuel Quiñones
a7e0e5ae57 Make the size of the preview image a public constant
Instead of hardcoding it.

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
2013-02-04 11:51:03 -03:00
Manuel Kaufmann
7b8fa5e406 Activity title entry: auto-select text when tap/click in the entry, SL #4036
When the user taps/clicks in the activity title entry, the text
is selected automatically to change the whole title of the activity
easily.

Signed-off-by: Manuel Kaufmann <humitos@gmail.com>
Acked-by: Simon Schampijer <simon@laptop.org>
2012-11-28 11:48:18 +01:00
Simon Schampijer
6064fb30cc Add support for locking Palettes, SL #4008
This adds a property that indicates that a Palette should
behave in a locking manner. The behaviour is the same
as with the secondary Toolbars: when you hover over the invoking
widget the Palette will popdown and react to mouse movements,
leaving the invoker area or the Palette itself will popdown
the Palette again. When you click the invoking widget
the Palette will be locked. You have to unlock it again
to pop it down.

This patch makes the DescriptionButton and the Colorbutton
work.

If the DescriptionButton or the Colorbutton are placed in
the primary toolbar they will share the locked state with
the secondary toolbars. Only one can be locked at a time.

When a secondary toolbar is unlocked we do force that the
open Palettes are closed. Having a locking Palette in
a subtoolbar will also work (Activity Toolbar case or
ColorButton case in a few examples). There is no state
sharing implemented here at the moment, but so far we
do only have cases with one lockable Palette in a
subtoolbar.

This will also fix the case where we want to use the
OSK to edit the description of the activity SL #3887.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
2012-11-21 20:21:46 +01:00
Manuel Quiñones
ac3b0a3a14 Update style of Description palette - SL #4167
We can now use the PaletteMenuBox.

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
2012-11-10 11:30:30 +01:00
Simon Schampijer
2834344b98 DescriptionButton, ShareButton: set the toggle_palette option to True
Setting this option will popup the Palette on left click or tap
and popdown the Palette if it is up. This functionality has been
added with c4165967d5e05607db8b3e0969b516da87855431.

The ShareButton, which derrives from the RadioMenuButton, had the
desired behavior already overriding the on_clicked method, we
do this now in the invoker.

The DescriptionButton did only handle the popup part so far, with
this change the Palette will also popdown when the button is clicked
and the Palette is up.

Since both are Toolbuttons we have to set the hide_tooltip_on_click
property to False otherwise the popdown part would not function, see
1a8f89226b for more info.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
2012-11-06 15:21:35 +01:00
Simon Schampijer
063e40d77d ActivityButton: set the toggle_palette option to True
Setting this option will popup the Palette on left click or tap
and popdown the Palette if it is up. This functionality has been
added with c4165967d5e05607db8b3e0969b516da87855431.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
2012-10-23 11:29:02 +02:00
Gonzalo Odiard
2a15fbc0f2 Add in the metadata info about every startup time
Signed-off-by: Walter Bender <walter.bender@gmail.com>
Tested-by: Gonzalo Odiard <gonzalo@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
2012-10-05 09:17:04 -03:00
Gonzalo Odiard
3a30d3f84e Add management of summary property to the activity.info file
This summary is translatable as the Activity name and will be displayed
in the Activity list in the Home View.

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
2012-09-25 15:01:37 +02:00
Daniel Narvaez
4cc6967c8d Reimplement the wm module in C
The wm module in sugar-toolkit-gtk3 has been reimplemented
in C and made available through introspection. The same was
hard to achieve directly using the Gdk API.

We can drop wm.py and the wrapper around gdk_property_change.

Signed-off-by: Daniel Narvaez <dwnarvaez@gmail.com>
Acked-by: Simon Schampijer <simon@laptop.org>
2012-09-06 18:14:46 +02:00
Simon Schampijer
030ab202c8 Bundlebuilder: don't fail to package if git is not installed, OLPC #11341
When git is installed, it will return non-zero if it gets asked to list
the files in a non-git-repository. The subprocess.Popen instantiation is
successful in this case and the returncode attribute will contain the
error code from git. The current code handles this fine and does fall
back to our own source file listing facility.

If git isn't installed, however, trying to instantiate subprocess.Popen
will fail with OSError. We need to catch this and fall back to our own
source file listing facility like we do for the non-repository case.

Signed-off-by: Simon Schampijer <simon at laptop.org>
Reviewed-by: Gonzalo Odiard <gonzalo@laptop.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
2012-08-23 14:28:56 +02:00
Simon Schampijer
6330204e91 Move the translation initialisation to an earlier stage, SL #3654
Must be done early, some activities set translations globally. Remove
the support for the langpackdir.

Signed-off-by: Simon Schampijer <simon@laptop.org>
2012-06-05 23:45:26 +02:00
Simon Schampijer
433c6391ec Activity Toolbar Description input field wrap text, SL #3586
Signed-off-by: Gary C. Martin <garycmartin@googlemail.com
Acked-by: Simon Schampijer <simon@laptop.org>
2012-06-01 19:32:51 +02:00
Simon Schampijer
ab643a1076 Display spinner cursor when saving after closing the activity, OLPC #11691
Signed-off-by: Simon Schampijer <simon@laptop.org>
Reviewed-by: Daniel Drake <dsd@laptop.org>
Tested-by: Manuel Quiñones <manuq@laptop.org>
2012-05-30 11:56:34 +02:00
Simon Schampijer
3c39375d9b Use json as included in Python SL #3142
We use json as included in Python. This will make Sugar dependent on
Python 2.6 and Python 2.7 to have the highest JSON performance.

Signed-off-by: Simon Schampijer <simon@laptop.org>
2012-03-22 18:46:48 +01:00
Simon Schampijer
afcb2fcea9 Port get_preview method to cairo
Previously we were using a GdkPixmap [1] created with the get_snapshot [2]
method of the Gtk.Widget. GTK 3 encourages to use cairo surfaces
now instead.

The ported mothod does create a cairo surface similar to that of the canvas'
window and draws on that. Then we create a cairo image surface with
the desired preview size and scale the canvas surface on that.

Several people have been involved in this work: Gonzalo Odiard,
Manuel Quiñones and Benjamin Berg.

[1] http://developer.gnome.org/gdk/stable/gdk-Bitmaps-and-Pixmaps.html#GdkPixmap
[2] http://developer.gnome.org/gtk/stable/GtkWidget.html#gtk-widget-get-snapshot
2012-03-14 17:37:23 +01:00
Simon Schampijer
ef2c624b5a s/Descriptions/Description fixup of d9e1a72fcd
Spotted by Chris Leonard: we use Description in all the other
places.
2012-02-09 19:05:57 +01:00
Simon Schampijer
bb02ef0ead Remove the Naming Alert
With the new 'Write to Journal anytime' feature it is possible
to write a description within an activity. Hopefully this leads
to more usage of the Journal for reflection by the learner. The
hinting nature ('you have not named your session yet') of the
Naming Alert has not been replaced, though.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Reviewed-by: Gonzalo Odiard <gonzalo@laptop.org>
Reviewed-by: Manuel Quiñones <manuq@laptop.org>
2012-02-02 18:30:03 +01:00
Simon Schampijer
d9e1a72fcd Add DescriptionEntry to the activity sub-toolbar
This is the implementation of the 'Write to Journal anytime'
feature [1].

The patch itself adds a DescriptionItem to the activity
sub-toolbar to make editing a Journal entry description
from within the activity possible. The code has the same
error handling as the TitleEntry.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Signed-off-by: Walter Bender <walter.bender@gmail.com>
Reviewed-by: Gonzalo Odiard <gonzalo@laptop.org>
Reviewed-by: Manuel Quiñones <manuq@laptop.org>

[1] http://wiki.sugarlabs.org/go/Features/Write_to_journal_anytime
2012-02-02 18:22:17 +01:00
Simon Schampijer
b5de7ef332 Remove support for the old deprecated toolbar
- removed deprecated imports from the activity module, use the
  widgets module instead
- removed the ActivityToolbox class
- removed the Stop button from the ActivityToolbar
- removed set_toolbar/get_toolbar API from the window module

Signed-off-by: Simon Schampijer <simon@laptop.org>
Reviewed-by: Gonzalo Odiard <gonzalo@laptop.org>
Acked-by: Daniel Drake <dsd@laptop.org>
2012-01-24 12:36:37 +01:00
Simon Schampijer
aae6082b14 Bundlebuilder: remove deprecated bundle_name argument
Signed-off-by: Simon Schampijer <simon@laptop.org>
Reviewed-by: Gonzalo Odiard <gonzalo@laptop.org>
Acked-by: Daniel Drake <dsd@laptop.org>
2012-01-24 12:33:03 +01:00
Simon Schampijer
70cee44717 Activity: remove deprecated _shared_activity member
Use the get_shared_activity method instead

Signed-off-by: Simon Schampijer <simon@laptop.org>
Reviewed-by: Gonzalo Odiard <gonzalo@laptop.org>
Acked-by: Daniel Drake <dsd@laptop.org>
2012-01-24 12:31:52 +01:00
Simon Schampijer
a8342ecf8c Finally remove the keep button completely
see 0082e10f8e for
the complete reasoning.

e022aa8e4a already made the button
invisible, keeping it only for backwards compatibility.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Reviewed-By: Sascha Silbe <silbe@activitycentral.com>
Acked-by: Daniel Drake <dsd@laptop.org>
2012-01-24 12:20:52 +01:00
Gonzalo Odiard
24af358275 Set the sugar theme name in gsettings according the scale
We need set the theme in gsettings according the scale in
the SUGAR_SCLING environment variable.

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
2011-12-20 19:19:26 +01:00
Daniel Drake
15946211cf Trivial GTK3 porting fixes
Fix some trivial issues missed earlier: various missing imports,
some minor API changes to adapt to, do_size_request simple porting,
etc.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
2011-12-20 19:00:17 +01:00
Daniel Drake
3962517a58 activity.py: Apply sugar GTK3 theme and icon theme
In GTK2, theme name and icon theme name properties could be set in the
GTK2 RC file, at runtime, or by the X settings daemon.

For GTK3, the RC file configuration route for these settings has been
removed. As we do not currently have a settings daemon implementation,
apply these important settings at runtime, early in the Activity
class.

Signed-off-by: Daniel Drake <dsd@laptop.org>
2011-12-13 17:38:52 -03:00
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
Sascha Silbe
c82a775267 Use accessor functions for data fields
The following data fields that were provided by PyGTK are not accessible
directly in GTK3+pygi and need to be replaced by accessor calls:

Adjustment.lower
Adjustment.page_size
Adjustment.upper
Adjustment.value
Bin.child
Widget.parent
Widget.style
Widget.window

Based on patches by Daniel Drake <dsd@laptop.org>.

Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
2011-12-13 17:19:53 -03:00
Simon Schampijer
8efb7c3f93 Adapt to changed Gtk.Window.set_geometry_hints() API
Unlike PyGTK [1], GTK3+pygi [2] wants GDK Geometry and WindowHints objects,
rather than individual values.

[1] http://developer.gnome.org/pygtk/stable/class-gtkwindow.html#method-gtkwindow--set-geometry-hints
[2] http://developer.gnome.org/gtk3/3.0/GtkWindow.html#gtk-window-set-geometry-hints

Signed-off-by: Simon Schampijer <simon@schampijer.de>
[replaced description, included fix-up commit]
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
2011-12-13 17:19:52 -03:00
Sascha Silbe
820efa56b9 Run pygi-convert.sh for automatic conversion from GTK2 to GTK3 + pygi.
This is only on a best-effort basis; the code will be in a broken state after
this patch and need to be fixed manually.

The purpose of committing the intermediate, non-working output is to make it
reproducible. It's impractical to manually review the changes.

The exact version used was 4f637212f13b197a95c824967a58496b9e3b877c from the
main pygobject repository [1] plus a custom patch [2] that hasn't been sent
upstream yet.

[1] git://git.gnome.org/pygobject
[2] https://sascha.silbe.org/patches/pygobject-convert-sugar-20111122.patch

Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
2011-12-13 17:19:52 -03:00
Sascha Silbe
aed295ec4e Import GDK in preparation for GTK3 conversion
Some parts of GTK moved to GDK, so we need to import the latter for things to
work after the conversion script runs.

Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
2011-12-13 17:19:52 -03:00
Simon Schampijer
9e4a3688fe Pass all parameters to GtkTextBuffer.get_text()
With PyGTK the include_hidden_chars parameter to GtkTextBuffer.get_text() had
a default value [1]. With GTK3+pygi the value must be explicitly passed [2].

[1] http://developer.gnome.org/pygtk/stable/class-gtktextbuffer.html#method-gtktextbuffer--get-text
[2] http://developer.gnome.org/gtk3/3.0/GtkTextBuffer.html#gtk-text-buffer-get-text

[changed description]
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
2011-12-13 17:19:52 -03:00
Daniel Drake
2f7f95f9af Pass all parameters to Box.pack_start() and ...pack_end()
With PyGTK, several Box.pack_{start,end}() parameters had defaults [1,2].
With GTK3+pygi all values must be passed [3,4].

[1] http://developer.gnome.org/pygtk/stable/class-gtkbox.html#method-gtkbox--pack-start
[2] http://developer.gnome.org/pygtk/stable/class-gtkbox.html#method-gtkbox--pack-end
[3] http://developer.gnome.org/gtk/stable/GtkBox.html#gtk-box-pack-start
[4] http://developer.gnome.org/gtk/stable/GtkBox.html#gtk-box-pack-end

[assembled from several patches; replaced description]
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
2011-12-13 17:19:52 -03:00
Simon Schampijer
89ef6304a1 Fix broken imports
8f1a821d68 only changed imports starting with
"import", but not those using "from ... import ...".

[replaced description]
Signed-off-by: Sascha Silbe <silbe@activitycentral.com>
2011-11-15 17:51:23 +01:00
Simon Schampijer
8f1a821d68 Rename imports from sugar to sugar3
Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Sascha Silbe <silbe@activitycentral.com>
2011-11-14 19:17:32 +01:00
Simon Schampijer
000ed75cbe Rename the module to sugar3
The old gtk-2 based module will be present in
the 0.94 branch in the sugar-toolkit.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Sascha Silbe <silbe@activitycentral.com>
2011-11-14 18:17:18 +01:00