Commit Graph

38651 Commits

Author SHA1 Message Date
Matthias Clasen
489b59867c Revert "GtkMisc: Keep gtk_misc_set_alignment working"
This reverts commit aabc356b80.

Labels are back to looking at x/yalign (for now).
2014-05-29 10:32:46 -04:00
Carlos Garnacho
618e3d3157 eventcontroller: Ensure controllers stay alive during event emission
Those might trigger the destruction of some widget that would dispose the
event controller while the event is still being handled, so keep an extra
ref on the controller during event processing.
2014-05-28 19:39:07 +02:00
Carlos Garnacho
8c21b0bee5 docs: Add some more information in the "input handling model" chapter
Grabs/Touch/Gestures are now fairly well covered. Only keyboard handling
is left.
2014-05-28 15:52:14 +02:00
Evan Nemerson
9db729f5a6 gtk: fix several out argument annotations
These mostly just switch from allow-none to optional, nullable, or
both, as necessary.

https://bugzilla.gnome.org/show_bug.cgi?id=730745
2014-05-27 21:10:33 -07:00
Evan Nemerson
a77765f172 gtk: add missing ownership annotations ported from Vala
https://bugzilla.gnome.org/show_bug.cgi?id=730745
2014-05-27 21:10:33 -07:00
Evan Nemerson
07d825574f gtk: add missing type annotations ported from Vala bindings
https://bugzilla.gnome.org/show_bug.cgi?id=730745
2014-05-27 21:10:33 -07:00
Evan Nemerson
bda145b19f gtk: fix annotation syntax and missing some missing annotations
These changes clean up various errors and omissions resulting from
either slightly incorrect G-I/gtk-doc syntax or missing documentation
blocks.

https://bugzilla.gnome.org/show_bug.cgi?id=730745
2014-05-27 21:10:32 -07:00
Evan Nemerson
e596e58c51 gtk: port missing array annotations from Vala bindings
https://bugzilla.gnome.org/show_bug.cgi?id=730745
2014-05-27 21:10:32 -07:00
Evan Nemerson
e568903360 gtk: fix many callback annotations to include closure information
Without this information introspection-based consumers don't realize
they can include context information, but instead think that they
receive an extra gpointer argument (which they don't know how to
handle).

https://bugzilla.gnome.org/show_bug.cgi?id=730745
2014-05-27 21:10:32 -07:00
Matthias Clasen
2388c69f0c Add some gesture tests
This test starts to assemble tests related to event propagation,
interaction with traditional event signal handlers, claiming of
events, etc.
2014-05-27 19:15:40 -04:00
Matthias Clasen
4841f8f773 Forgotten file
Oops.
2014-05-27 17:56:39 -04:00
Matthias Clasen
255b877915 Bump version 2014-05-27 17:49:22 -04:00
Matthias Clasen
a28d2cb923 Move extract-strings to its own directory
This will hopefully help resolve the circular dependency between
libgtk linking against inspector/libgtkinspector and inspector/
needing extract-strings from gtk/.

I didn't preserve the EXEEXT decorations in this operation -
automake gave me stern warnings about it, so I just dropped them
all. Somebody who cross-builds GTK+ will have to reconstruct this.
2014-05-27 17:28:10 -04:00
Matthias Clasen
ea2d20e313 Fix distcheck 2014-05-27 15:14:02 -04:00
Matthias Clasen
d51c6af247 3.13.2 2014-05-27 14:33:32 -04:00
Matthias Clasen
3bb404f40c Don't assert in gtk_event_controller_constructed
This prevents some of our generic object implementation tests
from working with gesture objects. Instead, add g_return_if_fail
checks in all the gesture constructors.
2014-05-27 14:33:32 -04:00
Matthias Clasen
e4680d64a0 Documentation fixes
Add a few missing symbols, and match up parameters in headers
and doc comments.
2014-05-27 14:33:32 -04:00
Kristian Høgsberg
6cd26e0939 wayland: Use event->key.time for setting key event time
We were using event->button.time before. That works because it's part of
the common event header, but it's wrong.
2014-05-27 10:24:34 -07:00
Kristian Høgsberg
544e1ac1d1 wayland: Remove unused XSERVER_TIME_IS_LATER macro 2014-05-27 10:24:34 -07:00
Matthias Clasen
4ce2f3e769 Silence gtk-doc warnings 2014-05-27 13:17:34 -04:00
Matthias Clasen
7fa0228755 Revert "GtkImage: Drop use of GtkMisc::x/yalign"
This reverts commit 54d5b426fc.

