Commit Graph
100 Commits
Author SHA1 Message Date
Simon Schampijer c3c0639419 Merge pull request #18 from dnarvaez/pyflakes
Make the code pyflakes clean
2013-05-06 06:47:51 -07:00
Simon Schampijer c9a6a36567 Merge pull request #11 from dnarvaez/html-exec
Add exec script to build pure html activities
2013-04-24 07:11:18 -07: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 <[email protected]>
Acked-by: Manuel Quiñones <[email protected]>
2012-08-23 14:28:56 +02:00
Simon Schampijer 09e9373612 Key grabber: make grab_keys introspectable
To the grab_keys function we pass a list of strings the key
grabber should listen for. In order to make this
introspectable we need to annotate the function correctly. I
followed the instructions for passing arrays [1] and have
chosen the type of the array data looking at [2].

Signed-off-by: Simon Schampijer <[email protected]>
Reviewed-by: Daniel Narvaez <[email protected]>
Tested-by: Manuel Quiñones <[email protected]>

[1] https://live.gnome.org/PyGObject/IntrospectionPorting#Passing_arrays
[2] https://live.gnome.org/GObjectIntrospection/Annotations#Default_Basic_Types
2012-08-22 17:42:50 +02:00
Simon Schampijer db86a7282e Release 0.97.0 2012-08-15 15:05:38 +02:00
Simon Schampijer 6438c89dea EventIcon: update to the latest implementation used in the shell port
The icon consists of an GtkEventBox and an IconBuffer. The
GtkEventBox is a subclass of GtkBin which has its own window and
therefor is used to catch events for our IconBuffer which does
not have it's own window. The window of the EventBox is
made invisible.

The EventIcon does not emit the 'activated' signal when clicked
anymore, you can listen to 'button-release-event' to know
when the icon has been clicked. The EventIcon uses the
CursorInvoker to invoke a palette the same way as the
CanvasIcon did.

We keep the same API as with the CanvasIcon, only the 'size'
property is changed to be called 'pixel_size' in order to
make clearer which values it expects to be passed. We don't
expect a GtkIconSize to be passed here.

Another option would have been to put a SugarIcon inside a
a GtkEventBox and make the properties available through an
icon property but the API would have not been as nice and
logically it seems to make more sense to have the IconBuffer
being the base for both the SugarIcon and the SugarEventIcon.

This patch has ben developed based on the one that is
used in the shell port.

Signed-off-by: Simon Schampijer <[email protected]>
Reviewd-by: Benjamin Berg <[email protected]>
2012-08-07 11:09:40 +02:00
Simon Schampijer ea1389cbbb Icon: remove documentation that has not much of a value 2012-06-21 14:38:41 +02:00
Simon Schampijer 61d54cf7e2 EventIcon: Have a default create_palette method
The create_palette mechanism allows to create
palettes on demand and not for each icon upfront
whether it will be needed or not.

If you hover over an EventIcon and there is no
palette already associated with the Invoker, the Invoker
will call create_palette to see if it can be created
on demand. With this patch the EventIcon will return None
here (see as well CellRendererIcon or ToggleToolButton which
are having the same default behavior).
When subclassing EventIcon the create_palette method can
be overwritten and a Palette returned (see for example
the ActivityIcon in the HomeView).

Without this patch you can see tracebacks when hovering
over the EventIcon because the Invoker tries to call
create_palette.

Signed-off-by: Simon Schampijer <[email protected]>
Reviewed-by: Benjamin Berg <[email protected]>
Acked-by: Manuel Quiñones <[email protected]>
2012-06-21 14:28:01 +02:00
Simon Schampijer 020917ac02 EventIcon: all the events go directly to the event box
Position the event box window above the windows of its child, that way
all events inside the event box will go to the event box. If the window is
below, events in windows of child widgets will first go to that widget,
and then to its parents [1].

[1] http://developer.gnome.org/gtk3/3.4/GtkEventBox.html#gtk-event-box-set-above-child

Signed-off-by: Simon Schampijer <[email protected]>
Reviewed-by: Benjamin Berg <[email protected]>
Acked-by: Manuel Quiñones <[email protected]>
2012-06-21 14:28:01 +02:00
Simon Schampijer eccef5b092 EventIcon: Make the child window of the event box invisible
We do use the EventBox only to receive events, hence the
window that the even box creates should be a GDK_INPUT_ONLY
window, which means that it is invisible and only serves to
receive events [1].

