gtk4.git
3 years agoMerge branch 'ebassi/image-dispose' into 'main'
Matthias Clasen [Sun, 11 Dec 2022 04:02:49 +0000 (04:02 +0000)]
Merge branch 'ebassi/image-dispose' into 'main'

Do not change the notification queue inside finalization

Closes #5420

See merge request GNOME/gtk!5321

3 years agoMerge branch 'builder-scope-note' into 'main'
Matthias Clasen [Sun, 11 Dec 2022 01:07:21 +0000 (01:07 +0000)]
Merge branch 'builder-scope-note' into 'main'

builderscope: Add a note for implementors

See merge request GNOME/gtk!5317

3 years agoDo not change the notification queue inside finalization
Emmanuele Bassi [Sun, 11 Dec 2022 00:36:03 +0000 (00:36 +0000)]
Do not change the notification queue inside finalization

Notifications are not going to be emitted during the finalization, and
GObject will warn if you try to acquire and release a reference to the
notification queue when the reference count of an object has reached
zero.

Fixes: #5420
3 years agobuilderscope: Add a note for implementors
Matthias Clasen [Sat, 10 Dec 2022 21:02:07 +0000 (16:02 -0500)]
builderscope: Add a note for implementors

Recommend that scope implementations should fall
back to or derive from GtkBuilderCScope in order
to not lose GTK's type-guessing machinery.

Related: #5398

3 years agoMerge branch 'docs/deprecated-G_APPLICATION_FLAGS_NONE' into 'main'
Matthias Clasen [Sat, 10 Dec 2022 20:53:09 +0000 (20:53 +0000)]
Merge branch 'docs/deprecated-G_APPLICATION_FLAGS_NONE' into 'main'

docs: Update deprecated G_APPLICATION_FLAGS_NONE in examples

See merge request GNOME/gtk!5315

3 years agodocs: Update deprecated G_APPLICATION_FLAGS_NONE
andy5995 [Sat, 10 Dec 2022 07:12:13 +0000 (01:12 -0600)]
docs: Update deprecated G_APPLICATION_FLAGS_NONE

3 years agoMerge branch 'deprecate-keys-changed' into 'main'
Matthias Clasen [Fri, 9 Dec 2022 19:03:01 +0000 (19:03 +0000)]
Merge branch 'deprecate-keys-changed' into 'main'

treeview: Drop a few unused variables

See merge request GNOME/gtk!5314

3 years agowindow: Deprecate the ::keys-changed signal
Matthias Clasen [Fri, 9 Dec 2022 18:14:06 +0000 (13:14 -0500)]
window: Deprecate the ::keys-changed signal

3 years agotests: Silence a compiler warning
Matthias Clasen [Fri, 9 Dec 2022 18:13:24 +0000 (13:13 -0500)]
tests: Silence a compiler warning

3 years agotreeview: Drop a few unused variables
Matthias Clasen [Fri, 9 Dec 2022 18:12:47 +0000 (13:12 -0500)]
treeview: Drop a few unused variables

Compilers get pickier every year...

3 years agocomposetable: Drop an unused variable
Matthias Clasen [Fri, 9 Dec 2022 18:09:34 +0000 (13:09 -0500)]
composetable: Drop an unused variable

3 years agoAdd Interlingue translation
Olga Smirnova [Fri, 9 Dec 2022 17:24:41 +0000 (17:24 +0000)]
Add Interlingue translation

3 years agoMerge branch 'dialog-fixes' into 'main'
Matthias Clasen [Fri, 9 Dec 2022 16:22:00 +0000 (16:22 +0000)]
Merge branch 'dialog-fixes' into 'main'

filechooserwidget: Fixes

See merge request GNOME/gtk!5311

3 years agoopenuriportal: Better error handling
Matthias Clasen [Tue, 29 Nov 2022 23:45:22 +0000 (18:45 -0500)]
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.

3 years agoopenuriportal: Add a check function
Matthias Clasen [Tue, 29 Nov 2022 18:03:34 +0000 (13:03 -0500)]
openuriportal: Add a check function

Add private API to check whether the portal
is available.

3 years agoopenuriportal: Support OpenDirectory
Matthias Clasen [Tue, 29 Nov 2022 15:51:55 +0000 (10:51 -0500)]
openuriportal: Support OpenDirectory

