Commit Graph

43615 Commits

Author SHA1 Message Date
Carlos Garnacho
d756463d9b gtkgesture: Add docs blurb about touchpad gestures
Not too long though, the precautions to take are minimal.
2015-08-12 23:20:25 +02:00
Carlos Garnacho
e736e8dcb9 gtkgesture: Accumulate touchpad events' dx/dy in point data
This will make the gesture "center" the pointer position, plus
the accumulated dx/dy throughout the gesture progress.
2015-08-12 23:20:25 +02:00
Carlos Garnacho
4457be688d gtkgesture: Handle touchpad events
These will be mutually exclusive with touch events, so it won't
be possible to trigger gestures through mixed input and whatnot.

The accounting of touchpad events is slightly different, there
will be a single internal PointData struct, stored in the hashtable
with the NULL event sequence/key (same than pointer events in
this regard), just that the events stored will be GdkEventTouchpad*,
so will hold information about all fingers at once.

But this difference is just internal, the GtkGesture API doesn't
make explicit assumptions about the number of points (the closest
to a per-point query API is gtk_gesture_get_sequences()). All
signals emitted just contain the last changed GdkEventSequence,
and API takes GdkEventSequences, so everything is consistent with
sequence=NULL for touchpad events.
2015-08-12 23:20:25 +02:00
Carlos Garnacho
67ae7322e9 gtkgesture: Refactor n-points querying into a single function
Along the code, we're basically asking for 1) the total count of
touchpoints, and 2) the number of active touchpoints (not denied
nor ended).

Wrap both usecases into a _gtk_gesture_get_n_physical_touchpoints(),
and replace all occurrences.
2015-08-12 23:20:25 +02:00
Carlos Garnacho
97e67e21a1 gtkgesture: Filter out touchpad events by default.
The gestures that don't want touchpad gesture events are majority,
even those that want such events will only listen to subsets (eg.
pinch, swipe,...).

So it makes sense to ignore touchpad events by default, and let
subclasses opt those in.
2015-08-12 23:20:25 +02:00
Carlos Garnacho
8b1c9c0687 gtkgesture: Refactor gtk_gesture_handle_event()
We'll be dealing with event types and touchpad gesture phases,
replace the switch by a battery of if/elses. Otherwise, it's
just an style change.
2015-08-12 23:20:25 +02:00
Carlos Garnacho
3808322f80 eventcontroller: Add private ::filter method
This will be used right before handle_event() in order to filter
out events, useful to make the previous "no touchpad events" behavior
the default, and have gesture subclasses include manually the touchpad
events they handle.
2015-08-12 23:20:25 +02:00
Carlos Garnacho
777ac92862 gtkwidget: Ensure touchpad events trigger the bubbling phase
For all other events, we run the bubble phase deep in the specific
::motion/button-press/release/touch handlers.

For touchpad events, it doesn't make sense to use GtkWidgetClass
slots if the intended way to deal with these are gestures, so we
run the bubble phase directly from gtk_widget_event_internal().
2015-08-12 23:20:25 +02:00
Carlos Garnacho
6cd45af8b0 gtkmain: Handle rewriting of event fields during grabs for touchpad events
The window/coordinates will need translation in the case of touchpad gesture
events, same than with other pointer events.
2015-08-12 23:20:24 +02:00
Carlos Garnacho
5092febaf8 gdk: Proxy touchpad events through the client-side window hierarchy
This includes poking the deepmost window, checking for the
GDK_TOUCHPAD_GESTURE_MASK bit set, and translating coordinates in events
accordingly.
2015-08-12 23:20:24 +02:00
Carlos Garnacho
8c2b3930da gdk: Add GDK_TOUCHPAD_GESTURE_MASK to GdkEventMask
Users will need to manually select on this in order to receive gesture
events.
2015-08-12 23:20:24 +02:00
Carlos Garnacho
a3b402a949 gdk: Add touchpad gesture events and event types.
Each gesture type has its separate GdkEvent struct, and begin/update/
end/cancel event types.