[1] http://developer.gnome.org/gtk3/3.4/GtkEventBox.html#gtk-event-box-set-visible-window

Signed-off-by: Simon Schampijer <[email protected]>
Reviewed-by: Benjamin Berg <[email protected]>
Acked-by: Manuel Quiñones <[email protected]>
2012-06-21 14:28:01 +02:00
Simon Schampijer 512f14974e Release 0.96.4 2012-06-06 17:10:18 +02:00
Simon Schampijer d57212a040 Make sure we have a widget before attaching an invoker, SL #3460
The _ToolbarPalette does get passed the invoker on
initialisation. But we do create the PaletteWindowWidget
later. We do attach the invoker to the widget when calling
_setup_widget that is why it was still working without that
patch.

This patch prevents the traceback that we had because of not
having a widget at this point.

Signed-off-by: Simon Schampijer <[email protected]>
Tested-by: Manuel Quiñones <[email protected]>
2012-06-06 14:57:52 +02:00
Simon Schampijer af320f91f8 Replacing set_data/get_data with a python attribute
set_data/get_data not available anymore is not available anymore [1]. The
recommended approach is using a python attribute, which we do.

Changing to use the attribute in the activity class slipped by mistake
into 6330204e91.

[1] https://bugzilla.gnome.org/show_bug.cgi?id=641944

Signed-off-by: Simon Schampijer <[email protected]>
Tested-by: Manuel Quiñones <[email protected]>
2012-06-06 14:56:44 +02:00
Simon Schampijer e97e5cac6d Release 0.96.3 2012-06-05 23:46:33 +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 <[email protected]>
2012-06-05 23:45:26 +02:00
Simon Schampijer 439d3bf08d Release 0.96.2 2012-06-01 20:51:50 +02:00
Simon Schampijer 6005d5c2ed Adding mime.py to POTFILES.in 2012-06-01 20:50:28 +02:00
Simon Schampijer 433c6391ec Activity Toolbar Description input field wrap text, SL #3586
Signed-off-by: Gary C. Martin <[email protected]
Acked-by: Simon Schampijer <[email protected]>
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 <[email protected]>
Reviewed-by: Daniel Drake <[email protected]>
Tested-by: Manuel Quiñones <[email protected]>
2012-05-30 11:56:34 +02:00
Simon Schampijer 47c838acd8 Release 0.96.1 2012-05-04 18:57:31 +02:00
Simon Schampijer abe02123b7 Release 0.96.0 2012-04-24 19:26:38 +02:00
Simon Schampijer db2bcbb76b Release 0.95.6 2012-04-19 18:40:21 +02:00
Simon Schampijer 7a07bb1001 Draw accelerator in Palette SL #3459
The accelerator in the primary information in the Palette
has not been drawn because there was not enough space
reserved for it. The preferred size we get back for the
Palette window does not include the accelerator of the
Gtk.AccelLabel. We need to include that in our calculation for
the Palette size.

In order to make that information available which is part
of the Palette class we need to pass the instance to the
PaletteWindowWidget instance.

Signed-off-by: Simon Schampijer <[email protected]>
Acked-by: Daniel Drake <[email protected]>
2012-04-19 18:37:15 +02:00
Simon Schampijer 16040b2f30 Draw border for palette all the time SL #3383
gtk_render_frame_gap [1] does expect an initial and an end
coordinate for the gap. paint_box_gap [2] which we used
before expected a starting position of the gap and the width
of the gap as parameter.

The patch does calculate the end coordinate parameter for
the gap from the initial coordinate and the width of the
gap.

Signed-off-by: Simon Schampijer <[email protected]>
Acked-by: Daniel Drake <[email protected]>

[1] http://developer.gnome.org/gtk3/3.0/GtkStyleContext.html#gtk-render-frame-gap
[2] http://developer.gnome.org/gtk/2.24/GtkStyle.html#gtk-paint-box-gap
2012-04-19 17:15:01 +02:00
Simon Schampijer f8c68b8330 Update ALL_LINGUAS
- remove qu (code change for Quechua to quz)
- remove ay (code change for Aymara to aym)
- remove cpp [Crioulo] no L10n planned at present
- remove pis [Solomon Islands Pidgin] no L10n planned at present
- remove tpi [Papua New Guinea Pidgin (Tok Pisin)] no L10n planned at present