This required an extra argument. Update all callers.

3 years agoopenuriportal: Cosmetics
Matthias Clasen [Tue, 29 Nov 2022 18:04:10 +0000 (13:04 -0500)]
openuriportal: Cosmetics

There were some copy-paste errors.

3 years agofontdialog: Improve docs
Matthias Clasen [Wed, 30 Nov 2022 00:59:05 +0000 (19:59 -0500)]
fontdialog: Improve docs

Be more specific about possible errors.

3 years agocolordialog: Improve the docs
Matthias Clasen [Wed, 30 Nov 2022 00:58:44 +0000 (19:58 -0500)]
colordialog: Improve the docs

Be more specific about possible errors.

3 years agofontdialog: Don't forget to propagate errors
Matthias Clasen [Wed, 30 Nov 2022 00:41:06 +0000 (19:41 -0500)]
fontdialog: Don't forget to propagate errors

Oops.

3 years agofontdialogbutton: Survive window closing
Matthias Clasen [Wed, 30 Nov 2022 00:27:02 +0000 (19:27 -0500)]
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.

3 years agocolordialogbutton: Survive window closing
Matthias Clasen [Wed, 30 Nov 2022 00:25:54 +0000 (19:25 -0500)]
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.

3 years agofontdialog: Unset check cancellable
Matthias Clasen [Wed, 30 Nov 2022 00:25:40 +0000 (19:25 -0500)]
fontdialog: Unset check cancellable

3 years agocolordialog: Unset check cancellable
Matthias Clasen [Wed, 30 Nov 2022 00:25:12 +0000 (19:25 -0500)]
colordialog: Unset check cancellable

3 years agofiledialog: Report cancellation propertly
Matthias Clasen [Tue, 29 Nov 2022 23:59:23 +0000 (18:59 -0500)]
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.

3 years agofilechooserwidget: Fixes
Matthias Clasen [Tue, 29 Nov 2022 18:30:00 +0000 (13:30 -0500)]
filechooserwidget: Fixes

Fix a memory leak in the file manager launch path.

3 years agoMerge branch 'wip/corey/column-view-header' into 'main'
Matthias Clasen [Fri, 9 Dec 2022 15:28:58 +0000 (15:28 +0000)]
Merge branch 'wip/corey/column-view-header' into 'main'

columnviewtitle: Prevent header clicks from propagating

Closes #5425

See merge request GNOME/gtk!5306

3 years agoMerge branch 'matthiasc/node-editor-srcdir' into 'main'
Matthias Clasen [Fri, 9 Dec 2022 15:22:00 +0000 (15:22 +0000)]
Merge branch 'matthiasc/node-editor-srcdir' into 'main'

node-editor: Redo saving location

Closes #5403

See merge request GNOME/gtk!5310

3 years agoRemove leftover debug spew
Matthias Clasen [Fri, 9 Dec 2022 15:04:42 +0000 (10:04 -0500)]
Remove leftover debug spew

3 years agonode-editor: Redo saving location
Matthias Clasen [Tue, 6 Dec 2022 11:13:59 +0000 (11:13 +0000)]
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
3 years agoMerge branch 'fix-file-dialog-title' into 'main'
Matthias Clasen [Thu, 8 Dec 2022 13:16:55 +0000 (13:16 +0000)]
Merge branch 'fix-file-dialog-title' into 'main'

filedialog: Use title if set

Closes #5415

See merge request GNOME/gtk!5308

3 years agofiledialog: Use title if set
Matthias Clasen [Thu, 8 Dec 2022 12:57:16 +0000 (07:57 -0500)]
filedialog: Use title if set

This broken when the code was reshuffled into
the switch.

Fixes: #5415
3 years agoMerge branch 'wip/carlosg/stale-timeout' into 'main'
Matthias Clasen [Thu, 8 Dec 2022 12:18:37 +0000 (12:18 +0000)]
Merge branch 'wip/carlosg/stale-timeout' into 'main'

gdk/x11: Clear all data in GdkSurfaceX11 finalization

See merge request GNOME/gtk!5303