Conflicts:
	gtk/gtkimage.c
2014-05-27 13:08:25 -04:00
Matthias Clasen
24863a0b6a Revert "GtkLabel: Drop use of GtkMisc::x/yalign"
This reverts commit b320c198b6.
2014-05-27 13:07:03 -04:00
Matthias Clasen
6ce2a8fb13 Revert "Fix up GtkLabel and GtkImage sizing"
This reverts commit 3b30cfa344.
2014-05-27 13:04:43 -04:00
Matthias Clasen
7c83a71239 Revert "More label and image sizing fixes"
This reverts commit 68c1e83cf0.
2014-05-27 13:04:34 -04:00
Carlos Garnacho
d9bdb9a137 window: Do not raise border windows on each size allocation
This prevents these windows from being raised above popovers, which
is about the only child widget that may overlap with those anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=730589
2014-05-27 17:56:59 +02:00
Carlos Garnacho
4cf111aab3 treeview: Make the multipress gesture listen only to bin_window
This gesture is meant to handle row-activated signaling, so make the
gesture ignore events from any other window.
2014-05-27 17:47:13 +02:00
Carlos Garnacho
2012b67c5b button: Claim the sequence on multipress::pressed
In order to avoid the event from bubbling, as it used to (not) do.
2014-05-27 17:47:12 +02:00
Carlos Garnacho
e0fd901722 gesture: Fix wrong assert in gtk_gesture_set_window
The window must be part of the event controller widget, so
fix the inverted logic.
2014-05-27 17:47:12 +02:00
Carlos Garnacho
49a6626884 eventcontroller: Hide more details
Signals are left hidden, so the only entry point to handle_event/reset
is API.
2014-05-27 17:47:12 +02:00
Carlos Garnacho
907e9f1946 gtk: Update GtkGesture users to the GtkPropagationPhase semantics change
Mainly doing s/TARGET/BUBBLE/ on the fully ported widgets, but GtkTreeView
where the double click handler has moved to GTK_PHASE_TARGET so it runs
parallelly to the still existing event handlers.
2014-05-27 17:47:12 +02:00
Carlos Garnacho
505efbb3f3 widget: Change GtkCapturePhase behavior in event controllers' handling
Previously, there would be globally just a capture and a bubble phase,
with the event just going down the hierarchy once, and the up once.
GTK_PHASE_TARGET actually meaning "run within event handlers", so in
a hierarchy of 3 widgets, emission would be:

  Capture(C)
  Capture(B)
  Capture(A)
  Target(A) (if event handlers allow)
  Bubble(A)
  Target(B) (if event handlers allow)
  Bubble(B)
  Target(C) (if event handlers allow)
  Bubble(C)

This commit changes this behavior and uses GTK_PHASE_TARGET in a less
misleading way, running only on the widget that was meant to receive
the event. And GTK_PHASE_BUBBLE has taken over the execution place of
GTK_PHASE_TARGET, so the emission remains:

  Capture(C)
  Capture(B)
  Capture(A)
  Target(A)
  Bubble(A) (if event handlers allow)
  Bubble(B) (...)
  Bubble(C) (...)

