5546 Commits (ba8c435e5091c601820d6d08e7def119b0c8d3c3)
 

Author SHA1 Message Date
Simon Schampijer 8af0d49591 GtkMenu: use point_in_cell_renderer for CellRendereInvoker to check if a point is in, part of SL #3921
We use get_rect to check if the mouse is still over the invoker
in order to know when to popdown the Palette. The CellRendererInvoker
did return the allocation of the TreeView so far.

We already have a point_in_cell_renderer method in the
CellRendererInvoker so we can use this to check if the mouse pointer
is over the cell or not. The method point_in_cell_renderer is made
public to make it clearer that it can be used from the outside.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
12 years ago
Manuel Quiñones 2a76b10ce0 CellRendererIcon: add active state - SL #3989
For press feedback.  Do this connecting to the treeview press and
release signals, as the palette invoker does.  After this, the active
state can be styled in the artwork.

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Manuel Quiñones f5b96e1fbd CellRendererIcon: add prelight state and render background - SL #3989
This is to provide feedback on mouse over.  The styling needs to be
done in the artwork component.

Because cell renderers don't inherit GtkWidget anymore, the styling
can't be done using the __gtype_name__ .  Instead, it has to be done
adding a css class [1] to the style context, and rendering the background
in the reimplementation of the do_render method.

For reference, see how GtkCellRendererToggle implements render [2] and
how Baobab app does it [3].

[1] http://developer.gnome.org/gtk3/3.2/GtkStyleContext.html#gtk-style-context-add-class
[2] http://git.gnome.org/browse/gtk+/tree/gtk/gtkcellrenderertoggle.c#n338
[3] http://git.gnome.org/browse/baobab/tree/src/baobab-cellrenderers.vala#n125

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Simon Schampijer 63a34191b1 Release 0.97.8 12 years ago
Simon Schampijer a36ada99fd CursurInvoker: add long-press gesture to raise Palette
This adds long-press gesture detection to the CursorInvoker
used in the EventIcon. This will make this gesture available
for the View icons for example.

We need to keep a boolean around to detect when a lon-press
event has happened and ignore the button-release event in
that case.

We add as well checks in the CursorInvoker and WidgetInvoker
for the enter events if they are of type Gdk.CrossingMode.NORMAL,
otherwise the Gdk.CrossingMode.TOUCH_BEGIN enter events that are detected
when a touch starts are handled and interfere.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
12 years ago
Simon Schampijer 590785f7d1 EventIcon: make sure we are able to dismiss the Palette
Without this patch when tapping on an EventIcon
we do get a GDK_CROSSING_UNGRAB leave event when
the Palette is raised. Because of this the Invoker
does not know how to popdown the Palette when
you tap outside or when clicking on actions in the
Palette itself.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
12 years ago
olpc user 080f25e73b EventController: make detach function available
Signed-off-by: Simon Schampijer <simon@laptop.org>
Reviewed-by: Carlos Garnacho <carlos@lanedo.com>
12 years ago
Simon Schampijer 1d9965c972 SugarLongPress gesture controller: remove animation
We found out that the animation does not solve the issue
of visually indicating the long-press gesture to our
satisfaction. This is because you do not know upfront
which icon does have a primary action and more options
that can be revealed with the long-press gesture and
the animation itself. We would need to theme the gesture
better first as well. That the animation is a separate
window does raise several side effects as well which we
would need to solve first.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Reviewed-by: Carlos Garnacho <carlos@lanedo.com>
12 years ago
Simon Schampijer 20ef297526 Window: show unfullscreen button on button and touch events
We did track mouse motion events so far to show the unfullscreen
button. This adds the tracking of button events (left, middle, right
click) and touch tap.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
12 years ago
Simon Schampijer 1224ab1451 Palettes: move PRIMARY and SECONDARY constant to the base class
Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
12 years ago
Simon Schampijer 063e40d77d ActivityButton: set the toggle_palette option to True
Setting this option will popup the Palette on left click or tap
and popdown the Palette if it is up. This functionality has been
added with c4165967d5e05607db8b3e0969b516da87855431.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
12 years ago
Simon Schampijer 1a8f89226b Add toggle_palette property for Palette invoker, SL #4065
The property does specify whether the invoker will popup/popdown
the Palette on button left click/touch tap. It defaults to False.

In the toolbutton we add a property if the tooltip should be popped
down on a click, this is set to true to have the same behavior as
before.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Acked-by: Manuel Quiñones <manuq@laptop.org>
12 years ago
Carlos Garnacho 5ce0273900 gestures: Fix silly typo on get_center() implementation
Don't mix up coordinates when calculating the bounding box center

Signed-off-by: Carlos Garnacho <carlos@lanedo.com>
Acked-by: Simon Schampijer <simon@laptop.org>
Tested-by: Manuel Kaufmann <humitos@gmail.com>
12 years ago
Simon Schampijer a2d2c79d5d Release 0.97.7 12 years ago
Carlos Garnacho 4682e49823 Prevent crash if the controller didn't handle TOUCH_BEGIN
Fixes http://bugs.sugarlabs.org/ticket/4024

Signed-off-by: Carlos Garnacho <carlos@lanedo.com>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Manuel Quiñones e4e1881662 CanvasIcon: use set_state_flags and unset_state_flags instead of deprecated set_state - SL #3989
set_state is deprecated [1] and using flags improves the code and
makes it less error prone, because there is no need to handle the
prelight state in a variable _in_prelight_state .

