5257 Commits (4cc6967c8ddf66d8cfe3ea849dae068241d1b95b)
 

Author SHA1 Message Date
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>
12 years ago
Manuel Quiñones a14574c666 Finish the port of the CellRendererIcon
In pygtk custom cellrenderers were done inheriting
gtk.GenericCellRenderer, and overriding the on_* methods.  Now we
inherit Gtk.CellRenderer and the methods to override changed to do_* .

The destroy signal was moved to Gtk.Widget [1] so the Gtk.CellRenderer
doesn't have it anymore.  Now we do the cleanup in the python
destructor method.  A testcase tests/graphics/customdestroy.py shows
how is done.

tests/graphics/cellrenderericon.py tests the usage.

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>

[1] http://developer.gnome.org/gtk3/stable/ch24s02.html#id1459754
12 years ago
Gonzalo Odiard 40a3b2ece1 Take list of supported image formats mime types from GdkPixbuf - SL #3845
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Manuel Quiñones 1334cd5768 Release 0.97.1 12 years ago
Manuel Quiñones cb141505fb Add testcase for Gtk buttons
Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Manuel Kaufmann 478e208582 Generic mime types: add video mime types that are supported by Jukebox
Extending the generic list will make those mime-types available in the
filter list (ObjectChooser, Journal). We have been extending the generic
list similarly before [1][2].

For the longer term fix see [3] to add support for custom mime types in
the ObjectChooser.

[1] http://bugs.sugarlabs.org/ticket/1319
[2] http://bugs.sugarlabs.org/ticket/1340
[3] http://bugs.sugarlabs.org/ticket/834

Signed-off-by: Manuel Kaufmann <humitos@gmail.com>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Manuel Quiñones 305384be3c Fix the drawing of ColorToolButton, RadioToolButton and ToggleToolButton
Draw a black background in the buttons when the palette is up, as
commit 01a06943 did with the ToolButton.  As the comment for that
commit states, we can change the prelight background color in the
theme, but not when the mouse moves over the Palette.

Also add testcase to test the three toolbuttons.

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Manuel Quiñones cd590b552b Fix the Handle Rsvg get_width() -> props.width, get_height() -> props.height
Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Manuel Quiñones be14c34d35 Use the Sugar Theme in the testsuite
To make useful tests for the Sugar widgets, the theme must be the
same.

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Manuel Quiñones 00761f3d01 Revert "Fix the drawing of ColorToolButton, RadioToolButton and ToggleToolButton"
This reverts commit 1e6cba8474.
12 years ago
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>
12 years ago
Manuel Quiñones 1e6cba8474 Fix the drawing of ColorToolButton, RadioToolButton and ToggleToolButton
gtk_paint_box is deprecated [1] and now we can use the CSS to change
the style of the button's prelight state.

To test the buttons, I provide a patch for HelloWorld activity [2].
They are added in the main toolbar.

Signed-off-by: Manuel Quiñones <manuq@laptop.org>

[1] http://developer.gnome.org/gtk3/stable/GtkStyle.html#gtk-paint-box
[2] http://dev.laptop.org/~manuq/shell-port/test_gtk3_buttons.patch
12 years ago
Manuel Quiñones e2ddd70c13 Fix the drawing method of _IconWidget, used by IconTray
Invoker draw_rectangle() now receives a Cairo context, as can be seen in [1]

The testcase is also fixed by this commit.

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>

[1] http://git.sugarlabs.org/sugar-toolkit-gtk3/sugar-toolkit-gtk3/blobs/master/src/sugar3/graphics/palettewindow.py#line1018
12 years ago
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 <simon@laptop.org>
Reviewed-by: Daniel Narvaez <dwnarvaez@gmail.com>
Tested-by: Manuel Quiñones <manuq@laptop.org>

[1] https://live.gnome.org/PyGObject/IntrospectionPorting#Passing_arrays
[2] https://live.gnome.org/GObjectIntrospection/Annotations#Default_Basic_Types
12 years ago
Pootle daemon 1d0692c18c Commit from Sugar Labs: Translation System by user cjl.: 38 of 40 messages translated (0 fuzzy). 12 years ago
Simon Schampijer db86a7282e Release 0.97.0 12 years ago
Gonzalo Odiard 6532b2d4dd Replace signal used in UnfullscreenButton to enable use with touch - SL #3798
Use clicked instead of button-pressed-event, because button-pressed-event
and the button-release-event are not emitted on a touchscreen device by
a touch in GTK+ 3.

Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Manuel Quiñones f70075323c Solve errors in ColorToolButton to enable activities to use it
This patch solves the following problems:

