Commit Graph

27757 Commits

Author SHA1 Message Date
Matthias Clasen
aa69b3af5a Merge branch 'gtk-3-24.win.updated' into 'gtk-3-24'
Fix pre-C99 builds of the gtk-3-24 branch

See merge request GNOME/gtk!310
2018-08-28 20:10:04 +00:00
Matthias Clasen
2307f8ec67 Merge branch 'fix-warning-combobox-destroy' into 'gtk-3-24'
Fix warning on GtkComboBox destroy

See merge request GNOME/gtk!311
2018-08-28 19:27:24 +00:00
Luca Bacci
aa5d926c84 Check for NULL priv->popup_window in gtk_combo_box_popdown()
Fixes issue #125
2018-08-28 18:39:05 +02:00
Matthias Clasen
61921eba57 Fix a typo
Its Hieroglyphs!

Closes: #1292
2018-08-28 12:26:49 -04:00
Chun-wei Fan
6cf7297653 gtk/gtkeventcontrollerscroll.c: Include fallback-c89.c
... instead of just math.h, as it uses the C99 function trunc().  This
is so that the code builds on pre-C99 compilers.
2018-08-28 17:43:11 +08:00
Chun-wei Fan
723e50990f gtk/fallback-c89.c: Add C89 fallback for trunc()
Check for trunc() during configure and provide a fallback implementation
for it if it is not found.
2018-08-28 17:43:04 +08:00
Matthias Clasen
ac654740f3 Deprecate GtkRange::upper/lower-stepper-sensitivity
These properties have been removed in GTK+ 4.
Deprecate them here.
2018-08-26 18:58:59 -04:00
Benjamin Otte
da8994f941 Don't deprecate gtk_widget_show_all()
After discussions on IRC, the conclusion was reached that deprecations
only make sense if an action can be taken to not use the deprecated code
that makes the code more current and simplifies a later port to a newer
GTK version.

In this particular case, the suitable action would be adding
gtk_widget_show() calls whenever a widget is created, so that a call to
show_all() is not necessary.
However, in GTK4 these calls would not be necessary and end up just
bloating the codebase unnecessarily.

So it was decided the better solution would be to not deprecate the API
and instead leave this work to be done during potential GTK4 ports of
applications.

This reverts commit 4d71d2303d.

Fixes !1282
2018-08-22 19:48:20 +02:00
Rico Tzschichholz
2306c82df7 gesturestylus: Add missing array g-i annotation for *_get_axes params 2018-08-20 17:01:59 +02:00
Iain Lane
dce33fa830 colorpickershell: Unpack the tuple returned from PickColor()
When calling PickColor on org.gnome.Shell, we get back an "a{sv}", which
GDBus provides to us as "(a{sv})".

At the minute we're not unpacking this tuple, and so picking fails with
messages like:

  GLib-CRITICAL **: 13:38:19.439: g_variant_lookup_value: assertion 'g_variant_is_of_type (dictionary, G_VARIANT_TYPE ("a{s*}")) || g_variant_is_of_type (dictionary, G_VARIANT_TYPE ("a{o*}"))' failed

  Gtk-WARNING **: 13:38:19.439: Picking color failed: No color received

Let's unpack it.
2018-08-17 09:10:59 -04:00
Matthias Clasen
c9f875bd77 Merge branch 'fix-shifted-scrolling-gtk3' into 'gtk-3-24'
gtkscrolledwindow: Consider shift key presses when decelerating [gtk3]

See merge request GNOME/gtk!287
2018-08-15 22:02:45 +00:00
Jonas Ådahl
14d22cb323 tooltip: Implement positioning using gdk_window_move_to_rect()
In order to make tooltip positioning portable, make use of the
move_to_rect API. Some semantical changes are made, as identical
semantics cannot be implemented using the move-to-rect API.

Primarily the implemented semantics are:

Position the tooltip in the center pixels slightly below (defaults to 4
units below) the tooltipped widget. This is always the case for keyboard
driven tooltips; the case where it tries to avoid the pointer cursor is
not implemented.

For pointer position triggered tooltips, implement the following
additional semantics:

Use the current cursor size to determine the padding used to enlarge the
anchor rectangle. This is to try to avoid the cursor overlapping the
tooltip.

