Commit Graph

74445 Commits

Author SHA1 Message Date
Matthias Clasen
40d54ad3eb window: Deprecate the ::keys-changed signal 2022-12-09 13:14:27 -05:00
Matthias Clasen
a9b387b37b tests: Silence a compiler warning 2022-12-09 13:13:24 -05:00
Matthias Clasen
12f9883599 treeview: Drop a few unused variables
Compilers get pickier every year...
2022-12-09 13:12:47 -05:00
Matthias Clasen
4e23fe896e composetable: Drop an unused variable 2022-12-09 13:09:34 -05:00
Olga Smirnova
0effe1fd07 Add Interlingue translation 2022-12-09 17:24:41 +00:00
Matthias Clasen
a07bf1a047 Merge branch 'dialog-fixes' into 'main'
filechooserwidget: Fixes

See merge request GNOME/gtk!5311
2022-12-09 16:22:00 +00:00
Matthias Clasen
42cd230d44 openuriportal: Better error handling
Nested async calls are always a challenge.

Hopefully, things are straightened out now,
and we report GTK_DIALOG_ERROR errors for
the cases we care about.
2022-12-09 11:05:48 -05:00
Matthias Clasen
bc8e19fcd0 openuriportal: Add a check function
Add private API to check whether the portal
is available.
2022-12-09 11:05:48 -05:00
Matthias Clasen
ae29fee903 openuriportal: Support OpenDirectory
This required an extra argument. Update all callers.
2022-12-09 11:05:48 -05:00
Matthias Clasen
7ad0bae12f openuriportal: Cosmetics
There were some copy-paste errors.
2022-12-09 11:05:48 -05:00
Matthias Clasen
3e11ea9ddf fontdialog: Improve docs
Be more specific about possible errors.
2022-12-09 11:05:48 -05:00
Matthias Clasen
5b6c98d589 colordialog: Improve the docs
Be more specific about possible errors.
2022-12-09 11:05:48 -05:00
Matthias Clasen
57082e2e40 fontdialog: Don't forget to propagate errors
Oops.
2022-12-09 11:05:48 -05:00
Matthias Clasen
45e3e1594f fontdialogbutton: Survive window closing
If the parent window of the button gets destroyed
while the dialog is open, we cancel the async op,
but we need to be a little more careful about not
stepping on glass.
2022-12-09 11:05:48 -05:00
Matthias Clasen
637ef84d04 colordialogbutton: Survive window closing
If the parent window of the button gets destroyed
while the dialog is open, we cancel the async op,
but we need to be a little more careful about not
stepping on glass.
2022-12-09 11:05:48 -05:00
Matthias Clasen
b297baed32 fontdialog: Unset check cancellable 2022-12-09 11:05:48 -05:00
Matthias Clasen
c45f172e79 colordialog: Unset check cancellable 2022-12-09 11:05:48 -05:00
Matthias Clasen
417382375b filedialog: Report cancellation propertly
Unless we prevent it, GTask will always report
cancellation as G_IO_ERROR_CANCELLED. But we
want GTK_DIALOG_ERROR_ABORTED for this case.
2022-12-09 11:05:48 -05:00
Matthias Clasen
2e90a752eb filechooserwidget: Fixes
Fix a memory leak in the file manager launch path.
2022-12-09 11:05:48 -05:00
Matthias Clasen
abe5181b10 Merge branch 'wip/corey/column-view-header' into 'main'
columnviewtitle: Prevent header clicks from propagating

Closes #5425

See merge request GNOME/gtk!5306
2022-12-09 15:28:58 +00:00
Matthias Clasen
585b6a3637 Merge branch 'matthiasc/node-editor-srcdir' into 'main'
node-editor: Redo saving location

Closes #5403

See merge request GNOME/gtk!5310
2022-12-09 15:22:00 +00:00
Matthias Clasen
3007b0fd7f Remove leftover debug spew 2022-12-09 10:04:42 -05:00
Matthias Clasen
96b9ac84f8 node-editor: Redo saving location
Determine the location to save testcases in dynamically,
trying first a GTK_SOURCE_DIR environment variable
and then the current directory as the GTK source dir,
ultimatively falling back to just saving in the current
directory.