There is support for multi-finger swipe (3-4 fingers), and 2-finger
rotate/pinch gestures.
2015-08-12 23:20:24 +02:00
Paolo Borelli
7281803169 cellrendererpixbuf: do not clear the icon helper twice
Do not call _gtk_icon_helper_clear explicitely when the properties
are set, since the corresponding _gtk_icon_helper_set_* method
already calls clear internally.
While at it rename the reset function to make it clear that it
is calling notify for the previous image type and avoid the
notification if the image type is not changing.
2015-08-12 21:40:04 +02:00
Matthias Clasen
a1332167fb color chooser: Reset show-editor on unmap
We have a testcolorchooser test, with a --edit option. It was
supposed to make the color chooser come up in edit mode, but
it didn't work ever since we dropped the ::response handler.
Fix it by resetting show-editor on unmap, instead of on map.
This way, users can set show-editor before showing the dialog,
and it will take effect.
2015-08-12 11:29:11 -04:00
David King
4a8ff565bc listbox: Describe behavior change in GtkListBoxCreateWidgetFunc
Help applicaiton authors who may already be binding GtkListBox to a
GListModel by describing the change for 3.18.

https://bugzilla.gnome.org/show_bug.cgi?id=753392
2015-08-12 12:56:05 +01:00
Daniel Mustieles
c06de97234 Updated Spanish translation 2015-08-12 09:04:05 +02:00
Daniel Mustieles
bb3bc752d2 Updated Spanish translation 2015-08-12 09:03:50 +02:00
Matthias Clasen
12e98498f6 label: Flesh out pango attribute support
A few attribute types were missing from the support:
rise, letterspacing, fallback, font features. Add support
for these.
2015-08-11 20:57:52 -04:00
Kjartan Maraas
2a03476c8f Updated Norwegian bokmål translation. 2015-08-11 19:58:17 +02:00
Daniel Mustieles
3197399fec Updated Spanish translation 2015-08-11 12:34:59 +02:00
Matthias Clasen
cf237eccbe widget-factory: Add a lock button 2015-08-10 22:43:19 -04:00
Matthias Clasen
aa9dd72e8f font chooser: Make repeated Escape cancel the dialog
The first Escape clears the search entry, the second Escape
closes the dialog.
2015-08-10 22:43:19 -04:00
Matthias Clasen
5f44339ce3 font chooser: Make the entry activate the default 2015-08-10 22:43:19 -04:00
Matthias Clasen
ecc8cd2369 font chooser: Use browse as selection mode 2015-08-10 22:43:19 -04:00
Matthias Clasen
61ffb517bc font chooser: Make Escape stop search 2015-08-10 22:43:18 -04:00
Georges Basile Stavracas Neto
e548c71394 placesview: show Disconnect instead of Eject
Since we're dealing with networks, terms like "Eject" or
the eject button are misleading, since we're not actually
ejecting but disconnecting.

Fix that by showing the appropriate icon and tooltip.
2015-08-10 15:35:56 -03:00
Georges Basile Stavracas Neto
0dff248516 placesview: sort by path
As pointed out by Cosimo, we should sort the
items according to their path.
2015-08-10 15:33:34 -03:00
Georges Basile Stavracas Neto
025f74161d placesview: plug a leak 2015-08-10 15:24:43 -03:00
Georges Basile Stavracas Neto
1219b67cdb placesview: no url for networks
We are not showing the URL of network locations
anymore, since they are distracting and not
necessary.

The code, however, forgot to cleanup the URL,
so we are still showing the URL for network
locations.

Fix that by properly cleanup the URL for network
locations.
2015-08-10 14:59:50 -03:00
Matthias Clasen
843a8791a6 Adwaita: Don't leak underlines
The .button:link .label selector matches any label "inside" a
link button. And a label inside the context menu counts as inside
for this purpose. This causes the text-decoration property to
leak into the context menu, even though the property is not
inherited. Avoid this by tightening the selector to
.button:link > .label.

https://bugzilla.gnome.org/show_bug.cgi?id=753451
2015-08-10 16:41:18 +02:00
Georges Basile Stavracas Neto
5e3d0b19b0 placesview: jumps to the default location
When we connect to a server, the default and expected
behavior is going to the default location, which usually
is the home directory or a writable directory.

GtkPlacesSidebar behaves properly, while GtkPlacesView
doesn't.

