Commit Graph

59245 Commits

Author SHA1 Message Date
Benjamin Otte
578dc9e70b eventcontrollerkey: Add getters for the properties
...and use them.
2019-10-07 04:49:50 +02:00
Benjamin Otte
6769db160d icontheme: Don't try to scale pixbufs to 0px
Always insist on at least 1px, even if the thumbnail we're turning into
an icon was 256 * 3 and should be scaled to 32 * 3/8.
2019-10-07 04:49:50 +02:00
Benjamin Otte
56d16aae42 selectionmodel: Remove doubled semicolon 2019-10-07 04:49:50 +02:00
Alan Mortensen
d614f4c96d Updated Danish translation of gtk 2019-10-06 23:36:47 +02:00
Daniel Boles
98f0d85c4a Builder: Fix a couple of typos in documentation 2019-10-06 20:48:10 +01:00
Piotr Drąg
b3115454ce Update POTFILES.in 2019-10-06 15:13:31 +02:00
Benjamin Otte
cb3b6ff624 Merge branch 'gbsneto/vulkan-fixes' into 'master'
Implement VK_KHR_incremental_present

See merge request GNOME/gtk!1116
2019-10-05 15:19:04 +00:00
Georges Basile Stavracas Neto
a795d6635b vulkan/context: Implement VK_KHR_incremental_present
This is the Vulkan version of eglSwapBuffersWithDamage(), and
it's always a good idea to limit the number of pixels we're
pushing to the GPU and/or swapping into the display.
2019-10-05 12:13:22 -03:00
Georges Basile Stavracas Neto
a2b49322fb vulkan/renderpass: Use GENERAL for initial layout
UNDEFINED initial layouts may not preserve the contents
of the attachment after transitioning the layout. We want
them to be preserved because we do partial rendering.

Use GENERAL as the initial layout for render passes.
2019-10-05 12:13:22 -03:00
Georges Basile Stavracas Neto
0b2006b74f vulkan/image: Set HOST and TRANSFER bits for before barriers
Multiple images in the before barrier array are defined with
VK_ACCESS_TRANSFER_WRITE_BIT and VK_ACCESS_TRANSFER_READ_BIT,
which requires passing VK_PIPELINE_STAGE_TRANSFER_BIT and
VK_PIPELINE_STAGE_HOST_BIT to vkCmdPipelineBarrier().

Pass these flags correctly.
2019-10-05 12:13:22 -03:00
Georges Basile Stavracas Neto
a91d0ac156 wayland: Allow binding to wl_compositor v4
This is a requirement for using VK_KHR_incremental_present.
Vulkan Wayland drivers translate the VkPresentRegionsKHR to
wl_surface.damage_buffer(), which a v4-only request.
2019-10-05 12:13:22 -03:00
Christian Hergert
d71995ab5c Merge branch 'wip/chergert/textview-widgets' into 'master'
textview: use GtkWidget for borders and center_child

See merge request GNOME/gtk!1099
2019-10-04 23:30:04 +00:00
Christian Hergert
fea2a82ef6 textview: use GtkTextViewChild for border and overlay children
This creates a new GtkTextViewChild that can manage overlay children at
given x,y offsets in buffer coordinates. This simplifies GtkTextView by
extracting this from GtkTextWindow as well as providing a real widget for
the borders.

With this change, we also rename gtk_text_view_add_child_in_window() to
gtk_text_view_add_overlay(). For those that were using
GTK_TEXT_WINDOW_WIDGET, they can use a GtkOverlay. It does not appear
that anyone was using GTK_TEXT_WINDOW_(LEFT|RIGHT|TOP|BOTTOM) for widgets
in this fashion, but that can be done by setting a gutter widget with
gtk_text_view_set_gutter(). We can make GtkTextViewChild public if
necessary to simplify this should it become necessary.

GtkTextViewChild will setup a CSS node of either "text" or "border"
depending on the GtkTextWindowType.

The old GtkTextViewChild has been renamed to AnchoredChild as it is only
used for widgets with anchors in the GtkTextBuffer. This also removes the
use of allocated GSList and instead embeds a GQueue and GList to save a
few extraneous allocations.
2019-10-04 14:45:43 -07:00
Christian Hergert
8373cc6c47 textview: revert renaming of buffer_to_surface_coords()
The renaming of this function doesn't make much since because the window
is the GtkTextWindowType, not GdkWindow specifically. So we can keep the
old name which is closer to the proper meaning and less code for consumers
to change when porting to 4.x.
2019-10-04 13:22:49 -07:00
Matthias Clasen
872d2046fd Merge branch 'list-box-headers' into 'master'
Fix reuse of list box header widgets

See merge request GNOME/gtk!1114
2019-10-04 18:27:05 +00:00
Sam Hewitt
44ec142fa9 Adwaita: new levelbar style 2019-10-04 14:16:11 -04:00
Philip Withnall
b70f389b64 gtklistbox: Only unparent header rows if they haven’t been reused
It’s possible for code which uses a `GtkListBox` to reuse a single
header row, and move it around between rows. For example, this might
happen if the code has interactive widgets (like buttons) in the row,
and doesn’t want to continually recreate them and reattach signals to
them whenever the row headers change.

Unfortunately, this was broken, as the old header widget was
unconditionally unparented, even if it had just been set as the header
for a different row in the same `GtkListBox`. This left it assigned as
a child widget in the `GtkListBox` (so it was iterated over by
`forall`), but without its parent widget set.

Fix that by only unparenting the header if it hasn’t already been
assigned as the parent of a different row.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-10-04 18:48:53 +01:00
Philip Withnall
1c73edd9b0 gtklistbox: Factor the new header out into a separate variable
Makes the code a little clearer, but makes no functional changes.