* API changed in the drag and drop code in Gtk.
  Drag and drop is not working yet (SL #3796)
  but the code needed to enable drag and drop is ported.
* Changes in the way to get color information from the theme
  this is because Gtk.Style was deprecated by Gtk.StyleContext.
* The internal button was not visible.

Signed-of-by: Gonzalo Odiard <gonzalo@laptop.org>

-----
v2: Fixed comment based on manuq feedback, and add a note
    about the non working drag and drop.
12 years ago
Daniel Narvaez 80c6028ddd Allow to build outside source directory
Reviewed-by: James Cameron <quozl@laptop.org>
Acked-by: Simon Schampijer <simon@schampijer.de>
12 years ago
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 <simon@laptop.org>
Reviewd-by: Benjamin Berg <benzea@sugarlabs.org>
12 years ago
Daniel Francis 428d648fe3 Add accelerator functionality to the ToggleToolButton, SL #3774
This code is copying the code from the ToolButton.

Signed-off-by: Daniel Francis <francis@sugarlabs.org>
12 years ago
Pootle daemon b57e120c54 Commit from Sugar Labs: Translation System by user cjl.: 4 of 40 messages translated (2 fuzzy). 12 years ago
Daniel Drake 3bbc4ef1c6 presence: use RoomConfig1 to configure channel properties (#3629)
This code was still using regular Telepathy properties to
set important configuration such as Anonymous=False.

However, as of Telepathy specification 0.24.0, these properties have
gone away.

    http://telepathy.freedesktop.org/spec/Channel_Type_Text.html
    Changed in 0.24.0. This interface used to have a bunch of clunky
    Telepathy.Properties. They have been removed in favour of D-Bus
    properties on the Room2, Subject2 and RoomConfig1 interfaces.

Switch to using RoomConfig1 (where available) to set this
configuration. The invite-restricted flag is no longer available and
actually seems to have been removed a long while back.

Fixes sharing of activities over gabble on new platforms such
as Fedora 17.

Signed-off-by: Daniel Drake <dsd@laptop.org>
Acked-by: Sascha Silbe <silbe@activitycentral.com>
12 years ago
Simon Schampijer ea1389cbbb Icon: remove documentation that has not much of a value 12 years ago
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 <simon@laptop.org>
Reviewed-by: Benjamin Berg <benzea@sugarlabs.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
12 years ago
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 <simon@laptop.org>
Reviewed-by: Benjamin Berg <benzea@sugarlabs.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
12 years ago
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 <simon@laptop.org>
Reviewed-by: Benjamin Berg <benzea@sugarlabs.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
12 years ago
Pootle daemon ed8c58a801 Commit from Sugar Labs: Translation System by user cjl.: 25 of 40 messages translated (0 fuzzy). 12 years ago
Pootle daemon 73b735d3ef post-branch catch up, Pushing many PO files 12 years ago
Pootle daemon 93fbe56a68 Commit from Sugar Labs: Translation System by user cjl.: 31 of 40 messages translated (0 fuzzy). 12 years ago
Pootle daemon 787b43ccca Commit from Sugar Labs: Translation System by user cjl.: 30 of 40 messages translated (1 fuzzy). 12 years ago
Pootle daemon f0ad4c287d Commit from Sugar Labs: Translation System by user cjl.: 39 of 40 messages translated (1 fuzzy). 12 years ago
Pootle daemon 5bd89044c5 Commit from Sugar Labs: Translation System by user cjl.: 40 of 40 messages translated (0 fuzzy). 12 years ago
Pootle daemon 2b96636c37 Commit from Sugar Labs: Translation System by user cjl.: 40 of 40 messages translated (0 fuzzy). 12 years ago
Pootle daemon 949ecc2f91 Commit from Sugar Labs: Translation System by user cjl.: 40 of 40 messages translated (0 fuzzy). 12 years ago
Pootle daemon bd1c9f06a8 Commit from Sugar Labs: Translation System by user cjl.: 40 of 40 messages translated (0 fuzzy). 12 years ago
Pootle daemon 6391a6c172 Commit from Sugar Labs: Translation System by user cjl.: 40 of 40 messages translated (0 fuzzy). 12 years ago
Pootle daemon 1d696ce89f Commit from Sugar Labs: Translation System by user cjl.: 40 of 40 messages translated (0 fuzzy). 12 years ago
Pootle daemon 48bb642f75 Commit from Sugar Labs: Translation System by user cjl.: 40 of 40 messages translated (0 fuzzy). 12 years ago
Pootle daemon b8ab6c9d21 Commit from Sugar Labs: Translation System by user cjl.: 40 of 40 messages translated (0 fuzzy). 12 years ago
Pootle daemon 40d6581a28 Commit from Sugar Labs: Translation System by user cjl.: 40 of 40 messages translated (0 fuzzy). 12 years ago
Pootle daemon 04271ea4e1 Commit from Sugar Labs: Translation System by user cjl.: 1 of 40 messages translated (18 fuzzy). 12 years ago
Pootle daemon f35aefce1c Commit from Sugar Labs: Translation System by user cjl.: 40 of 40 messages translated (0 fuzzy). 12 years ago
Pootle daemon fe46dc1701 Commit from Sugar Labs: Translation System by user cjl.: 40 of 40 messages translated (0 fuzzy). 12 years ago
Pootle daemon 1f9d02edb7 Commit from Sugar Labs: Translation System by user cjl.: 35 of 35 messages translated (0 fuzzy). 12 years ago
Pootle daemon 2d2b88be93 Commit from Sugar Labs: Translation System by user cjl.: 40 of 40 messages translated (0 fuzzy). 12 years ago
Pootle daemon 23616595eb Commit from Sugar Labs: Translation System by user cjl.: 40 of 40 messages translated (0 fuzzy). 12 years ago
Simon Schampijer 512f14974e Release 0.96.4 12 years ago
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 <simon@laptop.org>
Tested-by: Manuel Quiñones <manuq@laptop.org>
12 years ago
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 <simon@laptop.org>
Tested-by: Manuel Quiñones <manuq@laptop.org>
12 years ago