This avoids leaking details of the build environment
into the produced artifacts and should make GTK builds
more reproducible.

Fixes: #5403
2022-12-09 09:35:32 -05:00
Matthias Clasen
860c2f8ddd Merge branch 'fix-file-dialog-title' into 'main'
filedialog: Use title if set

Closes #5415

See merge request GNOME/gtk!5308
2022-12-08 13:16:55 +00:00
Matthias Clasen
de83d57e14 filedialog: Use title if set
This broken when the code was reshuffled into
the switch.

Fixes: #5415
2022-12-08 07:57:16 -05:00
Matthias Clasen
9de963e8b4 Merge branch 'wip/carlosg/stale-timeout' into 'main'
gdk/x11: Clear all data in GdkSurfaceX11 finalization

See merge request GNOME/gtk!5303
2022-12-08 12:18:37 +00:00
Matthias Clasen
5e92c26b9a Merge branch 'macos-unused-vars' into 'main'
macos: remove unused variables from macos code

See merge request GNOME/gtk!5290
2022-12-08 12:17:13 +00:00
Matthias Clasen
8c7b9c30de Merge branch 'ccook/spelling-changes' into 'main'
Various spelling mistakes across a few domains that show up in documentation.

See merge request GNOME/gtk!5292
2022-12-08 12:16:22 +00:00
Cam Cook
6bfb35f047 Various spelling mistakes across a few domains that show up in documentation. 2022-12-08 12:16:22 +00:00
Matthias Clasen
53c3cce5e4 Merge branch 'emoji-recent-empty' into 'main'
emojichooser: Actually disable the recent section

See merge request GNOME/gtk!5305
2022-12-08 12:09:26 +00:00
Luca Bacci
acd7d739f5 GdkWin32: Fix resizes with native decorations
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5142
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5088
Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/5090
2022-12-08 11:41:05 +01:00
Corey Berla
33e7774743 columnviewtitle: Prevent header clicks from propagating
The header in GtkColumnView has multiple event handlers
there is a ::pressed handler in GtkColumnView for
resizing the columns in CAPTURE as well as a motion
and drag controller.  The ::release handler is in
GtkColumnViewTitle.   We can't claim the event in the
existing handlers because then the ::release handler will
never get called.  Currently, however, all clicks get propagated
to the ColumnView from the header which can be problematic.
Since we don't usually want the clicks from the header
handled on the view, claim it in the BUBBLE phase.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5425
2022-12-07 10:25:09 -10:00
Guido Günther
89c816a614 emojichooser: Actually disable the recent section
The loop sets empty = FALSE when there are emojis but for that
to work we need to initialize the value to TRUE initially.