Signed-off-by: Philip Withnall <withnall@endlessm.com>
2019-10-04 18:48:51 +01:00
Christoph Reiter
94d9088034 Print a warning if GTK_DEBUG is set but gtk isn't built with G_ENABLE_DEBUG
G_ENABLE_DEBUG is tied to the meson builttype property, so building with "plain"
results in G_ENABLE_DEBUG not being defined and the GTK_DEBUG env var just gets ignored
for that build.

Since it can be confusing that GTK_DEBUG has no effect print a warning message instead.

See #2020. This is a port of !1109 to master
2019-10-02 21:35:20 +02:00
Ask Hjorth Larsen
cbd9e560b0 Updated Danish translation of gtk-properties 2019-10-02 05:54:14 +02:00
Ask Hjorth Larsen
abc595b810 Updated Danish translation of gtk 2019-10-02 05:54:12 +02:00
Marek Černocký
7d26d3926c Updated Czech translation 2019-10-02 02:06:50 +02:00
Georges Basile Stavracas Neto
0e55f7a52f wayland/surface: Fix crash when unexporting
This is the exact same problem of 655c9dd526.
2019-10-01 16:13:43 -03:00
Marek Černocký
febe128e72 Updated Czech translation 2019-10-01 17:32:46 +02:00
Georges Basile Stavracas Neto
3afc7b0883 Merge branch 'gbsneto/fix-wayland-export-handle' into 'master'
wayland/surface: Only call destroy func when available

Closes #2179

See merge request GNOME/gtk!1112
2019-10-01 15:22:22 +00:00
Georges Basile Stavracas Neto
655c9dd526 wayland/surface: Only call destroy func when available
When calling gdk_wayland_surface_export_handle(), if we pass
some 'user_data' but no 'destroy_func', GTK4 crashes. That's
because in xdg_exported_handle() we are unconditionally calling
destroy_func -- even when it's NULL.

Fix that by checking if there's a destroy function before calling
it.

Fixes https://gitlab.gnome.org/GNOME/gtk/issues/2179
2019-10-01 11:54:28 -03:00
Matej Urbančič
bcea96528a Updated Slovenian translation 2019-09-28 21:14:54 +02:00
Piotr Drąg
7336e18410 Update Polish translation 2019-09-28 13:59:24 +02:00
Aurimas Černius
412af0269d Updated Lithuanian translation 2019-09-28 12:51:44 +03:00
Matthias Clasen
5e17afbc0a Merge branch 'printing-get-ppd-from-original-host-if-needed' into 'master'
Printing get ppd from original host if needed

See merge request GNOME/gtk!1100
2019-09-27 19:24:00 +00:00
Benjamin Otte
912236439c Merge branch 'wip/ricotz/mediafile' into 'master'
mediafile: Use correct return-type for factory methods

See merge request GNOME/gtk!1105
2019-09-26 10:44:30 +00:00
Rico Tzschichholz
0ad4166482 mediafile: Add g-i annotations for actual return-type of factory methods 2019-09-26 08:19:25 +02:00
Timm Bäder
7ce1055656 eventcontrollerscroll: Events are unhandled by default
While the ::scroll signal always returns whether it handled the event,
the others do not, for example ::decelerate.

Previously, this caused the event to stop at a scroll controller with
CAPTURE phase, never emitting the ::decelerate signal on later
controllers with BUBBLE phase.

Fixes #2151
2019-09-25 17:51:53 +02:00
Timm Bäder
78a376aa7f snapshot: Try to avoid some linear gradient nodes 2019-09-25 17:51:52 +02:00
Timm Bäder
43f2b47fc9 searchentry: Use a box layout 2019-09-25 17:51:52 +02:00
Timm Bäder
413cfed7d7 searchentry: Use edit-clear-all-symbolic as clear icon
Fixes #2109
2019-09-25 17:51:52 +02:00
Timm Bäder
e05b87c8d0 gl renderer: Fix rounded rect intersection 2019-09-25 17:51:52 +02:00
Timm Bäder
1b4bce4182 fontchooserwidget: Use a bin layout 2019-09-25 17:51:52 +02:00
Timm Bäder
387587dedb colorbutton: Use a bin layout 2019-09-25 17:51:52 +02:00
Timm Bäder
5d8c8f33c0 dialog: Remove useless gtk_widget_show() call 2019-09-25 17:51:52 +02:00
Timm Bäder
d032396031 filechooserbutton: Add icon to default (None) combo box item
See #2118
2019-09-25 17:51:52 +02:00
Timm Bäder
12438b30a0 filechooserbutton: Remove priv->child
We never use it except when updating the state flags, but we can as well
do that for both children.
2019-09-25 17:51:52 +02:00
Timm Bäder
ea1ff9c482 filechooserbutton: Remove an outdated comment
The path used is wrong but the string isn't used in the testsuite
anyway.
2019-09-25 17:51:52 +02:00
Timm Bäder
8122156e84 scrolledwindow: Remove set_placement_internal()
set_placement() does the exact same thing.
2019-09-25 17:51:52 +02:00
Timm Bäder
991f4ed993 menubar: Use a box layout 2019-09-25 17:51:51 +02:00
Timm Bäder
29244c5c40 video: Use a bin layout 2019-09-25 17:51:51 +02:00
Timm Bäder
ca3d855c44 levelbar: Use a bin layout 2019-09-25 17:51:51 +02:00
Matthias Clasen
3fcd39f659 docs: Add GtkNative to types
This is needed to make doc generation work
for GtkNative.
2019-09-24 11:38:35 -04:00
Danial Behzadi
c2b823f185 Update Persian translation 2019-09-22 11:36:55 +00:00
Timm Bäder
7de076481e headerbar: Fix end-packed child order
We pack from right to left there.
2019-09-21 09:41:53 +02:00