Carlos Garnacho
df2bb4a92d
scrolledwindow: Use event times when calculating deceleration
...
Using g_get_current_time() isn't going to be realistic on lagging
events.
2012-01-05 01:37:10 +01:00
Carlos Garnacho
e45d9994a4
scrolledwindow: bypass kinetic scrolling if no scrollbars are shown
2012-01-05 01:37:10 +01:00
Carlos Garnacho
447ddb08fc
scrolledwindow: Remove priv->event_window
...
It looks like a leftover from pre-captured-event iterations of
the patch, it is completely unnecessary now.
2012-01-05 01:37:10 +01:00
Carlos Garnacho
0df96ac738
scrolledwindow: Don't use p-a-h for the "let event go through" timeout
...
Just use a timeout there, the press-and-hold feedback is undesirable
here.
2012-01-05 01:37:10 +01:00
Carlos Garnacho
688d8c0796
gtk,pah: Hook directly into gtk_main_do_event()
...
Press and hold couldn't reasonably work if nested widgets
handle ::captured-event, once the widget inits press-and-hold,
it'd better also handle possible cancellation on motion and
button release, which isn't guaranteed with ::capture-event.
Also, tentatively start press-and-hold by default on the
grab_widget, and before event capturing happens, this avoids
awkward situations like the scrolled window preventing/delaying
press-and-hold to happen on the child textview for example.
2012-01-05 01:37:10 +01:00
Carlos Garnacho
fb7047d212
scrolledwindow: Enable kinetic scrolling by default
2012-01-05 01:37:10 +01:00
Carlos Garnacho
1bb03e26a4
scrolledwindow: add another shortcut to bypass event capture
...
When clicked again close to the previous button press location
(assuming it had ~0 movement), the scrolled window wil allow
the child to handle the events immediately.
This is so the user doesn't have to wait to the p-a-h timeout
in order to operate on the scrolledwindow child.
2012-01-05 01:37:10 +01:00
Carlos Garnacho
7df706715c
scrolledwindow: Only do kinetic scrolling on touch devices
...
This is sort of meaningless on pointer devices, besides it implies
a different input event handling on child widgets that's unnecessary
there.
2012-01-05 01:37:09 +01:00
Carlos Garnacho
40455db2f5
scrolledwindow: Don't crash on 0-sized motion buffer
2012-01-05 01:37:09 +01:00
Carlos Garnacho
64ec631874
scrolledwindow: Set also a GTK+ grab on p-a-h scrolling
...
This is so the widget is ensured to receive the events
regardless of the pointer position.
2012-01-05 01:37:09 +01:00
Carlos Garnacho
de593da052
scrolledwindow: Add GdkDevice parameter to ::press-and-hold handler
2012-01-05 01:37:09 +01:00
Carlos Garnacho
a308c35112
gtk: Handle press-and-hold for touch devices
...
Also, only react to the first button
2012-01-05 01:37:09 +01:00
Carlos Garnacho
412ba5cc2d
gtk: Add a GdkDevice parameter to ::press-and-hold
...
This would be useful when popping up menus, just so we
know what device to trigger it for.
2012-01-05 01:37:09 +01:00
Carlos Garnacho
e4e11aa4a2
gtk: Clean up press-and-hold code
...
The press and hold animation now fully relies on style context
transitions, finishing the p-a-h operation right after it
finishes. There's also no need to connect to ::drag-begin as
::grab-notify will also tell when a grab begins.
2012-01-05 01:37:09 +01:00
Carlos Garnacho
e48285f759
tests: Add an entry to testpressandhold
...
Useful for checking behavior while selecting,
starting drags, subwindows...
2012-01-05 01:37:09 +01:00
Carlos Garnacho
dcd2dba384
entry: Handle ::grab-notify
...
Store the device, and unset private fields whenever the device
is shadowed by another GTK+ grab, so popping up menus while
selecting (i.e. press-and-hold) doesn't leave it in a confused
state.
2012-01-05 01:37:09 +01:00
Carlos Garnacho
1a6a1118a4
gtk: Do not use deprecated APIs on press-and-hold
2012-01-05 01:37:09 +01:00
Carlos Garnacho
d6476eb99a
tests: Update testkineticscrolling to use GtkGrid
2012-01-05 01:37:09 +01:00
Carlos Garnacho
cdd97bbff7
gtk: connect to grab-notify for press and hold
...
This is so press and hold is cancelled if a click actually
causes an inner widget to do a GTK+ grab.
2012-01-05 01:37:09 +01:00
Carlos Garnacho
a447b2fee2
gtk: Propagate ::captured-event up the hierarchy for crossing events
2012-01-05 01:37:09 +01:00
Carlos Garnacho
4af317307f
gtk: emit ::captured-event starting from the GTK grab widget
2012-01-05 01:37:09 +01:00
Carlos Garcia Campos
aa0c220f7d
scrolledwindow: Allow selections and drag-and-drop when kinetic scrolling is enabled
...
If the scrolling doesn't start after a long press, the scrolling is
cancelled and events are handled by child widget normally.
2012-01-05 01:37:08 +01:00
Carlos Garcia Campos
39966dbaf8
Add GtkWidget::press-and-hold signal
...
Press-and-hold signal is emitted when the mouse button is pressed for a
given amount of time, specified in the new "press-and-hold-timeout"
GtkSetting. It's commonly used in mobile platforms to emulate a right
click to show a context menu. This patch is based on previous patches by
Kristian Rietveld and Danielle Madeley.
https://bugzilla.gnome.org/show_bug.cgi?id=315645
2012-01-05 01:37:08 +01:00
Carlos Garnacho
fbb70becef
gtksettings: Set animation for press-and-hold through GtkStyleProvider
...
The "gtk-press-and-hold-timeout" setting has also been added, to control
its duration.
2012-01-05 01:37:08 +01:00
Carlos Garnacho
388dcb4234
themingengine: Implement press-and-hold notification renderer
...
gtk_render_activity() uses it for the GTK_STYLE_CLASS_PRESS_AND_HOLD
style class.
2012-01-05 01:25:39 +01:00
Carlos Garcia Campos
e8a9fad467
scrolledwindow: Add auto-hide-scrollbars style property
...
To hide the scrollbars in kinetic mode when not scrolling.
2012-01-05 01:25:38 +01:00
Carlos Garcia Campos
ccb7da408e
tests: Add new test for kinetic scrolling
2012-01-05 01:25:38 +01:00
Carlos Garcia Campos
1764558d8c
test: Add checkbox to enable/disable kinetic scrolling in scrolled window test
2012-01-05 01:25:38 +01:00
Carlos Garcia Campos
90ee273c66
scrolledwindow: Initial kinetic scrolling support
2012-01-05 01:25:38 +01:00
Carlos Garcia Campos
b0b26cc2e0
timeline: Add _gtk_timeline_get_elapsed_time()
...
To get the time in milliseconds since the last frame
2012-01-05 01:25:38 +01:00
Carlos Garcia Campos
990e049510
Add GtkWidget::captured-event signal
...
https://bugzilla.gnome.org/show_bug.cgi?id=641836
2012-01-05 01:25:38 +01:00
Carlos Garnacho
8f013f4055
gdk: Add GDK_SOURCE_TOUCH
...
This device source applies to touch capable devices, most
notably touchscreens.
2012-01-05 01:25:38 +01:00
Ryan Lortie
0ea48c4139
GtkComboBoxText: allow id='' tag in builder markup
...
Presently, GtkComboBoxText lets you list the items for it in the
GtkBuilder markup like so:
<items>
<item translatable='yes'>Red</item>
<item translatable='yes'>Blue</item>
</items>
but has no way to set the "id" column for added items. Add an id='' tag
for that purpose so that you can do:
<item id='red' translatable='yes'>Red</item>
https://bugzilla.gnome.org/show_bug.cgi?id=667319
2012-01-04 17:00:35 -05:00
Xan Lopez
eeb9de80e1
GtkNotebook: fix crash when DnD tabs between windows
...
When doing DnD between windows the tab label is set as the child of
the DnD info window. If this is happening the remove method of
GtkNotebook should not unparent the tab label, since it's been already
unparented, belongs to the DnD window and will be properly destroyed
when the DnD is over.
https://bugzilla.gnome.org/show_bug.cgi?id=639875
2012-01-04 08:48:46 +01:00
Javier Jardón
912375ff38
gtk/gtkcolorbutton.c: Do not use deprecated GdkColor api
2012-01-04 01:55:16 +01:00
Zeeshan Ali (Khattak)
3caa370bb5
gtkspinbutton: Respect value of inherited 'editable' property
...
When this property is set to 'FALSE', user's click on the buttons
should not actually update the value but rather result in error bell.
https://bugzilla.gnome.org/show_bug.cgi?id=667229
2012-01-04 00:49:35 +02:00
Federico Mena Quintero
022c576bd2
treeview: bgo#666685 - Crash when toggling the selected status of a row
...
The refactoring from e01af5c5c seems to have caused this inadvertently.
Signed-off-by: Federico Mena Quintero <federico@gnome.org >
2012-01-03 15:08:34 -06:00
Javier Jardón
abb7f40fb8
gtkcolorsel: Do not use deprecated GdkColor api
2012-01-03 18:00:57 +01:00
Javier Jardón
49d232d3a0
gtkcellview: Do not use deprecated GdkColor api
2012-01-03 18:00:57 +01:00
Chun-wei Fan
9f6e7d214c
gtk/gtkprivate.c: Include stdlib.h
...
Include stdlib.h for getenv to avoid C4013/implicit declaration of ...
warnings
2012-01-04 00:52:44 +08:00
Javier Jardón
1796e2f6ba
test/testgtk.c: Fix compilation warning
2012-01-03 16:58:42 +01:00
Matthias Clasen
266866e82c
Fix problems with DND on some X servers
...
When the X server does not support the shape extension (as some
vnc implementations seem to), our DND code was always seeing
an empty input shape, so drops always missed their target.
http://bugzilla.gnome.org/show_bug.cgi?id=620240
2012-01-03 10:57:53 -05:00
Emmanuele Bassi
c62a1fd522
Add symbolic constants for event emission control
...
Similar to https://bugzilla.gnome.org/show_bug.cgi?id=631413 in GLib,
GTK+ should have symbolic constants for controlling the event handling
instead of a mere boolean value.
The GDK_EVENT_PROPAGATE and GDK_EVENT_STOP constants map to FALSE and
TRUE respectively.
https://bugzilla.gnome.org/show_bug.cgi?id=631414
2012-01-03 12:58:43 +00:00
Ignacio Casal Quinteiro
f0b8fc69e8
textdisplay: use g_list_free_full
2012-01-01 22:38:30 +01:00
Kjell Ahlstedt
6aeab7b7cc
comboboxtext: Set entry-text-column and id-column props in the constructor
...
This is cleaner than setting the value in the _new() functions and
makes binding and GtkBuilder instantiation easier. Bug #612396 , comment 65.
2011-12-30 11:10:26 +01:00
Chun-wei Fan
d273b817e8
Bug 667018-gtk/gtkwindow.c: Include deprecated/gtkstyle.h
...
This is needed for the prototype of gtk_widget_reset_rc_styles, to avoid
C4013/implicit declaration of ... warnings of that function
2011-12-30 17:25:48 +08:00
Chun-wei Fan
1a122a4367
gtk/gtkspinbutton.c: Remove lingering ';'
...
...so that C89 compilers will not complain
2011-12-30 17:25:47 +08:00
Yaron Shahrabani
42bf233d59
Updated Hebrew translation.
2011-12-30 11:12:58 +02:00
Chun-wei Fan
24e476caab
gtk/Makefile.am: Update VS projects completion
...
Take the sources in gtk/deprecated/ into account-VS does not like '/'
in file paths.
2011-12-30 16:44:55 +08:00
Chun-wei Fan
f166cddeb4
Update Visual C++ projects
...
-Update include paths for the GTK+ main projects to be consistent across
the board
-Update demo projects to add a new demo source file, transparent.c
2011-12-30 16:40:06 +08:00