Sugar Learning Environment, Activity Toolkit, GTK 3.
Go to file
Simon Schampijer ad9b0e9866 CellRendererInvoker: add support for long-press events
This one is tricky because where the CellRendererInvoker is
used (Home View activity list and Journal list view) we do
use Palettes based on a GtkMenu. In the Journal list view
this Palette has submenus so it can not be easily replaced
with our custom Palette. That is why I am trying to make this
case work with a GtkMenu.

When the Palette does pop up it grabs the focus. This means that
the invoker does not see a TOUCH_END event. Same is the longpress
controller that is why we have to reset the controller when
the long-press is detected, otherwise it is not usable a second
time.

The default behavior of a GtkMenu is that it does pop down
on a long press/release event. So when doing a long press
on the icon the Palette was popping down directly. We can
stop this by listening on the button-release event in the
Menu and return True when the event happens in the invoker
coordinates.

Finally there are several issues with motion events: in the
invoker we listen to motion events on the treeview in order to
be able to popup/popdown the Palette on hovering over the
icon. This event is triggered as well when the icon is
tapped. We do check the origin of the event and do not trigger
the enter/leave when originated from a touchscreen. We do setup
the path for the CellRenderer however.

The second case where the motion events are triggered is
when you tap somewhere in the Palette when it is up. For
example you want to get to one of the submenues. Since the
Palette tracks motion events to work for the hover case [2]
we do get a leave event when the Palette is tapped and the
Palette does pop down. Same here, we check if the event
originated from a touchscreen and do discard it in that
case.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
2012-11-06 23:36:57 +01:00
bin
examples
m4
po Commit from Sugar Labs: Translation System by user cjl.: 40 of 40 messages translated (0 fuzzy). 2012-10-13 21:31:53 +02:00
src CellRendererInvoker: add support for long-press events 2012-11-06 23:36:57 +01:00
tests Add two testcases: tabs with and without buttons, and sensitive text 2012-11-01 10:23:49 -03:00
.gitignore
AUTHORS
autogen.sh
configure.ac Release 0.97.8 2012-10-25 16:25:20 +02:00
COPYING
MAINTAINERS
Makefile.am
README

Sugar is the core of the OLPC Human Interface. The toolkit provides
a set of widgets to build HIG compliant applications and interfaces
to interact with system services like presence and the datastore.