Fix that by jumping to the default locations instead of
the root location.
2015-08-10 10:42:43 -03:00
Daniel Mustieles
525732b623 Updated Spanish translation 2015-08-10 09:17:16 +02:00
Matthias Clasen
b9bced693a Remove some unused data 2015-08-09 23:39:14 +02:00
Matthias Clasen
3eb0eaffe2 Remove an unused function 2015-08-09 23:39:00 +02:00
Matthias Clasen
62dce64a48 Remove a self-assignment
clang doesn't like those.
2015-08-09 23:38:40 +02:00
Matthias Clasen
0f851be368 Fix a doc comment typo 2015-08-09 23:32:04 +02:00
Necdet Yücel
0f6781788e Updated Turkish translation 2015-08-09 15:53:28 +00:00
Pedro Albuquerque
37c09d92d2 Updated Portuguese translation 2015-08-09 07:31:44 +00:00
Matthias Clasen
9ecfffa830 Formatting fixes 2015-08-08 23:10:00 +02:00
Matthias Clasen
b54fab2b89 HighContrast: Fix undershoot in sidebars
This was just not implemented, and the sidebars solid white
background color was inherited by undershoot rectangle.

https://bugzilla.gnome.org/show_bug.cgi?id=753391
2015-08-08 23:10:00 +02:00
Kalev Lember
d6f51ef7b2 listbox: Avoid using show_all on rows
Don't use gtk_widget_show_all() on row widgets because that would
unconditionally show all of its children. This might be unwanted in case
the row implementation wants to keep some of its children hidden.

This commit changes it to use show() instead of show_all() and relies on
the row widget to control the visibility of its children itself as
appropriate.

https://bugzilla.gnome.org/show_bug.cgi?id=753392
2015-08-08 16:54:31 +02:00
Aurimas Černius
1f4f8833b1 Updated Lithuanian translation 2015-08-08 17:09:56 +03:00
Jordi Mas
e2e2c96bac Update Catalan translation 2015-08-08 15:20:14 +02:00
Christoph Reiter
6eaf5bd0f2 quartz: Implement CSD drag resize for all edges/corners
Manual resizing for CSD windows only worked with the bottom
right corner. This extends it to work for all corners and edges.

https://bugzilla.gnome.org/show_bug.cgi?id=753329
2015-08-08 13:28:35 +02:00
Matthias Clasen
27afd624cd HighContrast: Improve GtkCalendar drawing
Make days gray that are not in the current month.

https://bugzilla.gnome.org/show_bug.cgi?id=753357
2015-08-08 10:02:49 +02:00
Matthias Clasen
defc0cf5df file chooser button: Fix some refcounting confusion
GtkFileSystem has a complicated way to handle cancellables.
You keep the cancellable pointer that is returned by
_gtk_file_system_get_info and similar methods so that you can
cancel the operation, but you do not own a reference to it.
The only place where it is ok to unref a cancellable is in
your callback, which gets handed a cancellable that you need
to unref at the end. You are expected to compare it to the
pointer you stashed away to find out if the operation has
already been superseded by a newer call, in which case you
disregard the results.

GtkFileChooserButton was following these rules for most of
the cancellables it keeps around, but it was sometimes unreffing
the cancellables that are stored in the model, which could lead
to refcount confusion and crashes. This commit makes it follow
the rules for that case too, which fixes the crash in the bug
below, and does not show up any leaks in valgrind under light
testing.

https://bugzilla.gnome.org/show_bug.cgi?id=737804
2015-08-06 14:51:25 +02:00
Chun-wei Fan
f0a1a0c0a4 gtk/gtkcsstypesprivate.h: Fix Build
The recent change to the enum declaration for GtkCssChange actually
relied on compiler-dependent behavior, which also breaks the build on
some non-GCC compilers, such as Visual Studio.  As noted in the
G_STATIC_ASSERT line just beneath this declaration, we need to change
this enum declaration to #define's, in order to fix the build in such
situations.

https://bugzilla.gnome.org/show_bug.cgi?id=752814
2015-08-06 05:48:22 +08:00
Matthias Clasen
dea3bb2690 3.17.6 2015-08-05 14:20:12 -04:00
Matthias Clasen
9711608ba3 Fix a doc comment 2015-08-05 14:20:12 -04:00
Matthias Clasen
f2060d6881 Documentation fixes 2015-08-05 13:48:16 -04:00