Alan Mortensen [Sun, 6 Oct 2019 21:36:47 +0000 (23:36 +0200)]
Updated Danish translation of gtk
Daniel Boles [Sun, 6 Oct 2019 19:48:10 +0000 (20:48 +0100)]
Builder: Fix a couple of typos in documentation
Piotr Drąg [Sun, 6 Oct 2019 13:13:31 +0000 (15:13 +0200)]
Update POTFILES.in
Benjamin Otte [Sat, 5 Oct 2019 15:19:04 +0000 (15:19 +0000)]
Merge branch 'gbsneto/vulkan-fixes' into 'master'
Implement VK_KHR_incremental_present
See merge request GNOME/gtk!1116
Georges Basile Stavracas Neto [Fri, 4 Oct 2019 21:53:10 +0000 (18:53 -0300)]
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.
Georges Basile Stavracas Neto [Fri, 4 Oct 2019 20:55:25 +0000 (17:55 -0300)]
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.
Georges Basile Stavracas Neto [Fri, 4 Oct 2019 14:52:43 +0000 (11:52 -0300)]
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.
Georges Basile Stavracas Neto [Sat, 5 Oct 2019 14:38:29 +0000 (11:38 -0300)]
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.
Christian Hergert [Fri, 4 Oct 2019 23:30:04 +0000 (23:30 +0000)]
Merge branch 'wip/chergert/textview-widgets' into 'master'
textview: use GtkWidget for borders and center_child
See merge request GNOME/gtk!1099
Christian Hergert [Fri, 4 Oct 2019 02:21:45 +0000 (19:21 -0700)]
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.
Christian Hergert [Mon, 23 Sep 2019 23:08:53 +0000 (16:08 -0700)]
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.
Matthias Clasen [Fri, 4 Oct 2019 18:27:05 +0000 (18:27 +0000)]
Merge branch 'list-box-headers' into 'master'
Fix reuse of list box header widgets
See merge request GNOME/gtk!1114
Sam Hewitt [Fri, 4 Oct 2019 18:16:11 +0000 (14:16 -0400)]
Adwaita: new levelbar style
Philip Withnall [Fri, 4 Oct 2019 17:25:34 +0000 (18:25 +0100)]
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>
Philip Withnall [Fri, 4 Oct 2019 17:25:16 +0000 (18:25 +0100)]
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>
Christoph Reiter [Wed, 2 Oct 2019 19:35:20 +0000 (21:35 +0200)]
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
Ask Hjorth Larsen [Wed, 2 Oct 2019 03:54:14 +0000 (05:54 +0200)]
Updated Danish translation of gtk-properties
Ask Hjorth Larsen [Wed, 2 Oct 2019 03:54:12 +0000 (05:54 +0200)]
Updated Danish translation of gtk
Marek Černocký [Wed, 2 Oct 2019 00:06:13 +0000 (02:06 +0200)]
Updated Czech translation
Georges Basile Stavracas Neto [Tue, 1 Oct 2019 19:13:43 +0000 (16:13 -0300)]
wayland/surface: Fix crash when unexporting
This is the exact same problem of
655c9dd526.
Marek Černocký [Tue, 1 Oct 2019 15:32:46 +0000 (17:32 +0200)]
Updated Czech translation
Georges Basile Stavracas Neto [Tue, 1 Oct 2019 15:22:22 +0000 (15:22 +0000)]
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
Georges Basile Stavracas Neto [Tue, 1 Oct 2019 14:54:28 +0000 (11:54 -0300)]
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
Matej Urbančič [Sat, 28 Sep 2019 19:14:54 +0000 (21:14 +0200)]
Updated Slovenian translation
Piotr Drąg [Sat, 28 Sep 2019 11:59:24 +0000 (13:59 +0200)]
Update Polish translation
Aurimas Černius [Sat, 28 Sep 2019 09:51:44 +0000 (12:51 +0300)]
Updated Lithuanian translation
Matthias Clasen [Fri, 27 Sep 2019 19:24:00 +0000 (19:24 +0000)]
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
Benjamin Otte [Thu, 26 Sep 2019 10:44:30 +0000 (10:44 +0000)]
Merge branch 'wip/ricotz/mediafile' into 'master'
mediafile: Use correct return-type for factory methods
See merge request GNOME/gtk!1105
Rico Tzschichholz [Thu, 26 Sep 2019 05:34:31 +0000 (07:34 +0200)]
mediafile: Add g-i annotations for actual return-type of factory methods
Timm Bäder [Wed, 25 Sep 2019 15:10:34 +0000 (17:10 +0200)]
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
Timm Bäder [Wed, 25 Sep 2019 15:07:45 +0000 (17:07 +0200)]
snapshot: Try to avoid some linear gradient nodes
Timm Bäder [Tue, 24 Sep 2019 04:18:40 +0000 (06:18 +0200)]
searchentry: Use a box layout
Timm Bäder [Tue, 24 Sep 2019 04:18:19 +0000 (06:18 +0200)]
searchentry: Use edit-clear-all-symbolic as clear icon
Fixes #2109
Timm Bäder [Tue, 24 Sep 2019 04:13:00 +0000 (06:13 +0200)]
gl renderer: Fix rounded rect intersection
Timm Bäder [Mon, 23 Sep 2019 15:02:03 +0000 (17:02 +0200)]
fontchooserwidget: Use a bin layout
Timm Bäder [Mon, 23 Sep 2019 15:00:07 +0000 (17:00 +0200)]
colorbutton: Use a bin layout
Timm Bäder [Sun, 22 Sep 2019 08:18:06 +0000 (10:18 +0200)]
dialog: Remove useless gtk_widget_show() call
Timm Bäder [Sun, 22 Sep 2019 07:20:36 +0000 (09:20 +0200)]
filechooserbutton: Add icon to default (None) combo box item
See #2118
Timm Bäder [Sun, 22 Sep 2019 07:12:38 +0000 (09:12 +0200)]
filechooserbutton: Remove priv->child
We never use it except when updating the state flags, but we can as well
do that for both children.
Timm Bäder [Sun, 22 Sep 2019 07:07:33 +0000 (09:07 +0200)]
filechooserbutton: Remove an outdated comment
The path used is wrong but the string isn't used in the testsuite
anyway.
Timm Bäder [Sun, 22 Sep 2019 06:57:43 +0000 (08:57 +0200)]
scrolledwindow: Remove set_placement_internal()
set_placement() does the exact same thing.
Timm Bäder [Sat, 21 Sep 2019 15:37:42 +0000 (17:37 +0200)]
menubar: Use a box layout
Timm Bäder [Sat, 21 Sep 2019 12:27:43 +0000 (14:27 +0200)]
video: Use a bin layout
Timm Bäder [Sat, 21 Sep 2019 10:56:09 +0000 (12:56 +0200)]
levelbar: Use a bin layout
Matthias Clasen [Tue, 24 Sep 2019 15:38:35 +0000 (11:38 -0400)]
docs: Add GtkNative to types
This is needed to make doc generation work
for GtkNative.
Danial Behzadi [Sun, 22 Sep 2019 11:36:55 +0000 (11:36 +0000)]
Update Persian translation
Timm Bäder [Sat, 21 Sep 2019 07:41:53 +0000 (09:41 +0200)]
headerbar: Fix end-packed child order
We pack from right to left there.
Marek Kasik [Thu, 19 Sep 2019 16:35:23 +0000 (18:35 +0200)]
printing: Get PPD from original host if needed
Try to get PPD from original host if there is no PPD for remote printer
on current CUPS server.
Matthias Clasen [Mon, 16 Sep 2019 22:10:02 +0000 (22:10 +0000)]
Merge branch 'wip/kill-menu' into 'master'
Use menus less
See merge request GNOME/gtk!1098
Matthias Clasen [Sat, 14 Sep 2019 20:55:06 +0000 (16:55 -0400)]
toolbar: Use a popover for overflow
We are phasing out menus.
This is not quite complete, toolitems still
create menuitems, which we translate on the fly.
Matthias Clasen [Sat, 14 Sep 2019 19:03:22 +0000 (15:03 -0400)]
notebook: Use a popover for the tab menu
We are phasing out menus.
Matthias Clasen [Sat, 14 Sep 2019 21:14:55 +0000 (17:14 -0400)]
menutoolbutton: Add support for popovers
Just like the underlying menu button, support
popovers too.
Matthias Clasen [Fri, 13 Sep 2019 23:06:26 +0000 (19:06 -0400)]
window: Make fallback menu a popover
We want to phase out menus.
Matthias Clasen [Fri, 13 Sep 2019 21:24:37 +0000 (17:24 -0400)]
Remove unused includes
Don't include gtkmenu.h in places where
it isn't used anymore.
Matthias Clasen [Fri, 13 Sep 2019 21:25:02 +0000 (17:25 -0400)]
text util: Remove an unused function
_gtk_text_util_append_special_char_menuitems was not used.
Rico Tzschichholz [Sun, 15 Sep 2019 15:54:52 +0000 (17:54 +0200)]
gtk: Fix some g-i annotation warnings
Rico Tzschichholz [Sun, 15 Sep 2019 15:31:41 +0000 (17:31 +0200)]
gtk: Fix parameter annotations for gtk_buildable_parse_context_get_position
Rico Tzschichholz [Sun, 15 Sep 2019 15:49:34 +0000 (17:49 +0200)]
build: gtkbuilderparser.c contains g-i annotations for public API
Matthias Clasen [Sun, 15 Sep 2019 15:54:08 +0000 (15:54 +0000)]
Merge branch 'wip/rah/screensaver-active-fix' into 'master'
gtkapplication-dbus: Initialise screensaver-active property
See merge request GNOME/gtk!1091
Matthias Clasen [Sat, 14 Sep 2019 21:18:02 +0000 (21:18 +0000)]
Merge branch 'wip/chergert/fix-textview-clip' into 'master'
textview: clip to text window when drawing
See merge request GNOME/gtk!1095
Christian Hergert [Fri, 13 Sep 2019 23:26:26 +0000 (16:26 -0700)]
textview: clip to text window when drawing
When drawing the GtkTextView text, we need to clip to the visible area
so that we do not risk drawing under the border windows.
Christian Hergert [Fri, 13 Sep 2019 23:02:28 +0000 (16:02 -0700)]
textview: fix textview drawing in presence of gutters
When drawing a left or top gutter, we need to adjust the origin of the
text snapshot or we risk the gutter drawing above the text.
Timm Bäder [Fri, 13 Sep 2019 12:45:54 +0000 (14:45 +0200)]
notebook: Use a box layout
And incidentally make the CSS node docs correct again.
Timm Bäder [Fri, 13 Sep 2019 12:28:48 +0000 (14:28 +0200)]
fontbutton: Shorten clear_font_data a bit
Timm Bäder [Fri, 13 Sep 2019 09:53:24 +0000 (11:53 +0200)]
fontbutton: Use a bin layout
Timm Bäder [Fri, 13 Sep 2019 09:39:34 +0000 (11:39 +0200)]
appchooserdialog: Remove unnecessary gtk_widget_show() calls
Timm Bäder [Fri, 13 Sep 2019 08:40:26 +0000 (10:40 +0200)]
headerbar: Remove spacing property
Replace it with border-spacing in css
Timm Bäder [Fri, 13 Sep 2019 03:53:17 +0000 (05:53 +0200)]
pixbuf: Add a missing return value transfer annotation
And add a (nullable)
Timm Bäder [Wed, 11 Sep 2019 16:15:30 +0000 (18:15 +0200)]
headerbar: Use a center layout
Get rid of the custom title centering etc. and use a GtkCenterLayout.
Use a box on the start/end to manage the child widgets.
Timm Bäder [Wed, 11 Sep 2019 11:11:02 +0000 (13:11 +0200)]
Add GtkCenterLayout
And use it in GtkCenterBox, different widgets following.
Timm Bäder [Tue, 10 Sep 2019 13:28:31 +0000 (15:28 +0200)]
native: Don't compare a pointer with 0
We have NULL for that.
Timm Bäder [Tue, 10 Sep 2019 12:51:55 +0000 (14:51 +0200)]
widget: Inline build_finalize_assertions into only caller
Timm Bäder [Tue, 10 Sep 2019 12:18:20 +0000 (14:18 +0200)]
headerbar: Don't update window buttons when unrealized
It doesn't make much sense in that case and we will update them again
when realizing.
Timm Bäder [Tue, 10 Sep 2019 11:11:03 +0000 (13:11 +0200)]
Rename gtkbookmarkmanager.h to gtkbookmarksmanagerprivate.h
It's a private type, so gets a private header file name.
Timm Bäder [Tue, 10 Sep 2019 11:08:42 +0000 (13:08 +0200)]
bookmarksmanager: Stop exporting get_xdg_type
Timm Bäder [Tue, 10 Sep 2019 07:55:37 +0000 (09:55 +0200)]
switch: Stop using a private struct
Private type, no private struct needed.
Alexander Larsson [Mon, 2 Sep 2019 09:25:09 +0000 (11:25 +0200)]
GtkBuildable: Fix indentation
Alexander Larsson [Thu, 29 Aug 2019 14:19:33 +0000 (16:19 +0200)]
GtkWidget: Precompile template xml on class creation
Ideally we will precompile during build and store the result in the
resource, but if that doesn't happen at least we will only parse
the xml once.
Alexander Larsson [Thu, 29 Aug 2019 14:18:55 +0000 (16:18 +0200)]
GtkBuilder: Add support for precompiling builder xml
Alexander Larsson [Thu, 29 Aug 2019 13:21:20 +0000 (15:21 +0200)]
Use the new GtkBuildableParser type in GtkBuildable interfaces
Alexander Larsson [Mon, 26 Aug 2019 20:28:18 +0000 (23:28 +0300)]
GtkBuildableParser: Add a wrapper for GMarkupParser
This currenly just wraps GMarkupParser, but the plan is to expose this
instead of GMarkup in the GtkBuildable interfaces, allowing us to
replace the parser with something that handles pre-parsed input
instead.
Note that we duplicate some of the features of GMarkup to implement
the APIs rather then call down to GMarkup, as we need to support these
in the pre-parsed case anyway.
Matthias Clasen [Tue, 10 Sep 2019 01:42:13 +0000 (01:42 +0000)]
Merge branch 'wip/chergert/tune-linedisplay-cache' into 'master'
textview: optimize linedisplay cache based on number of visible rows
See merge request GNOME/gtk!1090
Matthias Clasen [Tue, 10 Sep 2019 01:09:31 +0000 (01:09 +0000)]
Merge branch 'nested-popover-menu' into 'master'
Nested popover menus
See merge request GNOME/gtk!1076
Piotr Drąg [Mon, 9 Sep 2019 17:13:53 +0000 (19:13 +0200)]
Update POTFILES.in
Timm Bäder [Sun, 8 Sep 2019 12:57:40 +0000 (14:57 +0200)]
icontheme: Stop using a private struct
The GtkIconTheme/GtkIconInfo structs aren't public anymore, so use the
structs directly instead of a priv pointer.
Timm Bäder [Sun, 8 Sep 2019 09:10:01 +0000 (11:10 +0200)]
Icontheme: Clean up gtk_icon_info_load_async
Timm Bäder [Sun, 8 Sep 2019 08:22:21 +0000 (10:22 +0200)]
scrolledwindow: Actually add controller to widget
Closes #2127
Timm Bäder [Sun, 8 Sep 2019 08:21:50 +0000 (10:21 +0200)]
testlist2: quit on window close
Timm Bäder [Mon, 2 Sep 2019 07:35:37 +0000 (09:35 +0200)]
icontheme: Adapt a code sample to the GdkPaintable transition
Timm Bäder [Mon, 2 Sep 2019 06:29:04 +0000 (08:29 +0200)]
pixbufutils: Escape file data only once
Timm Bäder [Mon, 2 Sep 2019 06:11:35 +0000 (08:11 +0200)]
pixbufutils: Pass colors as string to load_symbolic_svg
We were converting the same colors over and over again to a string, just
to free them again at the end of the function. We know the colors at
compile time however, so don't convert them at all.
Timm Bäder [Mon, 2 Sep 2019 05:58:20 +0000 (07:58 +0200)]
pixbufutils: Only get icon size once
load_symbolic_svg was loading the pixbuf just to get its size via
gdk_pixbuf_get_{width,height}. However, this function is called in a
loop in gtk_make_symbolic_pixbuf_from_data.
So, do this only once and pass the icon size along to load_symbolic_svg.
Timm Bäder [Sun, 1 Sep 2019 14:29:30 +0000 (16:29 +0200)]
icontheme: Remove symbolic pixbuf cache
We recolor icons on via color matrix nodes these days, so this cache is
basically unused.
Timm Bäder [Sun, 1 Sep 2019 11:25:44 +0000 (13:25 +0200)]
icontheme: Add LRU cache back
Add a cache of icon infos that we keep around a little longer, to avoid
loading icons from disk that only exist for a short amount of time (e.g.
during one frame of a cell renderer snapshot).
We make sure recently used items are kept alive by just adding them to
the cache on lookup.
Timm Bäder [Sun, 1 Sep 2019 09:25:48 +0000 (11:25 +0200)]
icontheme: Remove GtkIconInfo->pixbuf
Create textures as soon as possible.
Timm Bäder [Sun, 1 Sep 2019 08:56:29 +0000 (10:56 +0200)]
icontheme: Remove icon_info_load_pixbuf
What it does overlaps with the only caller a lot now.
Timm Bäder [Sun, 1 Sep 2019 08:20:00 +0000 (10:20 +0200)]
icontheme: Optimize suffix_from_name
We call this function a lot, so avoid repeated strlen() calls on @name
and the different suffixes.
Timm Bäder [Sun, 1 Sep 2019 08:04:32 +0000 (10:04 +0200)]
icontheme: Avoid creating useless IconThemeDirs
We were allocating IconThemeDir instances and then only later assign a
value to has_icons. In the !has_icons case, we were directly throwing
the IconThemeDir away again.
Delay allocating the IconThemeDirs until we know that it has icons.
This avoids allocating and then de-allocating around 1400 IconThemeDir
instances when opening the widget-factory.
Timm Bäder [Sun, 1 Sep 2019 07:26:16 +0000 (09:26 +0200)]
icontheme: Inline scan_resources into only caller
The previous code was hiding the fact that the scan_resources function
almost always did nothing and just used g_resources_enumerate_children()
and then returned FALSE, leaving the caller with cleaning up the already
allocated IconThemeDir. By inlining this, we make sure that calling code
does not even need to allocate the IconThemeDir.
Timm Bäder [Sun, 1 Sep 2019 06:39:05 +0000 (08:39 +0200)]
icontheme: Remove proxy pixbufs
These were only used for the LRU cache.