If the anchor rectangle is too tall (meaning if we'd be constrained
and flip on the Y axis, it'd flip too far away from the originally
intended position), rely only on the pointer position to position the
tooltip. The approximate pointer cursor rectangle is used as a anchor
rectangle. Ideally we should use the actual pointer cursor rectangle
(image used as well as hotspot coordinate), but we don't have API to
get that information.

If the anchor rectangle isn't to tall, just make sure the tooltip isn't
too far away from the pointer position on the X axis.

Closes: #134
Closes: #432
Closes: #574
Closes: #579
Closes: #878
2018-08-10 18:32:54 +02:00
Matthias Clasen
2dde4e2ff8 Merge branch 'gtk-3-24-improve-error-message' into 'gtk-3-24'
gtkplacessidebar: Improve error message when unlocking volume fails

See merge request GNOME/gtk!266
2018-08-08 09:18:32 +00:00
Matthias Clasen
6b6e53fd23 Make color picker circular
The need for center alignment was pointed out by Timm Baeder.
2018-08-05 01:50:01 +00:00
Matthias Clasen
926f25aaec color picker: Also try kwin
use a kwin color picker when we run under kwin.
2018-08-05 01:48:29 +00:00
Matthias Clasen
7e74beec5b Only use the portal color picker when appropriate
This is just moving this check around.
2018-08-05 01:47:35 +00:00
Matthias Clasen
fc44f9755a Add a kwin color picker
This uses the org.kde.kwin.ColorPicker interface.
2018-08-05 01:47:04 +00:00
Sebastian Keller
5c6596ad99 gtkscrolledwindow: Consider shift key presses when decelerating
Otherwise horizontal scrolling using the shift key would decelerate
vertically.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/770
2018-08-04 16:36:47 +02:00
Benjamin Otte
6e4da8fbdb container: Deprecate focus chains 2018-07-31 22:46:15 +02:00
Matthias Clasen
4d71d2303d Deprecate show_all apis
These functions are gone in GTK+ 4, so deprecate them here.
2018-07-31 13:32:55 -04:00
Andrea Azzarone
06800b22ff window: Fallback to CSD titlebar in focus-chain
CSD titlebar are included in the focus-chain. The logic used makes sure that the
initial focus avoids the titlebar, but tabbing around will eventually get there.
This logic fails in case the window has no other focusable widgets apart from
the ones in the header-bar. If this happens keynav focus will be lost. To handle
the above scenario, we need to fallback to focus the header-bar (if any).

Fixes: https://gitlab.gnome.org/GNOME/gnome-software/issues/404
2018-07-31 02:37:12 +00:00
Matthias Clasen
9bae0758eb color picker: Better debug spew
This will help in debugging issues.
2018-07-30 18:10:27 -04:00
Matthias Clasen
7f290426dc Add a color picker implementation for gnome-shell
This adds a GtkColorPicker implementation that talks
to gnome-shell to get a color.
2018-07-30 18:10:17 -04:00
Matthias Clasen
740fc3eeff Add a color picker implementation for portals
This adds a GtkColorPicker implementation that talks
to the screnshot portal to get a color.
2018-07-30 18:10:17 -04:00
Matthias Clasen
6b3272e4b0 color editor: Add a color picker button
The button is shown if we have a GtkColorPicker implementation.
Currently, there are none, so the button is never shown.
2018-07-30 18:10:17 -04:00
Matthias Clasen
543fb6d7b6 Add a color picker interface
This will be used in the color chooser, in subsequent commits.
2018-07-30 17:33:52 -04:00
Matthias Clasen
77b4c4432e Merge branch 'wl_text_input_clean' into 'gtk-3-24'
Replace gtk_text_input with text_input_unstable_v3 support

See merge request GNOME/gtk!272
2018-07-30 19:31:37 +00:00
Dorota Czaplejewicz
8d77256d53 imwayland: Add text-input-unstable-v3 support
The wayland input module now represents text-input-unstable-v3 support, while the old module supporting gtk-text-input was renamed to gtkwayland.
2018-07-30 20:27:22 +02:00
Matthias Clasen
7fa5c361be Include Emoji category icons as resources too
These icons are very new in the Adwaita icon theme, so we can't
rely on them being widely available, and will just include them
for now.
2018-07-29 09:02:23 -04:00
Matthias Clasen
ff24c82dd4 Emoji chooser: Use icons for sections
This is more reliable than using text-style Emoji
which may not be present.