Signed-off-by: Chris Leonard
Acked-by: Simon Schampijer <[email protected]>
2012-03-27 14:00:19 +02:00
Simon Schampijer 38d881da7a Release 0.95.5 2012-03-22 18:53:55 +01: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 <[email protected]>
2012-03-22 18:46:48 +01:00
Simon Schampijer ad825a07aa Merge branch 'master' of git.sugarlabs.org:sugar-toolkit-gtk3/sugar-toolkit-gtk3 2012-03-22 16:50:36 +01:00
Simon Schampijer 425e9becfc Remove the workaround for missing gobject-introspection bindings of Rsvg
gobject introspection bindings for librsvg have been pushed to librsvg
master [1] in 2.35.0, which solved [2]. We only have slight adopts to
make in our usage, for example we can not pass the data property
to the default constructor anymore and get_width and get_height is not
available anymore for the handle, but we can use the properties
instead.

The sugar-toolkit-gtk3 and therefore Activities that have been ported
to it do need a version of librsvg >= 2.35.0 to be able to work,
which ships for example with Fedora 17.

Signed-off-by: Simon Schampijer <[email protected]>
Acked-by: Daniel Drake <[email protected]>

[1] http://git.gnome.org/browse/librsvg/
[2] https://bugzilla.gnome.org/show_bug.cgi?id=663049
[3] http://developer.gnome.org/rsvg/stable/RsvgHandle.html
2012-03-22 16:49:14 +01:00
Simon Schampijer 01a06943a2 Mimic the behaviour and style of the Sugar GTK+ 2 toolbutton palettes in GTK+ 3
First we needed to port the Palette code to use a minimum size. The default size
is two times the GRID_CELL_SIZE. Since the request-phase of the traditional GTK+
geometry management has been replaced by a height-for-width system [1] we have
to compensate for that. Furthermore we need to pass the invoker from the
PaletteWindow to the _PaletteWindowWidget for the gap calculation code for
drawing the border around the Palette.

We do the drawing of the border for the toolbutton in the base class, moved
this from the ToolbarButton and made sure we are drawing in the right order.
In the ToolButton we draw as well a black background for the ToolButton when
the Palette is up. While the mouse is over the button we can do that in the
theme, but not when the mouse moves over the Palette.

[1] http://developer.gnome.org/gtk3/3.0/ch25s02.html#id1525688

Signed-off-by: Simon Schampijer <[email protected]>
2012-03-15 18:25:08 +01:00
Simon Schampijer 7344db525d Release 0.95.4 2012-03-14 21:20:25 +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 3ec2aca749 Release 0.95.3 2012-02-06 09:02:45 +01:00
Simon Schampijer afbf0ff326 Window: fixup of wrong conversion introduced by pygi-convert.sh
With 820efa56b9
gtk.gdk.x11_get_server_time(window) wasn't correctly converted
to GdkX11.x11_get_server_time(window). Found when tesing
collaboration. Opened 669264 for the upstream fix of
pygi-convert.sh.

Signed-off-by: Simon Schampijer <[email protected]>
Acked-by: Daniel Drake <[email protected]>
2012-02-02 20:27:30 +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 <[email protected]>
Reviewed-by: Gonzalo Odiard <[email protected]>
Reviewed-by: Manuel Quiñones <[email protected]>
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 <[email protected]>
Signed-off-by: Walter Bender <[email protected]>
Reviewed-by: Gonzalo Odiard <[email protected]>
Reviewed-by: Manuel Quiñones <[email protected]>