Fixes: 7928532bc5
2022-12-07 19:33:59 +01:00
Carlos Garnacho
c24358cfbc gdk/x11: Clear all data in GdkSurfaceX11 finalization
Currently, the GdkSurfaceX11 implementation relies that the upper
layers hid the surface before destruction, and that no
GdkSurfaceClass.compute_resize happened between them. If these
circumstances happened, there would be a compute_size timeout left
dangling after the surface got destroyed, poking at incorrect data
later on. Something that looks like this was reported in the
recent mutter-x11-frames "SSD frames server":

    mutter-x11-frames:423016): GLib-GObject-WARNING **: 19:41:16.869: invalid unclassed pointer in cast to 'GtkWindow'

    Thread 1 "mutter-x11-fram" received signal SIGTRAP, Trace/breakpoint trap.
    g_logv (log_domain=0x7ffff7f7c4f8 "GLib-GObject", log_level=G_LOG_LEVEL_WARNING, format=<optimized out>, args=<optimized out>) at ../../../glib/gmessages.c:1433
    1433	../../../glib/gmessages.c: No such file or directory.
    (gdb) bt
    #0  g_logv (log_domain=0x7ffff7f7c4f8 "GLib-GObject", log_level=G_LOG_LEVEL_WARNING, format=<optimized out>, args=<optimized out>) at ../../../glib/gmessages.c:1433
    #1  0x00007ffff73470ff in g_log (log_domain=log_domain@entry=0x7ffff7f7c4f8 "GLib-GObject", log_level=log_level@entry=G_LOG_LEVEL_WARNING, format=format@entry=0x7ffff7f84da8 "invalid unclassed pointer in cast to '%s'")
        at ../../../glib/gmessages.c:1471
    #2  0x00007ffff7f72892 in g_type_check_instance_cast (type_instance=type_instance@entry=0x5555558e04b0, iface_type=<optimized out>) at ../../../gobject/gtype.c:4144
    #3  0x00007ffff791e77d in toplevel_compute_size (toplevel=<optimized out>, size=0x7fffffffe170, widget=0x5555558e04b0) at ../../../gtk/gtkwindow.c:4227
    #4  0x00007ffff7f4f3b0 in g_closure_invoke (closure=0x555555898cc0, return_value=return_value@entry=0x0, n_param_values=2, param_values=param_values@entry=0x7fffffffdeb0, invocation_hint=invocation_hint@entry=0x7fffffffde30)
        at ../../../gobject/gclosure.c:832
    #5  0x00007ffff7f62076 in signal_emit_unlocked_R
        (node=node@entry=0x55555588feb0, detail=detail@entry=0, instance=instance@entry=0x55555560e990, emission_return=emission_return@entry=0x0, instance_and_params=instance_and_params@entry=0x7fffffffdeb0)
        at ../../../gobject/gsignal.c:3796
    #6  0x00007ffff7f68bf5 in g_signal_emit_valist (instance=<optimized out>, signal_id=<optimized out>, detail=<optimized out>, var_args=var_args@entry=0x7fffffffe050) at ../../../gobject/gsignal.c:3549
    #7  0x00007ffff7f68dbf in <emit signal ??? on instance 0x55555560e990 [GdkX11Toplevel]> (instance=<optimized out>, signal_id=<optimized out>, detail=detail@entry=0) at ../../../gobject/gsignal.c:3606
    #8  0x00007ffff7a8de96 in gdk_toplevel_notify_compute_size (toplevel=<optimized out>, size=size@entry=0x7fffffffe170) at ../../../gdk/gdktoplevel.c:112
    #9  0x00007ffff7a4b15a in compute_toplevel_size (surface=surface@entry=0x55555560e990 [GdkX11Toplevel], update_geometry=update_geometry@entry=1, width=width@entry=0x7fffffffe220, height=height@entry=0x7fffffffe224)
        at ../../../gdk/x11/gdksurface-x11.c:281
    #10 0x00007ffff7a4c3b2 in compute_size_idle (user_data=0x55555560e990) at ../../../gdk/x11/gdksurface-x11.c:356
    #11 0x00007ffff733f67f in g_main_dispatch (context=0x55555563f6e0) at ../../../glib/gmain.c:3444
    #12 g_main_context_dispatch (context=context@entry=0x55555563f6e0) at ../../../glib/gmain.c:4162
    #13 0x00007ffff733fa38 in g_main_context_iterate (context=0x55555563f6e0, block=block@entry=1, dispatch=dispatch@entry=1, self=<optimized out>) at ../../../glib/gmain.c:4238
    #14 0x00007ffff733fcef in g_main_loop_run (loop=loop@entry=0x5555560874a0) at ../../../glib/gmain.c:4438
    #15 0x0000555555557de0 in main (argc=<optimized out>, argv=<optimized out>) at ../src/frames/main.c:68

