gtk4.git
2 years agopicture: Fix hi-dpi image handling
Matthias Clasen [Sun, 15 Jan 2023 12:59:27 +0000 (07:59 -0500)]
picture: Fix hi-dpi image handling

The idea behind this code was to let scalable
images (i.e. mainly SVGs) provide twice as much
detail when the scale is 2. But we were also
using a scaler for pngs, causing them to be too
small on a hidpi screen. Fix that.

Note that there are cases where you want scaling
for pngs (when you display them scaled down, so
the image has 'hidden' detail). But we are not
attempting to handle that situation automatically.

2 years agoUpdate Turkish translation
Emin Tufan Çetin [Sun, 15 Jan 2023 22:47:27 +0000 (22:47 +0000)]
Update Turkish translation

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sun, 15 Jan 2023 18:48:22 +0000 (18:48 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Use GtkUriLauncher where appropriate

See merge request GNOME/gtk!5432

2 years agoUse GtkUriLauncher where appropriate
Matthias Clasen [Sun, 15 Jan 2023 18:25:34 +0000 (13:25 -0500)]
Use GtkUriLauncher where appropriate

GtkLabel, GtkLinkButton and GtkAboutDialog
all have a uri, not a file, so it makes more
sense to use a GtkUriLauncher.

2 years agoMerge branch 'uri-launcher-demo' into 'main'
Matthias Clasen [Sun, 15 Jan 2023 17:47:18 +0000 (17:47 +0000)]
Merge branch 'uri-launcher-demo' into 'main'

urilauncher: Fix finish function mismatch

See merge request GNOME/gtk!5431

2 years agogtk-demo: Add a uri launcher demo
Matthias Clasen [Sun, 15 Jan 2023 16:58:43 +0000 (11:58 -0500)]
gtk-demo: Add a uri launcher demo

2 years agourilauncher: Fix finish function mismatch
Matthias Clasen [Sun, 15 Jan 2023 16:58:09 +0000 (11:58 -0500)]
urilauncher: Fix finish function mismatch

We need to call the finish function that
matches the async function.

2 years agoMerge branch 'docs-escape-xml-tag' into 'main'
Matthias Clasen [Sun, 15 Jan 2023 15:12:28 +0000 (15:12 +0000)]
Merge branch 'docs-escape-xml-tag' into 'main'

Escape GtkBuilder XML tag in comment with backtick

Closes #5312

See merge request GNOME/gtk!5429

2 years agoEscape GtkBuilder XML tag in comment with backtick
sunce [Sun, 15 Jan 2023 06:17:07 +0000 (14:17 +0800)]
Escape GtkBuilder XML tag in comment with backtick

Escape XML tags in gi-docgen oriented comment e.g. from <child> to
`<child>`, so that they don't become HTML tag on the final webpage.
This fix includes everything from commit ff46ea64 and #5312.

Fixes #5312

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sun, 15 Jan 2023 04:12:47 +0000 (04:12 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

widgetfactory: Load textures in threads

See merge request GNOME/gtk!5428

2 years agotexture: Update docs
Matthias Clasen [Sun, 15 Jan 2023 03:48:31 +0000 (22:48 -0500)]
texture: Update docs

Document that we support TIFF as well.

2 years agowidgetfactory: Load textures in threads
Matthias Clasen [Sun, 15 Jan 2023 03:38:20 +0000 (22:38 -0500)]
widgetfactory: Load textures in threads

It is useful to show how this is done, even
though the images here are not terribly large.

2 years agoMerge branch 'nielsdg/gtkwidgetactionactivatefunc-nullable-variant' into 'main'
Matthias Clasen [Sun, 15 Jan 2023 00:46:11 +0000 (00:46 +0000)]
Merge branch 'nielsdg/gtkwidgetactionactivatefunc-nullable-variant' into 'main'

Add missing nullable to GtkWidgetActionActivateFunc

See merge request GNOME/gtk!5424

2 years agoMerge branch 'uri-launcher' into 'main'
Matthias Clasen [Sat, 14 Jan 2023 22:59:01 +0000 (22:59 +0000)]
Merge branch 'uri-launcher' into 'main'

filelauncher: Plug a memory leak

See merge request GNOME/gtk!5425

2 years agodocs: Update deprecations for gtk_show_uri
Matthias Clasen [Sat, 14 Jan 2023 19:00:56 +0000 (14:00 -0500)]
docs: Update deprecations for gtk_show_uri

We have a better replacement now.

2 years agourilauncher: Add cross-references to the docs
Matthias Clasen [Sat, 14 Jan 2023 19:00:39 +0000 (14:00 -0500)]
urilauncher: Add cross-references to the docs

2 years agoAdd GtkUriLauncher
Matthias Clasen [Sat, 14 Jan 2023 17:22:51 +0000 (12:22 -0500)]
Add GtkUriLauncher

2 years agoAdd g_openuri_portal_open_uri_async
Matthias Clasen [Sat, 14 Jan 2023 17:19:18 +0000 (12:19 -0500)]
Add g_openuri_portal_open_uri_async

This avoids a roundtrip through GFile and
thus works with random uri schemes.

2 years agoopenuri: Some reshuffling
Matthias Clasen [Sat, 14 Jan 2023 17:10:26 +0000 (12:10 -0500)]
openuri: Some reshuffling

This is in preparation of adding a method
that takes a uri instead of a GFile.

2 years agofilelauncher: Plug a memory leak
Matthias Clasen [Sat, 14 Jan 2023 17:23:12 +0000 (12:23 -0500)]
filelauncher: Plug a memory leak

Oops

2 years agoAdd missing nullable to GtkWidgetActionActivateFunc
Niels De Graef [Sat, 14 Jan 2023 14:30:15 +0000 (15:30 +0100)]
Add missing nullable to GtkWidgetActionActivateFunc

The `GVariant` that is passed on to the `GtkWidgetActionActivateFunc`
can be `NULL` in case the parameter type is also `NULL`, so mark it
nullable.

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sat, 14 Jan 2023 05:30:10 +0000 (05:30 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Fix a compiler warning

See merge request GNOME/gtk!5423

2 years agoicontheme: Streamline the suffix handling code
Matthias Clasen [Sat, 14 Jan 2023 02:19:14 +0000 (21:19 -0500)]
icontheme: Streamline the suffix handling code

2 years agoicontheme: Avoid some allocations
Matthias Clasen [Sat, 14 Jan 2023 01:54:57 +0000 (20:54 -0500)]
icontheme: Avoid some allocations

When loading icon themes, we can reuse memory
instead of allocating and freeing in a loop.

2 years agoicontheme: Keep a single string set
Matthias Clasen [Sat, 14 Jan 2023 01:52:30 +0000 (20:52 -0500)]
icontheme: Keep a single string set

Instead of keeping a GtkStringSet per IconTheme,
just make one for the whole GtkIconTheme.

This avoids loops of the themes in some places, and
due to the overlap in icon names between the themes,
it reduces the amount of memory we use for the icon
names with Adwaita+hicolor from 5+4 chunks to 6 chunks.

2 years agotestsuite: Fix various compiler warnings
Matthias Clasen [Fri, 13 Jan 2023 18:15:05 +0000 (13:15 -0500)]
testsuite: Fix various compiler warnings

These are mostly dead stores that clang
isn't happy with.

2 years agoFix a compiler warning
Matthias Clasen [Fri, 13 Jan 2023 16:41:49 +0000 (11:41 -0500)]
Fix a compiler warning

Clang things that timings can be NULL here,
and I think it might be right.

2 years agoMerge branch 'wip/corey/fix-docs' into 'main'
Matthias Clasen [Sat, 14 Jan 2023 04:23:34 +0000 (04:23 +0000)]
Merge branch 'wip/corey/fix-docs' into 'main'

docs: Fix dependency names

See merge request GNOME/gtk!5422

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sat, 14 Jan 2023 00:18:50 +0000 (00:18 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Silence a compiler warning

See merge request GNOME/gtk!5421

2 years agodocs: Fix dependency names
Corey Berla [Fri, 13 Jan 2023 22:24:33 +0000 (14:24 -0800)]
docs: Fix dependency names

When gi-docgen added the "related" key, it also began checking
that the dependencies were actually dependencies otherwise they aren't
listed as dependencies.  The capitalization needs to match the
namespace.

2 years agoMerge branch 'fix-spinner-stop' into 'main'
Matthias Clasen [Fri, 13 Jan 2023 20:14:25 +0000 (20:14 +0000)]
Merge branch 'fix-spinner-stop' into 'main'

gtkcssanimatedstyle: Fix return of new_advance()

Closes #4426

See merge request GNOME/gtk!5420

2 years agogtkcssanimatedstyle: Fix return of new_advance()
Matteo Percivaldi [Fri, 13 Jan 2023 13:05:10 +0000 (14:05 +0100)]
gtkcssanimatedstyle: Fix return of new_advance()

This was causing animation and transition to stop randomly and reset
their state to initial state.

This issue has existed since commit
7b68bdb8316fc1bb96c4a5ad16c1885506131d22.

Closes #4426

2 years agoSilence compiler warnings
Matthias Clasen [Fri, 13 Jan 2023 16:46:44 +0000 (11:46 -0500)]
Silence compiler warnings

Clang complains that these are dead stores.
They are, indeed.

2 years agoFix a compiler warning
Matthias Clasen [Fri, 13 Jan 2023 16:42:20 +0000 (11:42 -0500)]
Fix a compiler warning

Clang things that load_error might be NULL here.
It may be right.

2 years agoFix a compiler warning
Matthias Clasen [Fri, 13 Jan 2023 16:41:49 +0000 (11:41 -0500)]
Fix a compiler warning

Clang things that timings can be NULL here,
and I think it might be right.

2 years agogridview: Add a few assertions
Matthias Clasen [Fri, 13 Jan 2023 16:30:13 +0000 (11:30 -0500)]
gridview: Add a few assertions

Just to help static analysis out.

self->n_columns can't ever be 0, since
we clamp it between min_columns and
max_columns, with min_columns always
being at least one.

2 years agoSilence a compiler warning
Matthias Clasen [Fri, 13 Jan 2023 16:08:41 +0000 (11:08 -0500)]
Silence a compiler warning

Clang was complaining that we never use the
value stored in mime_type. Just don't store it,
we are only interested in the side-effect
(interning the string).

2 years agoMerge branch 'faster-ci' into 'main'
Matthias Clasen [Fri, 13 Jan 2023 12:57:15 +0000 (12:57 +0000)]
Merge branch 'faster-ci' into 'main'

Add a build-testsuite option

See merge request GNOME/gtk!5419

2 years agoci: Try to speed up builds a bit
Matthias Clasen [Fri, 13 Jan 2023 12:26:41 +0000 (07:26 -0500)]
ci: Try to speed up builds a bit

Don't build demos and tests, and only build
the testsuite where we want to run it.

2 years agoUpdate the build documentation
Matthias Clasen [Fri, 13 Jan 2023 12:15:15 +0000 (07:15 -0500)]
Update the build documentation

2 years agoAdd a build-testsuite option
Matthias Clasen [Fri, 13 Jan 2023 12:14:33 +0000 (07:14 -0500)]
Add a build-testsuite option

This will let us run the testsuite in ci without
having to build all the manual tests.

2 years agoMerge branch 'macos-werror' into 'main'
Matthias Clasen [Fri, 13 Jan 2023 03:08:36 +0000 (03:08 +0000)]
Merge branch 'macos-werror' into 'main'

CI: turn on -Werror for MacOS build

See merge request GNOME/gtk!5418

2 years agoCI: turn on -Werror for MacOS build
Benjamin Otte [Wed, 3 Nov 2021 22:35:03 +0000 (23:35 +0100)]
CI: turn on -Werror for MacOS build

The build is error-free and we want to keep it that way.

We'd also like to make Timm do real work instead of having to fix clang
warnings all the time and this build is a clang build.

2 years agoMerge branch 'wip/chergert/fix-macos-warnings' into 'main'
Matthias Clasen [Fri, 13 Jan 2023 00:10:48 +0000 (00:10 +0000)]
Merge branch 'wip/chergert/fix-macos-warnings' into 'main'

Fixes a few compilation warnings on macOS

See merge request GNOME/gtk!5415

2 years agoMerge branch 'ebassi/pin-gi' into 'main'
Matthias Clasen [Thu, 12 Jan 2023 23:35:23 +0000 (23:35 +0000)]
Merge branch 'ebassi/pin-gi' into 'main'

Add gobject-introspection as a subproject

See merge request GNOME/gtk!5414

2 years agogdk/macos: fix warning about _coreCursorType
Christian Hergert [Thu, 12 Jan 2023 21:22:47 +0000 (13:22 -0800)]
gdk/macos: fix warning about _coreCursorType

2 years agogsk/gl: fix warning when join_sources() is unused
Christian Hergert [Thu, 12 Jan 2023 21:22:25 +0000 (13:22 -0800)]
gsk/gl: fix warning when join_sources() is unused

2 years agogdk: fix warning when !HAVE_EGL
Christian Hergert [Thu, 12 Jan 2023 21:22:02 +0000 (13:22 -0800)]
gdk: fix warning when !HAVE_EGL

2 years agoAdd gobject-introspection as a subproject
Emmanuele Bassi [Thu, 12 Jan 2023 17:55:47 +0000 (17:55 +0000)]
Add gobject-introspection as a subproject

We pin GLib, so we must also pin g-i to the same version, otherwise
we'll get weird mismatches during development.

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Thu, 12 Jan 2023 15:20:49 +0000 (15:20 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

css: Avoid some allocations

See merge request GNOME/gtk!5413

2 years agoiconcache: Be a bit less wasteful
Matthias Clasen [Thu, 12 Jan 2023 05:35:43 +0000 (00:35 -0500)]
iconcache: Be a bit less wasteful

2 years agocss: Avoid more allocations for tokens
Matthias Clasen [Thu, 12 Jan 2023 05:00:54 +0000 (00:00 -0500)]
css: Avoid more allocations for tokens

Make short string tokens static.

2 years agocss: Avoid some allocations
Matthias Clasen [Thu, 12 Jan 2023 04:19:30 +0000 (23:19 -0500)]
css: Avoid some allocations

Avoid duplicating the function name just
for an error message.

2 years agocss: Avoid allocation for tokens
Matthias Clasen [Thu, 12 Jan 2023 04:07:19 +0000 (23:07 -0500)]
css: Avoid allocation for tokens

All valid dimensions are short, so store
the dimension inside the token.

2 years agocss: Avoid some allocations
Matthias Clasen [Thu, 12 Jan 2023 03:02:20 +0000 (22:02 -0500)]
css: Avoid some allocations

Reuse the name_buffer for reading strings.

2 years agocss: Some inlining
Matthias Clasen [Thu, 12 Jan 2023 02:18:36 +0000 (21:18 -0500)]
css: Some inlining

2 years agoCosmetics
Matthias Clasen [Thu, 12 Jan 2023 03:53:39 +0000 (22:53 -0500)]
Cosmetics

2 years agoicontheme: Bit a bit less wasteful
Matthias Clasen [Thu, 12 Jan 2023 02:18:56 +0000 (21:18 -0500)]
icontheme: Bit a bit less wasteful

2 years agoUpdate Turkish translation
Emin Tufan Çetin [Wed, 11 Jan 2023 07:01:44 +0000 (07:01 +0000)]
Update Turkish translation

2 years agoUpdate Turkish translation
Emin Tufan Çetin [Wed, 11 Jan 2023 05:41:40 +0000 (05:41 +0000)]
Update Turkish translation

2 years agotexthistory: Avoid g_autofree
Matthias Clasen [Wed, 11 Jan 2023 03:20:57 +0000 (22:20 -0500)]
texthistory: Avoid g_autofree

msvc does not like it, unfortunately.

2 years agoMerge branch 'wip/chergert/fix-5506' into 'main'
Matthias Clasen [Wed, 11 Jan 2023 02:39:32 +0000 (02:39 +0000)]
Merge branch 'wip/chergert/fix-5506' into 'main'

istring: fix istring_prepend() on malloc transition

Closes #5506

See merge request GNOME/gtk!5411

2 years agotexthistory: add debugging helpers to print undo stack
Christian Hergert [Tue, 10 Jan 2023 21:36:16 +0000 (13:36 -0800)]
texthistory: add debugging helpers to print undo stack

This is helpful to have when tracking down issues like #5506.

2 years agoistring: fix istring_prepend() on malloc transition
Christian Hergert [Tue, 10 Jan 2023 21:32:38 +0000 (13:32 -0800)]
istring: fix istring_prepend() on malloc transition

When transitioning from internal to malloc, the strings were placed in
the wrong order to g_strconcat(). This fixes an issue with undo where
if you hit the boundary in just the right way, your undo stack will do
unexpected things.

Fixes #5506

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Tue, 10 Jan 2023 19:05:13 +0000 (19:05 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Add some more text undo tests

See merge request GNOME/gtk!5410

2 years agoUpdate Russian translation
Aleksandr Melman [Tue, 10 Jan 2023 12:57:03 +0000 (12:57 +0000)]
Update Russian translation

2 years agoAdd some more text undo tests
Matthias Clasen [Tue, 10 Jan 2023 12:34:55 +0000 (07:34 -0500)]
Add some more text undo tests

Unsuccessfully trying to reproduce #5506.

2 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Mon, 9 Jan 2023 21:15:08 +0000 (21:15 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Deprecate gdk_display_put_event

See merge request GNOME/gtk!5409

2 years agoDeprecate gdk_display_put_event
Matthias Clasen [Mon, 9 Jan 2023 20:29:24 +0000 (15:29 -0500)]
Deprecate gdk_display_put_event

The documentation already tells you not to
use this function.

Ifdef the remaining users in the X11 backend.

2 years agoMerge branch 'macos-stable-dnd' into 'main'
Matthias Clasen [Mon, 9 Jan 2023 11:52:50 +0000 (11:52 +0000)]
Merge branch 'macos-stable-dnd' into 'main'

macos: Drag and drop should not freeze applications

See merge request GNOME/gtk!5291

2 years agoMerge branch 'wip/corey/popover-accel' into 'main'
Matthias Clasen [Mon, 9 Jan 2023 10:58:14 +0000 (10:58 +0000)]
Merge branch 'wip/corey/popover-accel' into 'main'

gtkmodelbutton: Ensure that accel label is always aligned to end

Closes #5504

See merge request GNOME/gtk!5407

2 years agogtkmodelbutton: Ensure that accel label is always aligned to end
Corey Berla [Mon, 9 Jan 2023 06:32:22 +0000 (22:32 -0800)]
gtkmodelbutton: Ensure that accel label is always aligned to end

When the model button just has a text label and accel text,
the button fills and the accel label is implicitly aigned to end.
When there's also a icon, even though it's not shown (because
icons are only shown if there's no text), the button doesn't fill
and the accel ends up not aligned (assuming one of the other buttons
is longer). Ensure that the accel label is aligned to the end.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5504
2 years agoMerge branch 'a11y_check_null_path' into 'main'
Emmanuele Bassi [Mon, 9 Jan 2023 00:14:21 +0000 (00:14 +0000)]
Merge branch 'a11y_check_null_path' into 'main'

a11y: Avoid crashing if GtkAtSpiContext::path is NULL

See merge request GNOME/gtk!5405

2 years agoMerge branch 'doc-improvements' into 'main'
Emmanuele Bassi [Sun, 8 Jan 2023 22:16:49 +0000 (22:16 +0000)]
Merge branch 'doc-improvements' into 'main'

Two docs improvements

See merge request GNOME/gtk!5406

2 years agodocs: Improve gtk_window_present description
Marco Melorio [Sun, 8 Jan 2023 21:37:42 +0000 (22:37 +0100)]
docs: Improve gtk_window_present description

Move most of the documentation from gtk_window_present_with_time and
also reword it a bit to make it more understandable.

2 years agodocs: Don't mention deprecated API in gtk_widget_set_visible
Marco Melorio [Sun, 8 Jan 2023 20:49:28 +0000 (21:49 +0100)]
docs: Don't mention deprecated API in gtk_widget_set_visible

That statement is true, but since that API is deprecated, it doesn't
need to be there anymore to avoid confusing people.

2 years agoa11y: Use fallback logic when GApplication has no DBus object path
Barnabás Pőcze [Sun, 8 Jan 2023 18:51:38 +0000 (19:51 +0100)]
a11y: Use fallback logic when GApplication has no DBus object path

Use the fallback logic to generate the base path for the GtkAtSpiRoot
if the GApplication has no DBus object path to guarantee that
the base path will not stay NULL.

2 years agoa11y: Check if path is NULL when removing from cache
Barnabás Pőcze [Sun, 8 Jan 2023 18:38:54 +0000 (19:38 +0100)]
a11y: Check if path is NULL when removing from cache

`gtk_at_spi_cache_add_context()` checks if the GtkAtSpiContext's path
is NULL before inserting the context object into the hash table.
Do the same in `gtk_at_spi_cache_remove_context()` to avoid a NULL
pointer dereference in `g_str_hash()` during the hash table lookup
if a context with NULL path is removed. That can happen when the
GtkAtSpiRoot::base_path is NULL, which, in turn, can happen if
`g_application_get_dbus_object_path()` returns NULL.

  ==394047==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x7fd1966f8b84 bp 0x7fff11e3ded0 sp 0x7fff11e3de58 T0)
  ==394047==The signal is caused by a READ memory access.
  ==394047==Hint: address points to the zero page.
      #0 0x7fd1966f8b84 in g_str_hash (/usr/lib/libglib-2.0.so.0+0x37b84)
      #1 0x7fd1966f9c09 in g_hash_table_contains (/usr/lib/libglib-2.0.so.0+0x38c09)
      #2 0x7fd196062c10 in gtk_at_spi_cache_remove_context ../gtk/a11y/gtkatspicache.c:447
      #3 0x7fd19606e0a9 in gtk_at_spi_root_unregister ../gtk/a11y/gtkatspiroot.c:653
      #4 0x7fd196067f58 in gtk_at_spi_context_unrealize ../gtk/a11y/gtkatspicontext.c:1559
      #5 0x7fd195ced97f in gtk_at_context_unrealize ../gtk/gtkatcontext.c:668
      #6 0x7fd195f5576e in gtk_widget_unroot_at_context ../gtk/gtkwidget.c:2399
      #7 0x7fd195f55bd2 in gtk_widget_unroot ../gtk/gtkwidget.c:2499
      ...

2 years agoFix code style
Matthias Clasen [Sun, 8 Jan 2023 14:41:11 +0000 (14:41 +0000)]
Fix code style

2 years agogdk: Update docs
Matthias Clasen [Sun, 8 Jan 2023 02:35:29 +0000 (21:35 -0500)]
gdk: Update docs

Update the docs for gdk_display_get_monitor_at_surface.

2 years agoMerge branch 'gdk-display-get-monitor-is-nullable' into 'main'
Matthias Clasen [Sat, 7 Jan 2023 20:39:04 +0000 (20:39 +0000)]
Merge branch 'gdk-display-get-monitor-is-nullable' into 'main'

gdkdisplay: Document get_monitor_at_surface can return NULL

Closes #5075

See merge request GNOME/gtk!4917

2 years agoMerge branch 'more-filesystemmodel-cleanups' into 'main'
Matthias Clasen [Sat, 7 Jan 2023 18:42:14 +0000 (18:42 +0000)]
Merge branch 'more-filesystemmodel-cleanups' into 'main'

filesystemmodel: Crop tree model cruft

See merge request GNOME/gtk!5402

2 years agoMerge branch 'win-file-ext' into 'main'
Matthias Clasen [Sat, 7 Jan 2023 18:14:37 +0000 (18:14 +0000)]
Merge branch 'win-file-ext' into 'main'

filechoosernativewin32: Set default extension

See merge request GNOME/gtk!5266

2 years agofilechoosernativewin32: Set default extension
robxnano [Sat, 7 Jan 2023 18:14:36 +0000 (18:14 +0000)]
filechoosernativewin32: Set default extension

2 years agofilesystemmodel: Drop tree model cruft
Matthias Clasen [Sat, 7 Jan 2023 17:19:13 +0000 (12:19 -0500)]
filesystemmodel: Drop tree model cruft

We no longer need the placeholder item for the
editable, so drop it.

2 years agofilesystemmodel: Rename private header
Matthias Clasen [Sat, 7 Jan 2023 17:01:15 +0000 (12:01 -0500)]
filesystemmodel: Rename private header

2 years agoMerge branch 'filesystemmodel-cleanups' into 'main'
Matthias Clasen [Sat, 7 Jan 2023 14:36:20 +0000 (14:36 +0000)]
Merge branch 'filesystemmodel-cleanups' into 'main'

filesystemmodel: Cleanup unused defines

See merge request GNOME/gtk!5401

2 years agogtkfilesystemmodel: Use g_clear_* helpers
Georges Basile Stavracas Neto [Sat, 7 Jan 2023 14:10:54 +0000 (09:10 -0500)]
gtkfilesystemmodel: Use g_clear_* helpers

Saves some code.

2 years agofilesystemmodel: Use G_DECLARE_FINAL_TYPE()
Georges Basile Stavracas Neto [Sat, 7 Jan 2023 14:08:25 +0000 (09:08 -0500)]
filesystemmodel: Use G_DECLARE_FINAL_TYPE()

Clean up boilerplate. It's a private object anyway.

2 years agofilesystemmodel: Cosmetics
Georges Basile Stavracas Neto [Sat, 7 Jan 2023 14:01:29 +0000 (09:01 -0500)]
filesystemmodel: Cosmetics

Adjust code style, and shuffle some functions around. Remove
unhelpful doc comments.

2 years agofilesystemmodel: Use g_set_object
Matthias Clasen [Sat, 7 Jan 2023 13:45:35 +0000 (08:45 -0500)]
filesystemmodel: Use g_set_object

2 years agofilesystemmodel: Make function private to gtkfilesystemmodel.c
Georges Basile Stavracas Neto [Sat, 17 Dec 2022 12:30:12 +0000 (09:30 -0300)]
filesystemmodel: Make function private to gtkfilesystemmodel.c

The _gtk_file_system_model_update_file() function is not used outside
GtkFileSystemModel, so no need to expose it in the header.

Shuffle it around in code, and remove it from the header.

2 years agofilesystemmodel: Cleanup unused defines
Georges Basile Stavracas Neto [Sat, 17 Dec 2022 12:24:08 +0000 (09:24 -0300)]
filesystemmodel: Cleanup unused defines

They were made unused with the removal of GtkTreeModel interface
implementation.

2 years agoMerge branch 'werror-fixes' into 'main'
Matthias Clasen [Sat, 7 Jan 2023 13:22:20 +0000 (13:22 +0000)]
Merge branch 'werror-fixes' into 'main'

gtk-launch: Remove compile-time warning

See merge request GNOME/gtk!5400

2 years agoMerge branch 'wip/corey/calendar' into 'main'
Matthias Clasen [Sat, 7 Jan 2023 13:11:01 +0000 (13:11 +0000)]
Merge branch 'wip/corey/calendar' into 'main'

calendar: Fix marked days

See merge request GNOME/gtk!5399

2 years agocalendar: Set marked days immediately
Corey Berla [Sat, 7 Jan 2023 04:18:53 +0000 (20:18 -0800)]
calendar: Set marked days immediately

The marked days are set only as part of gtk_calendar_select_day().
This is insufficient, especially because the day-selected signal
is emitted after the marked days are set in gtk_calendar_select_day().

2 years agocalendar: Only apply the marked_day to the current month
Corey Berla [Sat, 7 Jan 2023 04:12:10 +0000 (20:12 -0800)]
calendar: Only apply the marked_day to the current month

The marked day gets applied to the current month, and either the previous
or subsequent month if they are visible within the current month.
This doesn't make any sense and likely was an accidental regression
in a6f9052cf1c1c7b4224834ed18a63e70477d8729.  Clarify the docs.

2 years agocalendar: Add css style for marked days
Corey Berla [Sat, 7 Jan 2023 04:14:15 +0000 (20:14 -0800)]
calendar: Add css style for marked days

As part of a6f9052cf1c1c7b4224834ed18a63e70477d8729, marked days lost
their style, essentially making that function worthless.  Previously,
they were simply bolded, but that doesn't give them proper justice.

2 years agoMerge branch 'wip/phako/fix-activate-action-annotation' into 'main'
Matthias Clasen [Sat, 7 Jan 2023 01:06:00 +0000 (01:06 +0000)]
Merge branch 'wip/phako/fix-activate-action-annotation' into 'main'

widget: Mark format as nullable in activate_action

See merge request GNOME/gtk!4653

2 years agoMerge branch 'main' into 'main'
Matthias Clasen [Sat, 7 Jan 2023 00:59:32 +0000 (00:59 +0000)]
Merge branch 'main' into 'main'

Fix a typo

See merge request GNOME/gtk!5170