[1] http://developer.gnome.org/gtk3/stable/GtkWidget.html#gtk-widget-set-state

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Manuel Quiñones e591d9aa80 CanvasIcon: check if we have a palette in the button release callback
The buddy icon in the home view has the mouse pointer inside at boot,
moving the pointer outside provokes an error because the icon doesn't
have a palette attached yet.

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Simon Schampijer f91cfbfc8a Cursor tracker: only display the cursor in mouse/trackpad mode
Listen on RawEvents: listen for raw events on the root
window and decide whether the cursor is shown or not. A
touch begin event will hide the cursor a motion or button
press event will show it.

There is no API in XFixes to know whether a cursor is shown
or not so we keep track of the current state. Furthermore
we trap X errors if any bad access should happen.

Signed-off-by: Simon Schampijer <simon@laptop.org>
Reviewed-by: Carlos Garnacho <carlos@lanedo.com>
Acked-by: Manuel Quiñones <manuq@laptop.org>
12 years ago
Pootle daemon 977e5fc4db Commit from Sugar Labs: Translation System by user cjl.: 40 of 40 messages translated (0 fuzzy). 12 years ago
Pootle daemon ddf4aea786 Commit from Sugar Labs: Translation System by user cjl.: 40 of 40 messages translated (0 fuzzy). 12 years ago
Pootle daemon d289794502 Commit from Sugar Labs: Translation System by user cjl.: 40 of 40 messages translated (0 fuzzy). 12 years ago
Pootle daemon 8714564cfd Commit from Sugar Labs: Translation System by user cjl.: 40 of 40 messages translated (0 fuzzy). 12 years ago
Pootle daemon 1f1a4e6abb Commit from Sugar Labs: Translation System by user cjl.: 40 of 40 messages translated (0 fuzzy). 12 years ago
Pootle daemon 283cb732a7 Merge branch 'master' of git.sugarlabs.org:sugar-toolkit-gtk3/sugar-toolkit-gtk3 12 years ago
Manuel Quiñones 845371f2bc Icon: add new class CanvasIcon - SL #3989
Move code from shell ActivityIcon to new class CanvasIcon, that will
allow to reuse it in other icons.  This class inherits EventIcon and
adds state and drawing handling.  The right-click callback for the
palette invoker is not needed.

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Pootle daemon 5adf632d8e Merge branch 'master' of git.sugarlabs.org:sugar-toolkit-gtk3/sugar-toolkit-gtk3 12 years ago
Simon Schampijer 23399f51dd Release 0.97.6 12 years ago
Pootle daemon b66dfbb995 Merge branch 'master' of git.sugarlabs.org:sugar-toolkit-gtk3/sugar-toolkit-gtk3 12 years ago
Manuel Quiñones df1397dcf6 Update toolbar buttons testcase with API change for the icon name
Follow up of fe11a3aa23 .

Signed-off-by: Manuel Quiñones <manuq@laptop.org>
12 years ago
Pootle daemon 740dcea9e3 Merge branch 'master' of git.sugarlabs.org:sugar-toolkit-gtk3/sugar-toolkit-gtk3 12 years ago
Simon Schampijer f569e7ef98 Cleanup: remove unused variable 12 years ago
Carlos Garnacho c546aaaf7c gestures: Add remove() call to SugarGestureGrabber
Signed-off-by: Carlos Garnacho <carlos@lanedo.com>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Pootle daemon 5b1c17d7ce Merge branch 'master' of git.sugarlabs.org:sugar-toolkit-gtk3/sugar-toolkit-gtk3 12 years ago
Simon Schampijer 31d6e6dd1e Release 0.97.5 12 years ago
Carlos Garnacho fe0022cd8f swipe: Allow setting allowed directions as a set of flags
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>
12 years ago
Pootle daemon 6346aab450 Commit from Sugar Labs: Translation System by user RafaelOrtiz.: 40 of 40 messages translated (0 fuzzy). 12 years ago
Gonzalo Odiard 2a15fbc0f2 Add in the metadata info about every startup time
Signed-off-by: Walter Bender <walter.bender@gmail.com>
Tested-by: Gonzalo Odiard <gonzalo@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Carlos Garnacho 78ae2459e3 LongPressController: add 'pressed' signal with x and y coordinates
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>
12 years ago
Carlos Garnacho b79a391902 Put an error trap around XIAllowTouchEvents()
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>
12 years ago
Carlos Garnacho 81ee0632c9 gesture-grabber: Ignore events not meant for the root window
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>
12 years ago
Simon Schampijer d16afa8f16 Build fixup of c635ee5dd7 12 years ago
Carlos Garnacho c635ee5dd7 Include SugarGestureGrabber in .gir generation
Signed-off-by: Carlos Garnacho <carlos@lanedo.com>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago
Carlos Garnacho 470d14a749 swipe: enter into "recognized" state when there is a motion directionality
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>
12 years ago
Carlos Garnacho c5fe8a26f6 Add API to allow for tracking global gestures
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>
12 years ago
Manuel Quiñones 76da9331a4 Alert: use GtkStyleContext instead of deprecated GtkStyle - SL #3907
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>
12 years ago
Pootle daemon 9580e057cb Commit from Sugar Labs: Translation System by user cjl.: 40 of 40 messages translated (0 fuzzy). 12 years ago
Simon Schampijer 1da1f4a1ca Release 0.97.4 12 years ago
Gonzalo Odiard 5fdad9481b Set default python encoding to utf-8
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
12 years ago
Gonzalo Odiard 3a30d3f84e Add management of summary property to the activity.info file
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>
12 years ago
Gonzalo Odiard 7eec45f031 Fix radiopalette due to api change in toolbotton
Signed-off-by: Gonzalo Odiard <gonzalo@laptop.org>
Acked-by: Simon Schampijer <simon@laptop.org>
12 years ago