It perhaps makes sense to warn in these situations, but either way
it sounds like gdk_surface_x11_finalize() could enforce the correct
behavior by ensuring there is no dangling timeouts/data. This commit
does that.
2022-12-07 13:16:36 +01:00
Arjan Molenaar
097d87e502 Cleanup: remove unused variables from macos code
Remove unused variables. In case if Cairo code it would
allocate memory, which would result in a memory leak.
2022-12-04 12:50:20 +01:00
Benjamin Otte
a9c9678e1f Merge branch 'workaround-glx-issue' into 'main'
GLX: Add extra glXMakeContextCurrent () call to work around a DRI issue

Closes #4499, #5387, and #5170

See merge request GNOME/gtk!5285
2022-12-02 15:32:22 +00:00
Luca Bacci
f788e994a9 GLX: Add extra glXMakeContextCurrent () call to work around a DRI issue
Reference: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7808

Fixes #4499, #5387, #5170
2022-12-02 14:20:43 +01:00
Benjamin Otte
c977f5cbb0 Merge branch 'wip/corey/tree-expander-bug' into 'main'
Improve treeexpanders

See merge request GNOME/gtk!5282
2022-11-30 19:06:12 +00:00
Corey Berla
c541de3e05 list: Remove active state handling in listitemwidget and treeexpander
Active state is handled by main now.  It appears that listitem and
treeexpander handled it manually (probably before main did).  This
is unnecessary now, so let's remove it.
2022-11-30 10:48:14 -08:00
Corey Berla
fdfd76774e treeexpander: Scroll to expanded item
If the anchor is below the expanded item, the expanded item will
go out of view if there are sufficient children items.  This is not
ideal, so make sure to scroll to the item to ensure it remains in
view.
2022-11-30 09:43:20 -08:00
Corey Berla
7eac27e5ee listitemwidget: Add listitem.scroll-to action
This is the matching action for list.scroll-to-item
2022-11-30 09:43:20 -08:00
Corey Berla
847b3261fc treeexpander: Toggle expand on release instead of pressed
With the introduction of the hide-expander property, I noticed that
the active state would persist in many cases because the release
signal was never emitted.  In gtk3 tree expanders, expanded
on release.  gtk4 expanded on press to match window explorer.
Per irc chat, the designers didn't have a strong preference
for press or release.  In order to keep consistency and
fix this bug, let's move back to release.
2022-11-30 09:41:18 -08:00
Corey Berla
63a655e345 treeexpander: Fix typo and GestureClick type
"canceled" should be "cancelled".  Also, "cancel" is a signal on
GtkGesture.
2022-11-29 20:52:46 -08:00
Emmanuele Bassi
75454adbe2 Merge branch 'ebassi/for-main' into 'main'
docs: Fix property cross-links in GtkTreeExpander

See merge request GNOME/gtk!5279
2022-11-29 14:08:13 +00:00
Emmanuele Bassi
9bce5f0462 docs: Fix property cross-links in GtkTreeExpander 2022-11-29 13:49:35 +00:00
Matthias Clasen
d2158e825b Merge branch 'matthiasc/for-main' into 'main'
testsuite: Skip tests that miss charset support

See merge request GNOME/gtk!5277
2022-11-29 12:09:33 +00:00
Matthias Clasen
36a4bb0341 Merge branch 'ccook/spelling-fixes' into 'main'
docfix: Various spelling errors that show up in docs

See merge request GNOME/gtk!5272
2022-11-29 08:57:48 +00:00
Matthias Clasen
be324cc665 testsuite: Skip tests that miss charset support
This came up when running the tests in a fresh
toolbox missing the glibc-gconv-extra package.
2022-11-29 03:52:27 -05:00
Matthias Clasen
d9f4bd5490 Merge branch 'wip/corey/at-spi-context' into 'main'
atspicontext: Cache empty atspi bus address

See merge request GNOME/gtk!5276
2022-11-29 07:51:23 +00:00
Matthias Clasen
23a3bf7a3c Merge branch 'show-hide-cleanup' into 'main'
gtk: Stop using gtk_widget_show/hide

See merge request GNOME/gtk!5273
2022-11-29 07:30:04 +00:00