3 years agoMerge branch 'macos-unused-vars' into 'main'
Matthias Clasen [Thu, 8 Dec 2022 12:17:13 +0000 (12:17 +0000)]
Merge branch 'macos-unused-vars' into 'main'

macos: remove unused variables from macos code

See merge request GNOME/gtk!5290

3 years agoMerge branch 'ccook/spelling-changes' into 'main'
Matthias Clasen [Thu, 8 Dec 2022 12:16:22 +0000 (12:16 +0000)]
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

3 years agoVarious spelling mistakes across a few domains that show up in documentation.
Cam Cook [Thu, 8 Dec 2022 12:16:22 +0000 (12:16 +0000)]
Various spelling mistakes across a few domains that show up in documentation.

3 years agoMerge branch 'emoji-recent-empty' into 'main'
Matthias Clasen [Thu, 8 Dec 2022 12:09:26 +0000 (12:09 +0000)]
Merge branch 'emoji-recent-empty' into 'main'

emojichooser: Actually disable the recent section

See merge request GNOME/gtk!5305

3 years agocolumnviewtitle: Prevent header clicks from propagating
Corey Berla [Wed, 7 Dec 2022 20:25:09 +0000 (10:25 -1000)]
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
3 years agoemojichooser: Actually disable the recent section
Guido Günther [Wed, 7 Dec 2022 18:26:29 +0000 (19:26 +0100)]
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: 7928532bc5c33b2c6a10bae138ebc6dca1843cb0
3 years agogdk/x11: Clear all data in GdkSurfaceX11 finalization
Carlos Garnacho [Wed, 7 Dec 2022 12:16:36 +0000 (13:16 +0100)]
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.

3 years agoCleanup: remove unused variables from macos code
Arjan Molenaar [Sat, 12 Nov 2022 19:38:29 +0000 (20:38 +0100)]
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.

3 years agoMerge branch 'workaround-glx-issue' into 'main'
Benjamin Otte [Fri, 2 Dec 2022 15:32:22 +0000 (15:32 +0000)]
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

3 years agoGLX: Add extra glXMakeContextCurrent () call to work around a DRI issue
Luca Bacci [Thu, 1 Dec 2022 17:18:23 +0000 (18:18 +0100)]
GLX: Add extra glXMakeContextCurrent () call to work around a DRI issue

Reference: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7808

Fixes #4499, #5387, #5170

3 years agoMerge branch 'wip/corey/tree-expander-bug' into 'main'
Benjamin Otte [Wed, 30 Nov 2022 19:06:12 +0000 (19:06 +0000)]
Merge branch 'wip/corey/tree-expander-bug' into 'main'

Improve treeexpanders

See merge request GNOME/gtk!5282

3 years agolist: Remove active state handling in listitemwidget and treeexpander
Corey Berla [Wed, 30 Nov 2022 18:48:14 +0000 (10:48 -0800)]
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.

3 years agotreeexpander: Scroll to expanded item
Corey Berla [Wed, 30 Nov 2022 04:00:48 +0000 (20:00 -0800)]
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.

3 years agolistitemwidget: Add listitem.scroll-to action
Corey Berla [Wed, 30 Nov 2022 03:58:25 +0000 (19:58 -0800)]
listitemwidget: Add listitem.scroll-to action

This is the matching action for list.scroll-to-item

3 years agotreeexpander: Toggle expand on release instead of pressed
Corey Berla [Tue, 29 Nov 2022 22:58:29 +0000 (14:58 -0800)]
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.

3 years agotreeexpander: Fix typo and GestureClick type
Corey Berla [Tue, 29 Nov 2022 22:57:19 +0000 (14:57 -0800)]
treeexpander: Fix typo and GestureClick type

"canceled" should be "cancelled".  Also, "cancel" is a signal on
GtkGesture.

3 years agoMerge branch 'ebassi/for-main' into 'main'
Emmanuele Bassi [Tue, 29 Nov 2022 14:08:13 +0000 (14:08 +0000)]
Merge branch 'ebassi/for-main' into 'main'

docs: Fix property cross-links in GtkTreeExpander

See merge request GNOME/gtk!5279

3 years agodocs: Fix property cross-links in GtkTreeExpander
Emmanuele Bassi [Tue, 29 Nov 2022 13:49:35 +0000 (13:49 +0000)]
docs: Fix property cross-links in GtkTreeExpander

