Matthias Clasen
d4d12171f4
Avoid a pointless goto
...
We can just return here.
2018-08-31 13:24:17 -04:00
Matthias Clasen
21e484731a
Add a helpful comment
2018-08-31 13:23:25 -04:00
Matthias Clasen
b82a32676b
GtkApplication: track screensaver state
...
A number of applications want to track the state of the screensaver.
Make this information available as a boolean property. We only listen
for state changes when ::register-session is set to TRUE.
This is implemented for unsandboxed D-Bus access by talking
directly to org.gnome.ScreenSaver or org.freedesktop.ScreenSaver,
and for sandboxed D-Bus by using a (new) portal API.
A Quartz implementation is missing.
2018-08-30 22:53:36 -04:00
Matthias Clasen
d7228ae025
GtkApplication: Respect GTK_USE_PORTAL
...
When the environment variable is set, don't connect
to the session manager, but instead rely on the
inhibit portal.
2018-08-30 22:53:36 -04:00
Matthias Clasen
04c02e9aec
file chooser portal: use request path utilities
...
Less code duplication, more sticky toffee!
2018-08-30 22:53:36 -04:00
Matthias Clasen
d6945d81f0
print portal: use request path utilities
...
Less code duplication, more cookies!
2018-08-30 22:53:36 -04:00
Matthias Clasen
6d6559f982
color picker portal: Add request path utility
...
Less code duplication, more cake!
2018-08-30 22:53:36 -04:00
Matthias Clasen
b271db253f
Add utility functions for portal paths
...
The paths that we create for requests and sessions
need some icky code to create. Keep it in one place.
2018-08-30 22:53:36 -04:00
Jakub Steiner
72498b9e28
Merge branch 'selection-mode-separator' into 'master'
...
Adwaita: Add color to separator.selection-mode
See merge request GNOME/gtk!309
2018-08-30 07:40:46 +00:00
Matthias Clasen
b904fc6ee0
Add a missing cast
...
This fixes a warning introduced in the previous commit.
2018-08-29 19:55:58 -04:00
Matthias Clasen
3b8d206143
The file chooser is no box anymore
...
Don't treat it as one, it does not like it.
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1297
2018-08-29 13:11:06 -04:00
Kai Willadsen
ba6c5ef201
FileChooserWidget: Don't show recent items with private hint set
2018-08-28 16:15:45 -04:00
Matthias Clasen
c3e72c4d7e
Fix a typo
...
Its Hieroglyphs!
Closes : #1292
2018-08-28 12:24:13 -04:00
Timm Bäder
a6c47cb3ab
Merge branch 'revealer-clipping' into 'master'
...
revealer: Only clip child when animating
See merge request GNOME/gtk!301
2018-08-28 14:49:37 +00:00
Timm Bäder
9fbcbc55d7
Revert "paned: Use a GtkIcon as separator"
...
This reverts commit 749ef4d71c
.
The GtkIcon and GtkGizmo measure code is different, the former uses
-gtk-icon-size.
2018-08-27 18:55:31 +02:00
Timm Bäder
00a27c1e28
box: Remove gtk_box_get_size
...
One function to measure the box in the opposite of its internal
direction is enough.
2018-08-27 18:53:56 +02:00
Timm Bäder
f5f6597abc
box: Rename avail_size to for_size everywhere
...
So we call it like we call it everywhere else.
2018-08-27 18:48:09 +02:00
Timm Bäder
fade0afbef
box: Simplify compute_size_for_orientation
2018-08-27 18:45:03 +02:00
Adrien Plazas
a4790b7eaa
Adwaita: Add color to separator.selection-mode
...
This makes separators to look good when separating two header bars in
selection mode.
https://gitlab.gnome.org/GNOME/gtk/issues/1286
2018-08-27 14:07:17 +02:00
Timm Bäder
911627fa0b
menuitem: Remove duplicate include
2018-08-25 08:06:34 +02:00
Timm Bäder
ec576088bb
picture: Fix doc typo
2018-08-25 08:06:28 +02:00
Timm Bäder
ab0b54db76
spinner: Remove private struct
...
Since priv->active is equivalent to the widget state being CHECKED, we
can as well use that everywhere.
2018-08-25 08:06:21 +02:00
Timm Bäder
fb51f8be9a
colorswatch: Remove dead assignment
2018-08-25 08:06:18 +02:00
Timm Bäder
eb22c7c9c3
image: Fix gtkdoc property syntax
2018-08-25 08:06:14 +02:00
Timm Bäder
749ef4d71c
paned: Use a GtkIcon as separator
...
And save a few lines that way.
2018-08-25 08:06:11 +02:00
Timm Bäder
f6fae1dd09
menubutton: Remove outdated line
...
.menu-button is not a style class we use anywhere.
2018-08-25 08:06:07 +02:00
Timm Bäder
f21abba82f
renderborder: Remove unused function
2018-08-25 08:06:03 +02:00
Timm Bäder
bf222a9292
renderborder: Pull some locals into the closest scope
...
Especially the bounds graphene_rect_t, which is unused in the
non-border-image case.
2018-08-25 08:05:57 +02:00
Timm Bäder
96e465b6d9
checkbutton: Remove snapshot implementation
...
It just does when the default GtkWidget implementation does anyway:
snapshot all child widgets
2018-08-25 08:05:52 +02:00
Timm Bäder
016de68ceb
radiobutton: Save signal IDs like everything else
2018-08-25 08:05:48 +02:00
Timm Bäder
d2178bcb94
fixed: Remove unused struct member
2018-08-25 08:04:43 +02:00
Ernestas Kulik
f40eb8a1fe
revealer: Only clip child when animating
...
Currently, GtkRevealer clips the child if the transition type is
sliding, regardless of whether the animation had already ended. An
example where that is a problem would be in Nautilus: the file
operations popover button is animated on reveal to draw attention, but,
given that the button is in turn stashed inside a revealer with a
sliding animation, things suddenly fall apart.
2018-08-23 11:13:36 +03:00
Matthias Clasen
9e0f43e8cb
entry completion: Avoid critical warnings
...
We must not call move-to-rect unless we have
a transient parent.
2018-08-20 19:15:27 +00:00
Matthias Clasen
3e4d7250a0
Merge branch 'fix-shifted-scrolling' into 'master'
...
gtkscrolledwindow: Consider shift key presses when decelerating
Closes #770
See merge request GNOME/gtk!286
2018-08-20 18:26:28 +00:00
Rico Tzschichholz
4ebd14c045
gesturestylus: Add missing array g-i annotation for *_get_axes params
2018-08-20 16:57:54 +02:00
Matthias Clasen
a32fb5b849
Merge branch 'kill-subsurface' into 'master'
...
Kill subsurfaces
See merge request GNOME/gtk!299
2018-08-19 03:50:40 +00:00
Matthias Clasen
eed19c9269
Move tools to a subdirectory
...
A small step towards splitting up gtk/
2018-08-19 03:41:25 +00:00
Matthias Clasen
a7aed5af4b
Drop gtk_window_set_use_subsurface
...
This is no longer used.
2018-08-18 23:24:59 -04:00
Matthias Clasen
220a51e7cb
entry completion: stop using subsurfaces
...
Instead, use a popup and gdk_surface_move_to_rect.
I have not tried to reproduce all details of the old
positioning logic, but moving the popup above/below
the entry works as before.
2018-08-18 23:24:53 -04:00
Jonas Ådahl
6df28420d7
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-19 01:26:20 +00:00
Timm Bäder
ce9ce8a5bc
menu: Remove key_controller member
...
Unused.
2018-08-18 20:54:29 +02:00
Timm Bäder
2322f38bf9
menu: Remove initially_pushed_in flag
...
Unused.
2018-08-18 20:54:29 +02:00
Timm Bäder
dcb6c9b4cf
menu: Remove seen_item_enter flag
...
Unused.
2018-08-18 20:54:29 +02:00
Timm Bäder
afdeffd820
menu: Remove have_position flag
...
It's always FALSE.
2018-08-18 20:54:29 +02:00
Timm Bäder
10439aaefe
menu: Remove an unnecessary gtk_widget_destroy() call
...
The unref will already properly free the menu item's resources.
2018-08-18 20:54:29 +02:00
Matthias Clasen
d13cd9cb67
Merge branch 'fix-shell-colorpicker' into 'master'
...
colorpickershell: Unpack the tuple returned from PickColor()
See merge request GNOME/gtk!296
2018-08-17 12:35:46 +00:00
Matthias Clasen
79b87cc543
print portal: don't leak window handles
...
Pointed out by Christian Persch.
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1274
2018-08-15 23:21:15 +00:00
Matthias Clasen
3c2aceba63
print portal: Plug a memory leak
...
Pointed out by Christian Persch.
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1271
2018-08-15 23:13:15 +00:00
Matthias Clasen
a01feae15b
Use defines for bus names
...
This helps eradicate typos (we had some here).
Closes https://gitlab.gnome.org/GNOME/gtk/issues/1267
2018-08-15 15:54:34 -07:00
Matthias Clasen
b4d4f73d9f
Merge branch 'sort' into 'master'
...
updateiconcache: Sort list of entries
See merge request GNOME/gtk!297
2018-08-15 22:00:13 +00:00