As it was, GTK_PHASE_BUBBLE was useful for running event controllers
paralelly to event handlers, without modifying a single line in those.
For those mixed scenarios, Any of the other phases will have to be
used at discretion, or the event handlers eventually changed to chain
up and let the default event handlers in GtkWidget to be run.
2014-05-27 17:47:12 +02:00
Carlos Garnacho
a8e833dc5c window: Avoid double event processing in the multipress event controller
The events to those are fed outside the regular event propagation scheme,
through _gtk_window_check_handle_wm_event(), so set the controller to
GTK_PHASE_NONE so events aren't processed first manually, and then
automatically.
2014-05-27 17:47:12 +02:00
Carlos Garnacho
9f8bd7a2bc gesturezoom: Just return a double in get_scale_delta()
Checking whether the gesture is active is a responsibility of the caller.
2014-05-27 17:47:12 +02:00
Carlos Garnacho
8f7d5fb2c0 gesturerotate: Just return a double in get_angle_delta()
Whether the gesture is active or recognized should be checked before in
callers, or just not used naively.
2014-05-27 17:47:12 +02:00
Carlos Garnacho
d05a9f9a7b gesture: Replace gtk_gesture_attach/detach with event controller API
Event controllers now auto-attach, and the GtkCapturePhase only determines
when are events dispatched, but all controllers are managed by the widget wrt
grabs.

All callers have been updated.
2014-05-27 17:47:12 +02:00
Carlos Garnacho
ad6606e8af gtk: Update callers of GtkGesturePan orientation 2014-05-27 17:47:12 +02:00
Carlos Garnacho
2e903243c6 eventcontroller: Make the event-mask property and methods private.
This will rarely have any use if no subclassing is allowed, so just make it
private for our own.
2014-05-27 17:47:12 +02:00
Carlos Garnacho
ef61c9c58b gtk: Replace GtkPanOrientation with GtkOrientation
And document GtkOrientation to be more generic. There's little added
value in a separate enum for this.
2014-05-27 17:47:12 +02:00
Matthias Clasen
68c1e83cf0 More label and image sizing fixes
Go back to respecting GtkMisc::xpad/ypad. Not doing so breaks
the misc-alignment reftest. As long as we still derive from
GtkMisc, we may as well do this.
2014-05-27 06:00:21 -04:00
Matthias Clasen
3b30cfa344 Fix up GtkLabel and GtkImage sizing
When GtkMisc was removed, I forgot to apply the style context
padding. This caused the info-bar-message-types reftest to fail.
2014-05-27 00:22:40 -04:00
Matthias Clasen
2488b954f2 Don't use hicolor as the default icon-theme
The icontheme lookup code has a special-case that prefers builtin icons
if the theme name is "hicolor". This is problematic for our reftests,
which run in a barebones environment with not settings.
2014-05-26 23:17:32 -04:00
Matthias Clasen
38daabd838 docs: enum cleanup
Move GtkIMPreeditStyle nad GtkIMStatusStyle to the settings where
they are solely used.
2014-05-26 10:37:34 -04:00
Matthias Clasen
0bd0f39576 docs: enum cleanup
Move GtkStateType to the GtkWidget apis where it is used, and
mark the enum as deprecated.
2014-05-26 10:37:06 -04:00
Matthias Clasen
4ae95157ae docs: remove markup
The overview chapters don't go through shorthand processing, so
don't use them there.
2014-05-26 10:17:07 -04:00
Kalev Lember
750f6b9913 GtkApplication: Fix two muxer-related memory leaks
Drop the ref on the action muxer in finalize, and also make sure
shutdown() tears down the muxer setup done in startup().

When GtkApplication adds itself to a muxer, it causes the muxer to take
a ref on the GtkApplication. This has to be undone in shutdown() to make
sure the GtkApplication doesn't end up holding a ref on itself.

https://bugzilla.gnome.org/show_bug.cgi?id=730383
2014-05-25 10:49:27 +02:00
Matthias Clasen
8230299748 inspector: Allow changing attribute mappings 2014-05-24 23:31:54 -04:00
Matthias Clasen
83f9649c9c docs: Move GdkColor off into a deprecated section 2014-05-24 23:31:54 -04:00
Kalev Lember
edb4c65c5b Bump ATK dependency to 2.12
... for the new AtkValue interface that we implement.
2014-05-25 00:17:55 +02:00
Matthias Clasen
df0f14fe2a Some more updates 2014-05-24 18:41:16 -04:00
Matthias Clasen
8a6aca31a8 Typo fixes 2014-05-24 18:20:31 -04:00