Based on work by Julian Sparber.
2018-07-29 09:02:07 -04:00
Benjamin Otte
e0807fcf54 gtk; Deprecate gtk_render_frame_gap()
Use gtk_render_frame() instead.
2018-07-24 20:32:26 +02:00
segfault
138c196e53 gtkplacessidebar: Improve error message when unlocking volume fails 2018-07-23 23:38:06 +02:00
segfault
0e7228b267 gtkplacessidebar: Show busy spinner in sidebar row during mount ops 2018-07-22 17:04:05 +02:00
Carlos Garnacho
eb3fd5e941 gtksettings: Remove leftover code
The immodule variable is unused
2018-07-21 14:55:01 +02:00
Alberts Muktupāvels
cb39169ba7 gtkcssprovider: deprecate gtk_css_provider_get_default
This function is unused since cdc6e82720 commit and does not
contain fallback style.

https://gitlab.gnome.org/GNOME/gtk/issues/1226
2018-07-20 14:55:27 +03:00
Timm Bäder
2c3a7c63ef Merge branch '628-text-view-width' into 'gtk-3-24'
Resolve #628: "TextView: spaces acting as non-breaking whitespace if :left- or :right-margin is set"

See merge request GNOME/gtk!236
2018-07-20 06:24:14 +00:00
Matthias Clasen
078870f604 Emoji chooser: Also check for hex boxes
We don't want to see those either.
2018-07-19 20:51:22 -04:00
Matthias Clasen
c52d9cfc14 moji chooser: Try harder to avoid fallback
We don't want to see any fallback rendering.
The current check was still letting some fallback
combinations through.

Based on work by Julian Sparber.
2018-07-19 20:51:07 -04:00
Timm Bäder
56033a8d27 gesturestylus: Clarify a documentation comment
Use the proper gtkdoc syntax for signals.
2018-07-18 23:05:06 +01:00
Matthias Clasen
affb4ff5f4 Fix up version annotations
The new api here was introduced in 3.24.
2018-07-18 07:18:21 -04:00
Carlos Garnacho
9ee60777e7 sm scroll 2018-07-16 15:44:35 +02:00
Carlos Garnacho
a8463953a4 gtk: Add GtkGestureStylus
This is a GtkGesture done to deal with stylus events from drawing tablets.
Those have a special number of characteristics that extend a regular
pointer, so it makes sense to wrap that.
2018-07-16 15:43:43 +02:00
Carlos Garnacho
7793aab5f0 gtkeventcontrollerkey: Add ::focus-in/out signals
And handle GDK_FOCUS_CHANGE events in order to emit those.
2018-07-16 15:43:43 +02:00
Carlos Garnacho
ecf9fa65b8 gtkeventcontrollerkey: Add get_group() call
Callers can use this function on a key-pressed/released signal
to find out the key event group, useful in a few places.
2018-07-16 15:43:43 +02:00
Carlos Garnacho
a32933b056 eventcontrollerkey: Add function to forward stuff elsewhere 2018-07-16 15:43:43 +02:00
Carlos Garnacho
e0f3e8a7e5 gtk: Add GtkEventControllerKey
This event controller is meant to replace usage from key-press/release-event
handlers all through. Optionally it can be set a GtkIMContext, so interaction
is carried by the controller.
2018-07-16 15:43:43 +02:00
Matthias Clasen
1f9de707f7 Add x/y to GtkEventControllerMotion::enter
We have this information available in enter events,
and having it in the controller signal as well makes
porting easier.

Update existing users.
2018-07-16 15:43:43 +02:00
Matthias Clasen
8b2c3a8c1a Add a simple motion eventcontroller
This can serve as a replacement for the legacy
event signals for enter/leave/motion notify.
2018-07-16 15:43:43 +02:00
Matthias Clasen
e7af3410cf Avoid excess notification for GdkEventControllerScroll::flags
We have a test that checks this, and it is the right thing to do.
2018-07-16 15:43:43 +02:00
Carlos Garnacho
84d3bfb6fd gtk: Remove CONSTRUCT_ONLY flag from GtkEventControllerScroll::flags
There is a gtk_event_controller_scroll_set_flags() call that's meant
to be called after construction (eg. due to scrolledwindow relayouts
hiding/showing scrollbars). The property shouldn't be construct-only
for consistence.
2018-07-16 15:43:43 +02:00