Sugar Learning Environment, Activity Toolkit, GTK 3.
ad9b0e9866
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> |
||
---|---|---|
bin | ||
examples | ||
m4 | ||
po | ||
src | ||
tests | ||
.gitignore | ||
AUTHORS | ||
autogen.sh | ||
configure.ac | ||
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.