The allowed swipe directions can be specified now at construct time,
so the swipe-ended signal is only emitted for those directions.
Signed-off-by: Carlos Garnacho <carlos@lanedo.com>
Acked-by: Simon Schampijer <simon@laptop.org>
The 'pressed' signal does emit the x and y coordinates
of the position where the event occurred. This can be used
for example in the Browser where we need to know at which
exact position the long-press event occurred.
Signed-off-by: Carlos Garnacho <carlos@lanedo.com>
Acked-by: Simon Schampijer <simon@laptop.org>
These calls are occasionally failing with BadAccess on seemingly
still valid (not yet notified upon) touch sequences. Workaround
this Xorg bug with error traps at the moment, those would catch
no error when this is working properly.
Fixing this bug will be tracked at SL #3981
Signed-off-by: Carlos Garnacho <carlos@lanedo.com>
Acked-by: Simon Schampijer <simon@laptop.org>
The passive touch grab is set on the root window, so if touch
events get to a different window it's best to leave those for
GTK+ to handle.
Signed-off-by: Carlos Garnacho <carlos@lanedo.com>
Acked-by: Simon Schampijer <simon@laptop.org>
This allows for checking the controller state as events are fed into it
without connecting to begin/end signals
Signed-off-by: Carlos Garnacho <carlos@lanedo.com>
Acked-by: Simon Schampijer <simon@laptop.org>
The new API is added to SugarExt. Similar to the
KeyGrabber we listen on the root window for the
events. We then filter for gestures recognized by
an event controller.
You can add any event controller of the ones recently
added to the toolkit to be tracked and can pass a
specific area where the starting point of the gesture
should be, it's then allowed to go out of bounds as
it moves.
Signed-off-by: Carlos Garnacho <carlos@lanedo.com>
Acked-by: Simon Schampijer <simon@laptop.org>
Using the deprecated GtkStyle is giving an error [1] in the sugar
alert.
[1] http://bugs.sugarlabs.org/ticket/3907#comment:3
Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
As spoted by Daniel Narvaez in [1], pygi does not set the default encoding
anymore as the old GTK+ did. This change does break activities ported
to GTK+3.
The change in GTK+ has been discussed upstream here [2].
A better solution will be implemented when we port to Python 3,
when we will be able to use real unicode strings.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
[1] http://lists.sugarlabs.org/archive/sugar-devel/2012-August/038993.html
[2] https://bugzilla.gnome.org/show_bug.cgi?id=681915
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>
Listen to the 'request-clear-area' and 'unset-clear-area'
of the widget and adjust allocation accordingly.
Signed-off-by: Carlos Garnacho <carlos@lanedo.com>
Acked-by: Simon Schampijer <simon@laptop.org>
As discused in the mailing list [1] the api to set the icon in sugar
ToolButton, RadioToolButton and ToggleToolButton is inconsistent,
and with the port to GTK+ 3 the differences are visible (SL #3849).
This patch changes the API of ToolButton, RadioToolButton and
ToggleToolButton to override the icon-name property and add an
Icon instance with the set_icon_widget method.
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
[1] http://lists.sugarlabs.org/archive/sugar-devel/2012-September/039624.html
Fixes the notification being a black rectangle on screens with an alpha colormap,
but with no compositing manager.
Signed-off-by: Carlos Garnacho <carlos@lanedo.com>
Acked-by: Simon Schampijer <simon@laptop.org>
Sugar crashes if the sugar theme has not been set (in sugar-session)
in the set_icon_from_name method since some if the requested icons
can not be found. Handle that case cleanly.
Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
Also set up introspection annotations wherever it's needed
Signed-off-by: Carlos Garnacho <carlos@lanedo.com>
Acked-by: Simon Schampijer <simon@laptop.org>
This is a base class for gesture recognizers using possibly more
than a single touch.
Signed-off-by: Carlos Garnacho <carlos@lanedo.com>
Acked-by: Simon Schampijer <simon@laptop.org>
started/finished was renamed to began/ended, and "updated" signal
has been added too to complete the semantics
Signed-off-by: Carlos Garnacho <carlos@lanedo.com>
Acked-by: Simon Schampijer <simon@laptop.org>
style and colors of the progress feedback are subject to change
Signed-off-by: Carlos Garnacho <carlos@lanedo.com>
Acked-by: Simon Schampijer <simon@laptop.org>
controllers were already intrinsically related to a widget, so
set a property so controllers have a back reference to the widget
they attach to
Signed-off-by: Carlos Garnacho <carlos@lanedo.com>
Acked-by: Simon Schampijer <simon@laptop.org>