[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 <[email protected]>
Reviewed-by: Gonzalo Odiard <[email protected]>
Acked-by: Daniel Drake <[email protected]>
2012-01-24 12:36:37 +01:00
Simon Schampijer ec7b363a70 Datastore: remove deprecated API
This API is not in use anywhere in the shell and has
been deprecated for quite some time.

Signed-off-by: Simon Schampijer <[email protected]>
Reviewed-by: Gonzalo Odiard <[email protected]>
Acked-by: Daniel Drake <[email protected]>
2012-01-24 12:36:09 +01:00
Simon Schampijer 417006e463 ObjectChooser: remove deprecated parameters
The objectchooser had the 'title', 'flags' and 'buttons' parameters
deprecated for a long time, remove them now completely. The
only parameters allowed are now the 'parent' and the 'what_filter'.

Signed-off-by: Simon Schampijer <[email protected]>
Reviewed-by: Gonzalo Odiard <[email protected]>
Acked-by: Daniel Drake <[email protected]>
2012-01-24 12:34:54 +01:00
Simon Schampijer aae6082b14 Bundlebuilder: remove deprecated bundle_name argument
Signed-off-by: Simon Schampijer <[email protected]>
Reviewed-by: Gonzalo Odiard <[email protected]>
Acked-by: Daniel Drake <[email protected]>
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 <[email protected]>
Reviewed-by: Gonzalo Odiard <[email protected]>
Acked-by: Daniel Drake <[email protected]>
2012-01-24 12:31:52 +01:00
Simon Schampijer ae85dd62d4 ActivityBundle: clean from deprecated code
- removed deprecated mime type 'application/vnd.olpc-x-sugar'
- activity.info file: removed deprecated field 'service_name' use 'bundle_id' instead
- activity.info file: removed deprecated field 'class' use 'exec' instead

Signed-off-by: Simon Schampijer <[email protected]>
Reviewed-by: Gonzalo Odiard <[email protected]>
Acked-by: Daniel Drake <[email protected]>
2012-01-24 12:24:12 +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 <[email protected]>
Reviewed-By: Sascha Silbe <[email protected]>
Acked-by: Daniel Drake <[email protected]>
2012-01-24 12:20:52 +01:00
Simon Schampijer 6499ce596d Release 0.95.2 2011-12-22 14:53:09 +01:00
Simon Schampijer b03a483854 Use the gtk3 toolkit in the sugar-activity
Signed-off-by: Simon Schampijer <[email protected]>
Acked-by: Daniel Drake <[email protected]>
2011-12-20 19:19:26 +01:00
Simon Schampijer f05f221f79 Fix the installation of languages
The GETTEXT_PACKAGE name must match the repository
name. Found when packaging for Fedora.

Signed-off-by: Simon Schampijer <[email protected]>
Acked-by: Daniel Drake <[email protected]>
2011-12-20 19:19:26 +01:00
Simon Schampijer b9a19e952f Add examples for Alert, Animator, ComboBox, IconEntry and Notebook
Signed-off-by: Simon Schampijer <[email protected]>
[squashed two patches into one]
Signed-off-by: Sascha Silbe <[email protected]>
2011-12-13 17:19:53 -03:00
Simon Schampijer 09b3740768 _TimeoutIcon: use markup instead of Pango for bold text
In Pango 'Pango.attr_weight_new' is not yet introspectable [1].

[1] https://bugzilla.gnome.org/show_bug.cgi?id=646788

Signed-off-by: Simon Schampijer <[email protected]>
[changed description]
Signed-off-by: Sascha Silbe <[email protected]>
2011-12-13 17:19:53 -03:00
Simon Schampijer 1b9af6f6d5 Replace "expose-event" signal by a new "draw" signal
GtkWidget "expose-event" signal has been replaced by
a new "draw" signal [1]. The context is already
clipped [2], so do not base it on the values returned by
get_allocation like before.

[1] http://developer.gnome.org/gtk3/3.0/ch25s02.html#id1467092
[2] http://developer.gnome.org/gtk3/3.0/GtkWidget.html#GtkWidget-draw

Signed-off-by: Simon Schampijer <[email protected]>
[squashed with a patch by Benjamin Berg <[email protected]>;
 removed useless additions]
Signed-off-by: Sascha Silbe <[email protected]>
2011-12-13 17:19:53 -03:00
Simon Schampijer 20319cb3c4 Use GObject constructor for Gtk.Alignment
With PyGTK, all parameters of the Alignment constructor had defaults [1].
With GTK3+pygi, when using the explicit constructor (Alignment.new() resp.
gtk_alignment_new() [2]), all values would need to be passed. However when
using the GObject constructor, named properties can be passed in instead and
we only need to pass those that different from the default.

[1] http://developer.gnome.org/pygtk/stable/class-gtkalignment.html#constructor-gtkalignment
[2] http://developer.gnome.org/gtk/stable/GtkAlignment.html#gtk-alignment-new

Signed-off-by: Simon Schampijer <[email protected]>
[assembled from several patches; replaced description]
Signed-off-by: Sascha Silbe <[email protected]>
2011-12-13 17:19:53 -03:00
Simon Schampijer 0d827e7e66 Adapt to Gtk.icon_size_lookup*() API changes
In PyGTK, icon_size_lookup*() returned just the icon size as a 2-tuple [1].
In GTK3+pygi, an additional boolean value indicating whether the passed-in
value was valid is returned. [3,4]

[1] http://developer.gnome.org/pygtk/stable/class-gtkiconsource.html#function-gtk--icon-size-lookup
[2] http://developer.gnome.org/pygtk/stable/class-gtkiconsource.html#function-gtk--icon-size-lookup-for-settings
[3] http://developer.gnome.org/gtk/stable/gtk-Themeable-Stock-Images.html#gtk-icon-size-lookup
[4] http://developer.gnome.org/gtk/stable/gtk-Themeable-Stock-Images.html#gtk-icon-size-lookup-for-settings

Signed-off-by: Simon Schampijer <[email protected]>
[marked unused local variables, fixed overlong line]
Signed-off-by: Sascha Silbe <[email protected]>
2011-12-13 17:19:52 -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 <[email protected]>
[replaced description, included fix-up commit]
Signed-off-by: Sascha Silbe <[email protected]>
2011-12-13 17:19:52 -03:00
Simon Schampijer 10d7f7d3f9 Switch sugarext to be an introspectable library
This makes sugarext accessible through introspection. It is used
from the shell (key grabber, sound volume management) and the
shell session management.

Making the sugarext introspectable was done following the
descriptions at: http://live.gnome.org/GObjectIntrospection#Using_GI

Signed-off-by: Simon Schampijer <[email protected]>
2011-12-13 17:19:52 -03:00
Simon Schampijer 9cb18cdcf3 Remove Canvas* widgets and other hippo-canvas using parts
hippo-canvas isn't available in the GTK3 world, so we need to remove
anything that depends on it. Activities that still use it will need replace
hippo-canvas based widgets with native GTK ones before they can be ported to
GTK3.

[replaced description]
Signed-off-by: Sascha Silbe <[email protected]>
2011-12-13 17:19:52 -03:00
Simon Schampijer 1edc6ca1b1 Don't use hippo-canvas for rendering pixbufs
hippo-canvas isn't available in the GTK3 world and we can do fine without it
for rendering pixbufs.

[split out from another patch; added description]
Signed-off-by: Sascha Silbe <[email protected]>
2011-12-13 17:19:52 -03:00
Simon Schampijer af4bde1e83 Notebook: fix passing can-close-tabs
Make sure can_close_tabs can be passed in as a keyword parameter (to be set
by the GObject constructor).

[split out from another patch]
Signed-off-by: Sascha Silbe <[email protected]>
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 <[email protected]>
2011-12-13 17:19:52 -03:00
Simon Schampijer 056bc29559 Pass all parameters to ComboBox.set_row_separator_func()
With PyGTK, the func and data parameters to ComboBox.set_row_separator_func()
had defaults [1]. With GTK3+pygi both values must be passed [2].

[1] http://developer.gnome.org/pygtk/stable/class-gtkcombobox.html#method-gtkcombobox--set-row-separator-func
[2] http://developer.gnome.org/gtk/stable/GtkComboBox.html#gtk-combo-box-set-row-separator-func

[replaced description]
Signed-off-by: Sascha Silbe <[email protected]>
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 <[email protected]>
2011-11-15 17:51:23 +01:00
Simon Schampijer 8f1a821d68 Rename imports from sugar to sugar3
Signed-off-by: Simon Schampijer <[email protected]>
Acked-by: Sascha Silbe <[email protected]>
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 <[email protected]>
Acked-by: Sascha Silbe <[email protected]>
2011-11-14 18:17:18 +01:00
Simon Schampijer 37568a0a7e bundlebuilder: refactor get_files_git to Packager to avoid code duplication
Follow up patch for b582736375

Signed-off-by: Simon Schampijer <[email protected]>
Reviewed-by: Daniel Drake <[email protected]>
Acked-by: Sascha Silbe <[email protected]>
2011-09-28 11:52:38 +02:00
Simon Schampijer 29a700b34a bundlebuilder: add back build_locale functionality to XOPackager SL #3116
Due to the removal of the manifest support we lost as well
the part of the code that does build the locale. This patch
adds that functionality back.

Signed-off-by: Simon Schampijer <[email protected]>
2011-09-28 11:40:52 +02:00
Simon Schampijer d39a813969 Don't put event box in toplevel window
Remove an unnecessary toplevel widget.

This event box was originally added by Marco "to make it easier
to take screenshot of the canvas area only" (7f731457c2) but we're
unsure why this is, and it doesn't seem to be needed for our current
screenshot-taking mechanism. Screenshots continue to work fine after
removing this.
2011-09-27 12:43:51 +01:00
Simon Schampijer 7ecfbc6cd0 Release 0.93.4 2011-09-20 18:18:53 +02:00
Simon Schampijer 1609340503 Joining shared activity: set title for activity palette in frame, SL #3109
We need to set the title when we join a shared session AND when
we run a private session.

Signed-off-by: Simon Schampijer <[email protected]>
Tested-By: Gonzalo Odiard <[email protected]>
Reviewed-By: Gonzalo Odiard <[email protected]>
Acked-by: Sascha Silbe <[email protected]>
2011-09-20 08:35:10 +02:00
Simon Schampijer b582736375 XO_Packager: package files that are in git and the locale folder, OLPC #11217
There had been reports about Activities that had unexpected files in
the xo bundle (e.g. patches). There have been a recent change that the support
for the MANIFEST has been removed from the bundle builder. The MANIFEST
'controlled' which files were bundled. The code did include all the
files present in the folder (which includes patches etc).

The patch does use git-ls to get a list of files to include (like the
tarball packager). Furthermore the locale folder is included which has been
generated. Due to the API freeze we made '_get_files_in_git' a private method
which adds a bit of duplication to the 'get_files' method in the tarball
packager. A patch for master which will implement Builder.get_files_git(),
that can be used by XOPackager and SourcePackager.

Signed-off-by: Simon Schampijer <[email protected]>
Reviewed-By: Daniel Drake <[email protected]>
2011-09-19 18:49:54 +02:00
Simon Schampijer 4e8a50163e Release 0.93.3 2011-09-07 18:35:33 +02:00
Simon Schampijer a16eedff46 Some activities segfault when closing, OLPC #11201
TurtleArt and Abacus are two known candidates

Signed-off-by: Simon Schampijer <[email protected]>
Reviewed-by: Gonzalo Odiard <[email protected]>
2011-09-07 18:20:01 +02:00
Simon Schampijer 51496ff5b8 Release 0.93.2 2011-08-19 13:26:57 +02:00
Simon Schampijer c1f9d716ab Correct title in the activity frame SL #3042
Signed-off-by: Simon Schampijer <[email protected]>
Reviewed-by: Gonzalo Odiard <[email protected]>
Tested-by: Gonzalo Odiard <[email protected]>
2011-08-18 17:17:00 +02:00
Simon Schampijer e022aa8e4a Do not remove the Keep button completely, keep around for backward compatibility
In order to allow activities keeping their backward compatibility
we keep the Keep button around but do not add it to the toolbar. This
fixes activities that either remove or hide the Keep button or
alter it in any other way. The Keep button is deprecated and we
discourage the usage.

Signed-off-by: Simon Schampijer <[email protected]>
Reviewed-by: Gonzalo Odiard <[email protected]>
2011-08-17 18:04:47 +02:00
Simon Schampijer 0082e10f8e Remove the Keep button from the activity toolbar
The keep button has led to a false assumption: learners
confused it with a traditional save button and not recognising
it as what it is, an option to duplicate an entry.

Eben suggested to remove the button [1] and others have since
then. The functionality of duplicating an entry will be moved
to the entry palette in the Journal and the entry detail view [2].

We will print a warning when the KeepButton is used and remove
it after another cycle.

[1] http://lists.sugarlabs.org/archive/sugar-devel/2010-April/023439.html
[2] http://lists.sugarlabs.org/archive/sugar-devel/2011-May/031316.html

Signed-off-by: Simon Schampijer <[email protected]>
Acked-By: Sascha Silbe <[email protected]>
2011-08-15 19:29:30 +02:00
Simon Schampijer 4010878b7f Merge branch 'master' of git.sugarlabs.org:sugar-toolkit/mainline 2011-08-13 09:45:46 +02:00
Simon Schampijer 3f0822ab1a Toolbox: replace the hippo based separator with a gtk.HSeparator
This makes the old-style Toolbar hippo free.

Signed-off-by: Simon Schampijer <[email protected]>
Reviewed-by: Benjamin Berg <[email protected]>
2011-08-13 09:45:14 +02:00
Simon Schampijer 17ec110798 Replace the hippo-based TimeoutIcon with one based on a gtk.Label and gtk.Alignment
This patch depends on the addition of the SugarTimeoutIcon
to the artwork where we set the font and background color.

Signed-off-by: Simon Schampijer <[email protected]>
Reviewed-by: Benjamin Berg <[email protected]>
2011-08-12 10:39:38 +02:00
Simon Schampijer 4018265f6c Replace our custom entry widget with one based on gtk.Entry
Our custom entry widget, which was based on sexyicon, did
support placing an icon in the entry (e.g. the magnifier icon
for the search entry) and displaying progress in the case of
the url entry in Browse. Both is supported since GTK+ 2.16 in the
gtk.Entry.

The patch does keep the old API, that is why we can land it in
0.94 no change in the shell needed only a small change in Browse,
in a second step I would like to use the upstream API e.g.
's/set_icon_from_name/set_icon_from_icon_name'.

Signed-off-by: Simon Schampijer <[email protected]>
Reviewed-by: Benjamin Berg <[email protected]>
2011-08-12 10:38:11 +02:00
Simon Schampijer d0a493e532 Initialize window title with bundle name, OLPC #11037
I had to modify the patch slightly because of
0269f819761cfd803cf4d694298c8ab6a753e242, changes
reviewed by Sascha.

Signed-off-by: Gonzalo Odiard <[email protected]>
Acked-By: Simon Schampijer <[email protected]>
Reviewed-by: Sascha Silbe <[email protected]>
2011-07-24 19:22:35 +02:00
Simon Schampijer 9d21fd7511 Update window title when the activity title changes - OLPC #10978
The patch updates the window title when the user changes
the title in the toolbar or in the Journal.

Signed-of-by: Gonzalo Odiard <[email protected]>
Acked-By: Simon Schampijer <[email protected]>
2011-07-24 18:42:48 +02:00
Simon Schampijer 1f06030269 Merge branch 'master' of git.sugarlabs.org:sugar-toolkit/mainline 2011-07-24 17:29:12 +02:00
Simon Schampijer 6b675ed45f Make sure the datastore entry is created in time OLPC #10755
To avoid that we try to access the datastore entry before
it has been created we need to move the creation code up,
before we do get the possible information from a shared
session. If we have a shared session we do then get the
title and icon-color information from it and adjust
accordingly.

Tested that no other operation like for example resuming
has issues with that change.

Signed-off-by: Simon Schampijer <[email protected]>
Acked-By: Sascha Silbe <[email protected]>
2011-07-24 17:27:25 +02:00
Simon Schampijer a460b91e86 Merge branch 'master' of git.sugarlabs.org:sugar-toolkit/mainline 2011-07-15 18:57:47 +02:00
Simon Schampijer 7e61237c8f Debug logs for default profile
The generic path does not work for the telepathy logs. As we
have removed the support for different profiles it is ok
to just use the default path.

Signed-off-by: Simon Schampijer <[email protected]>
Reviewed-By: Marco Pesenti Gritti <[email protected]>
2011-06-29 10:01:51 +02:00
Simon Schampijer 7a0d5d9398 Use 'focus-out' event instead of 'changed' event for title entry OLPC #10956, SL #2608
To determine if the title has changed we use the 'focus-out'
event now instead of the 'changed' signal of the gtk.Entry. This
removes races we had before.

Signed-off-by: Daniel Drake <[email protected]>
Acked-By: Simon Schampijer <[email protected]>
Acked-By: Sascha Silbe <[email protected]>
2011-06-20 17:48:51 +02:00
Simon Schampijer 1ea1b2a0ab Use the activity instance name when joining a shared activity SL #2872
When we join a shared activity we use the name of the shared activity
as the title of the activity. As we set the activity metadata
accordingly this will be visible in the activity toolbar, the Journal
and the activity frame.

Signed-off-by: Simon Schampijer <[email protected]>
Acked-By: Sascha Silbe <[email protected]>
2011-06-09 16:55:56 +02:00
Simon Schampijer c86b6d5917 Fix invitations from a non sugar client (empathy), part of OLPC #10814
This differentiates between sugar and non sugar invitations using the
handle type. For non-sugar invitations we use the activity id to
determine which activity to join.

Signed-off-by: Simon Schampijer <[email protected]>
Acked-By: Sascha Silbe <[email protected]>
2011-06-09 16:53:18 +02:00
Simon Schampijer 67143d8042 Only show joined buddies on sharer side, part of OLPC#10578
This is a follow-up patch to 95b4eeec758ffa729d0dbb219b21d428115fcc74

Signed-off-by: Simon Schampijer <[email protected]>
Acked-By: Sascha Silbe <[email protected]>
2011-05-31 16:24:08 +02:00
Simon Schampijer 5b09eb1d74 Shared activity does not announce the 'buddy-left' signal OLPC #10800
This fixes a copy and paste error. A good test case is the Memorize
activity since we listen for the 'buddy-left' signal there to
update the members list inside the activity.

Signed-off-by: Simon Schampijer <[email protected]>
Acked-By: Sascha Silbe <[email protected]>
2011-05-23 10:33:50 +02:00
Simon Schampijer 17e52db2b6 Store all the buddies that have been joined in the activity metadata OLPC #10578
Before only the buddies that were present when closing the activity
were logged in the Journal. This patch does add another dictionary
'_joined_buddies' to keep track of the users that did join. The
'_buddies' dictionary keeps on tracking the users currently in the
activity.

Signed-off-by: Simon Schampijer <[email protected]>
Acked-by: Sascha Silbe <[email protected]>
2011-03-31 12:07:53 -04:00
Simon Schampijer ca02d59e11 Open content bundles on a external device #1748
Remove the path parameter as it is not used anyhow. The patch
for the sugar module does make sure the method is called
correctly.

Signed-off-by: Gonzalo Odiard <[email protected]>
Acked-By: Simon Schampijer <[email protected]>
Reviewed-By: Sascha Silbe<[email protected]>
2011-03-03 11:10:26 -05:00
Simon Schampijer 1d27039180 Release 0.92.0 2011-02-23 17:03:20 -05:00
Simon Schampijer b30bc0151c bundlebuilder: genpot: don't use absolute paths in filenames (SL#2508)
[tweaked description; minor style fix]
Signed-off-by: Sascha Silbe <[email protected]>
Tested-By: Sascha Silbe <[email protected]>
Reviewed-By: Sascha Silbe <[email protected]>
2011-02-12 19:12:43 +00:00
Simon Schampijer 18e39672ce Apply new version scheme as well to content bundles #2425
Reviewed-by: James Cameron <[email protected]>
2010-11-25 11:23:30 +01:00
Simon Schampijer aadfeed305 bundlebuilder: install mimetypes.xml and associated icon #2262
As we do create the ActivityBundle in the config of the bundlebuilder
we can use the code from the activitybundle as well to install
the mime type.

Reviewed-By: Sascha Silbe <[email protected]>
2010-11-24 21:39:09 +01:00
Simon Schampijer c7a80a1e56 Add new numbering scheme #2425
- add class NormalizedVersion to parse and compare the new activity versions
- change the bundlebuilder and activitybundle to use the new scheme, instead
of an int version we expect a string that matches the format defined in
NormalizedVersion
2010-11-09 10:53:05 +01:00
Simon Schampijer db46363e9d Release 0.90.2 2010-10-14 19:17:22 +02:00
Simon Schampijer b91c2102b4 Release 0.90.1 2010-10-05 18:12:53 +02:00
Simon Schampijer 969421b0d5 Release 0.90.0 2010-09-29 17:36:43 +02:00
Simon Schampijer 9f1fc0416e Merge branch 'master' of git.sugarlabs.org:sugar-toolkit/mainline 2010-09-29 16:20:46 +02:00