3 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Tue, 29 Nov 2022 12:09:33 +0000 (12:09 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

testsuite: Skip tests that miss charset support

See merge request GNOME/gtk!5277

3 years agoMerge branch 'ccook/spelling-fixes' into 'main'
Matthias Clasen [Tue, 29 Nov 2022 08:57:48 +0000 (08:57 +0000)]
Merge branch 'ccook/spelling-fixes' into 'main'

docfix: Various spelling errors that show up in docs

See merge request GNOME/gtk!5272

3 years agotestsuite: Skip tests that miss charset support
Matthias Clasen [Tue, 29 Nov 2022 08:52:27 +0000 (03:52 -0500)]
testsuite: Skip tests that miss charset support

This came up when running the tests in a fresh
toolbox missing the glibc-gconv-extra package.

3 years agoMerge branch 'wip/corey/at-spi-context' into 'main'
Matthias Clasen [Tue, 29 Nov 2022 07:51:23 +0000 (07:51 +0000)]
Merge branch 'wip/corey/at-spi-context' into 'main'

atspicontext: Cache empty atspi bus address

See merge request GNOME/gtk!5276

3 years agoMerge branch 'show-hide-cleanup' into 'main'
Matthias Clasen [Tue, 29 Nov 2022 07:30:04 +0000 (07:30 +0000)]
Merge branch 'show-hide-cleanup' into 'main'

gtk: Stop using gtk_widget_show/hide

See merge request GNOME/gtk!5273

3 years agoatspicontext: Log more helpful warnings when the a11y bus doesn't exist
Corey Berla [Tue, 29 Nov 2022 00:34:12 +0000 (16:34 -0800)]
atspicontext: Log more helpful warnings when the a11y bus doesn't exist

3 years agoatspicontext: Cache empty atspi bus address
Corey Berla [Tue, 29 Nov 2022 00:32:52 +0000 (16:32 -0800)]
atspicontext: Cache empty atspi bus address

We are caching the bus address as data on the display object when it
exists, but fail to set the data when the bus address doesn't exist.
That causing excessive calls to GetAddress when the accesssbility
bus doesn't exist. Make sure to cache a non-existent accessibility
bus by setting the "" string.

3 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Mon, 28 Nov 2022 23:08:58 +0000 (23:08 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

Revert "builder: Stop using GtkBuildable.get_id"

See merge request GNOME/gtk!5274

3 years agoMerge branch 'wip/carlosg/osk-activation-in-widgets' into 'main'
Matthias Clasen [Mon, 28 Nov 2022 19:43:19 +0000 (19:43 +0000)]
Merge branch 'wip/carlosg/osk-activation-in-widgets' into 'main'

Handle OSK activation in GtkText/GtkTextView widgets

See merge request GNOME/gtk!5269

3 years agoRevert "builder: Stop using GtkBuildable.get_id"
Matthias Clasen [Mon, 28 Nov 2022 19:36:26 +0000 (14:36 -0500)]
Revert "builder: Stop using GtkBuildable.get_id"

This reverts commit 92edd4c476917e83c5f50e5eab8aa5a0ad240793.

This commit changed behavior that GNOME Builder relies on.

3 years agotools: Stop using gtk_widget_show/hide
Matthias Clasen [Mon, 28 Nov 2022 18:43:21 +0000 (13:43 -0500)]
tools: Stop using gtk_widget_show/hide

3 years agoconstraint editor: Stop using gtk_widget_show/hide
Matthias Clasen [Mon, 28 Nov 2022 11:20:14 +0000 (06:20 -0500)]
constraint editor: Stop using gtk_widget_show/hide

3 years agoicon browser: Stop using gtk_widget_show/hide
Matthias Clasen [Mon, 28 Nov 2022 11:26:28 +0000 (06:26 -0500)]
icon browser: Stop using gtk_widget_show/hide

3 years agogtk-demo: Stop using gtk_widget_show/hide
Matthias Clasen [Mon, 28 Nov 2022 04:03:14 +0000 (23:03 -0500)]
gtk-demo: Stop using gtk_widget_show/hide

3 years agowidget-factory: Stop using gtk_widget_show/hide
Matthias Clasen [Mon, 28 Nov 2022 03:17:07 +0000 (22:17 -0500)]
widget-factory: Stop using gtk_widget_show/hide

3 years agogtk: Stop using gtk_widget_show/hide
Matthias Clasen [Mon, 28 Nov 2022 18:43:36 +0000 (13:43 -0500)]
gtk: Stop using gtk_widget_show/hide

gtk_widget_set_visible and gtk_window_present
are better alternatives, and calling gtk_widget_show
on newly created widgets is no longer necessary
anyway.

3 years agoMerge remote-tracking branch 'origin' into ccook/spelling-fixes
Cam Cook [Mon, 28 Nov 2022 17:34:38 +0000 (12:34 -0500)]
Merge remote-tracking branch 'origin' into ccook/spelling-fixes

3 years agoMerge branch 'wip/corey/tree-expander' into 'main'
Benjamin Otte [Mon, 28 Nov 2022 15:53:17 +0000 (15:53 +0000)]
Merge branch 'wip/corey/tree-expander' into 'main'

treeexpander: Add hide-expander and indent-for-depth properties

Closes #4969

See merge request GNOME/gtk!5268

3 years agoimcontextwayland: Set up OSK activation gesture on non text widgets
Carlos Garnacho [Sun, 27 Nov 2022 19:22:33 +0000 (20:22 +0100)]
imcontextwayland: Set up OSK activation gesture on non text widgets

With GtkText and GtkTextView (and in extension, all their subclasses)
handling OSK activation activation, this gesture is only useful for
all text input widgets that are not subclasses of these 2 widgets,
e.g. the VTEs and crosswords of the world.

These still do need a hand in handling OSK activation, so only
set up the gesture for such cases.

3 years agogtktextview: Invoke OSK on button/touch taps that move/undo selection
Carlos Garnacho [Sun, 27 Nov 2022 12:20:02 +0000 (13:20 +0100)]
gtktextview: Invoke OSK on button/touch taps that move/undo selection

If the ::release handler is invoked, the press/release happened without
drags in between. Additionally check that there is no selection at all.

This makes OSK invoked on taps that move the caret around, while tapping
in the selection invokes edition popup and text handles without bringing
in the OSK.

3 years agogtktextview: Claim drag gesture after an actual selection change
Carlos Garnacho [Sun, 27 Nov 2022 12:18:18 +0000 (13:18 +0100)]
gtktextview: Claim drag gesture after an actual selection change

This way, the drag gesture lets the click gesture ::release handler
happen if there was no actual changes to the selected text (i.e.
too short drags). This matches the ::release handler behavior match
the situations in which the OSK was being invoked by the wayland
GtkIMContext.

3 years agogtktext: Invoke OSK on button/touch taps that move/undo selection
Carlos Garnacho [Sun, 27 Nov 2022 12:10:53 +0000 (13:10 +0100)]
gtktext: Invoke OSK on button/touch taps that move/undo selection

If the ::release handler is invoked, the press/release happened without
drags in between. Additionally check that the press did not happen within
the selection, and that there is no selection at all.

This makes OSK invoked on taps that move the caret around, while tapping
in the selection invokes edition popup and text handles without bringing
in the OSK.

3 years agogtktext: Claim drag gesture after an actual selection change
Carlos Garnacho [Sun, 27 Nov 2022 12:06:40 +0000 (13:06 +0100)]
gtktext: Claim drag gesture after an actual selection change

This way, the drag gesture lets the click gesture ::release handler
happen if there was no actual changes to the selected text (i.e.
too short drags). This matches the ::release handler behavior match
the situations in which the OSK was being invoked by the wayland
GtkIMContext.

3 years agoimcontextwayland: Implement activate_osk() vmethod
Carlos Garnacho [Sun, 27 Nov 2022 12:04:29 +0000 (13:04 +0100)]
imcontextwayland: Implement activate_osk() vmethod

This method does explicitly what the builtin GtkClickGesture in
the IM context is doing implicitly. The gesture will be dropped
after porting is done.

3 years agoimmulticontext: Implement activate_osk() vmethod
Carlos Garnacho [Sun, 27 Nov 2022 12:02:55 +0000 (13:02 +0100)]
immulticontext: Implement activate_osk() vmethod

The multicontext lets this call go through to the active
underlying GtkIMContext.

3 years agoimcontext: Add private activate_osk() vmethod
Carlos Garnacho [Sun, 27 Nov 2022 12:00:54 +0000 (13:00 +0100)]
imcontext: Add private activate_osk() vmethod

This method is so far private for both external GtkIMContext
implementations and external GtkIMContext users, and is meant
to activate the OSK in the environments where this may happen.

3 years agoRevert "gtktext: Claim gesture more selectively"
Carlos Garnacho [Sat, 26 Nov 2022 14:46:41 +0000 (15:46 +0100)]
Revert "gtktext: Claim gesture more selectively"

This reverts commit ae54374a514aa33b34f95eee94b4a2848b8a16d9.

3 years agoMerge branch 'bilelmoussaoui/gi-since' into 'main'
Matthias Clasen [Mon, 28 Nov 2022 11:17:51 +0000 (11:17 +0000)]
Merge branch 'bilelmoussaoui/gi-since' into 'main'

g-i: Add missing since annotations

See merge request GNOME/gtk!5271

3 years agog-i: Add missing since annotations
Bilal Elmoussaoui [Mon, 28 Nov 2022 07:54:48 +0000 (07:54 +0000)]
g-i: Add missing since annotations

3 years agotreeexpander: Minor formatting changes
Corey Berla [Sun, 27 Nov 2022 20:22:30 +0000 (12:22 -0800)]
treeexpander: Minor formatting changes

3 years agotreeexpander: Add indent-for-depth property
Corey Berla [Sun, 27 Nov 2022 05:28:22 +0000 (21:28 -0800)]
treeexpander: Add indent-for-depth property

When set to TRUE, indent-for-depth indents each level of
depth with an additional indent

3 years agotreeexpander: Add hide-expander property
Corey Berla [Sun, 27 Nov 2022 05:02:14 +0000 (21:02 -0800)]
treeexpander: Add hide-expander property

When set to TRUE hide-expander hides the expander icon in a
GtkTreeListRow.

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/4969
3 years agoMerge branch 'wip/corey/spi-logging' into 'main'
Matthias Clasen [Mon, 28 Nov 2022 01:29:10 +0000 (01:29 +0000)]
Merge branch 'wip/corey/spi-logging' into 'main'

atspicontext: Log failure to connect to a11y

See merge request GNOME/gtk!5270

3 years agoMerge branch 'work/zzag/wl-output-release' into 'main'
Matthias Clasen [Sun, 27 Nov 2022 22:21:29 +0000 (22:21 +0000)]
Merge branch 'work/zzag/wl-output-release' into 'main'

gdk/wayland: Prefer wl_output_release() over wl_output_destroy()

See merge request GNOME/gtk!5243

3 years agoatspicontext: Log failure to connect to a11y
Corey Berla [Sun, 27 Nov 2022 22:12:36 +0000 (14:12 -0800)]
atspicontext: Log failure to connect to a11y

GTK depends on the a11y infrastructure to be in place unless GTK_A11Y is
set to none.  It appears that despite that, users attempt to
get around the a11y requirement without setting GTK_A11Y.
This can cause, amongst other issues, performance problems
with gtk applications.  Log failure to connect to the a11y
bus.

3 years agoMerge branch 'fix-keymap-notify' into 'main'
Matthias Clasen [Sun, 27 Nov 2022 19:04:13 +0000 (19:04 +0000)]
Merge branch 'fix-keymap-notify' into 'main'

Don't emit ::notify from a getter

See merge request GNOME/gtk!5267

3 years ago| domain | current | suggestion |
Cam Cook [Sun, 27 Nov 2022 12:42:12 +0000 (07:42 -0500)]
| domain | current | suggestion |
|--------|---------|------------|
| [GtkListBox](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtklistbox.c#L1469)| (attributes org.gtk.Metthod.get_property=activate-on-single-click) | (attributes org.gtk.Method.get_property=activate-on-single-click) |

3 years ago| domain | current | suggestion |
Cam Cook [Sun, 27 Nov 2022 11:49:40 +0000 (06:49 -0500)]
| domain | current | suggestion |
|--------|---------|------------|
| [GtkHeaderBar](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkheaderbar.c#L780) | "specifies a icon" | "specifies an icon" |

3 years ago| domain | current | suggestion |
Cam Cook [Sun, 27 Nov 2022 11:30:30 +0000 (06:30 -0500)]
| domain | current | suggestion |
|--------|---------|------------|
| [GtkGridView](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkgridview.c#L1241)             | "Sets the imodel to use." | "Sets the model to use." |

3 years agoMerge branch 'main' into ccook/spelling-fixes
Cam Cook [Sun, 27 Nov 2022 11:30:04 +0000 (06:30 -0500)]
Merge branch 'main' into ccook/spelling-fixes

3 years agoDon't emit ::notify from a getter
Matthias Clasen [Sun, 27 Nov 2022 02:53:33 +0000 (21:53 -0500)]
Don't emit ::notify from a getter

GdkX11Keymap ddetermines the direction of the
keymap on demand, and was emitting notify::direction

3 years ago| domain | current | suggestion |
Cam Cook [Sat, 26 Nov 2022 19:51:34 +0000 (14:51 -0500)]
| domain | current | suggestion |
|--------|---------|------------|
| (GtkLevel](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtklevelbar.c#L1139)     | "between [property@Gtk.LevelBar:min-value[" | "between [property@Gtk.LevelBar:min-value]"|

3 years ago| domain | current | suggestion |
Cam Cook [Sat, 26 Nov 2022 19:35:40 +0000 (14:35 -0500)]
| domain | current | suggestion |
|--------|---------|------------|
| [GtkLevel](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtklevelbar.c#L1104)     | "Returns the \`min-value of the \`GtkLevelBar\`." | "Returns the \`min-value\' of the \`GtkLevelBar\`."|

3 years ago| domain | current | suggestion |
Cam Cook [Sat, 26 Nov 2022 18:32:27 +0000 (13:32 -0500)]
| domain | current | suggestion |
|--------|---------|------------|
| [GtkLabel](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtklabel.c#L3142)        | "the [property@Gtk.Label:use-underline property]" | "the [property@Gtk.Label:use-underline] property" |

3 years agoMerge branch 'wip/corey/demo-file-dialog' into 'main'
Matthias Clasen [Sat, 26 Nov 2022 18:11:41 +0000 (18:11 +0000)]
Merge branch 'wip/corey/demo-file-dialog' into 'main'

gtk-demo: Application demo use open_finish()

See merge request GNOME/gtk!5264

3 years agogtk-demo: Application demo use open_finish()
Corey Berla [Sat, 26 Nov 2022 18:11:40 +0000 (18:11 +0000)]
gtk-demo: Application demo use open_finish()

3 years agoMerge branch 'matthiasc/for-main' into 'main'
Matthias Clasen [Sat, 26 Nov 2022 13:15:28 +0000 (13:15 +0000)]
Merge branch 'matthiasc/for-main' into 'main'

gtk-demo: Cosmetics

See merge request GNOME/gtk!5265

3 years agoVarious spelling mistakes (and one use of the wrong verb) across a few domains that...
Cam Cook [Sat, 26 Nov 2022 11:54:47 +0000 (06:54 -0500)]
Various spelling mistakes (and one use of the wrong verb) across a few domains that show up in documentation.

| domain | current | suggestion |
|--------|---------|------------|
| [GtkBitset](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkbitset.c#L363)       | "Value to add" | "Value to remove" |
| [GtkEntry](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkentry.c#L3626)        | "\`GtkEntry"   | "\`GtkEntry\`"    |
| [GtkEntry](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkentry.c#L3566)        | "will be applies" | "will be applied" |
| [GtkEntry](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkentry.c#L2232)        | "is is in" | "is in" |
| [GtkInfoBar](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/deprecated/gtkinfobar.c#L772) | "in the info bars’s action area" | "in the info bar’s action area |
| [GtkLabel](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtklabel.c#L3210)        | "Gets the labels attribute list." | "Gets the label's attribute list."

3 years agogtk-demo: Cosmetics
Matthias Clasen [Sat, 26 Nov 2022 11:40:47 +0000 (06:40 -0500)]
gtk-demo: Cosmetics