Commit Graph

40473 Commits

Author SHA1 Message Date
Benjamin Otte
1f001a8f6a Merge branch 'wip/corey/listbase-focus' into 'main'
listbase: Use set_focus_child properly

Closes #5433 and #5432

See merge request GNOME/gtk!5169
2022-12-14 19:06:57 +00:00
Pablo Correa Gómez
42ba97eb5c gtkcheckbutton: Document how to keep track of changes for radio buttons 2022-12-14 20:02:07 +01:00
Matthias Clasen
e5560c1535 Add GDK_DEBUG=no-portals
Fixes: #5441
2022-12-14 13:50:20 -05:00
Corey Berla
93e591fdf1 listbase: Use set_focus_child properly
The EventControllerFocus on the list item, updates the list base focus
tracker and scrolled to position any time the list item enters focus.
This works when interacting within a single window, but has unexpected
results when changing focus between multiple windows.

Instead of using the focus controller workaround, just make
gtk_list_base_update_focus_tracker the set_focus_child vfunc

Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5433
Fixes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5432
2022-12-14 07:56:57 -10:00
Corey Berla
7081bfc614 listbase: Split scroll_to_item for reuse 2022-12-14 07:51:34 -10:00
Matthias Clasen
a471a8b57c Merge branch 'ebassi/gidocgen-update' into 'main'
ci: Update the gi-docgen dependencies

See merge request GNOME/gtk!5263
2022-12-14 16:24:48 +00:00
Georges Basile Stavracas Neto
b0f65ead84 Merge branch 'gbsneto/filechooser-grid-view' into 'main'
Add GtkGridView to the filechooser

Closes #233

See merge request GNOME/gtk!5163
2022-12-14 14:47:21 +00:00
Matthias Clasen
e3f805f169 Merge branch 'appdialog' into 'main'
Add GtkAppDialog

See merge request GNOME/gtk!5284
2022-12-14 13:24:20 +00:00
Matthias Clasen
c2c99a163a Merge branch 'stylanydev' into 'main'
Gtk.GestureStylus: implement `anydev` property

See merge request GNOME/gtk!4707
2022-12-13 19:34:12 +00:00
Matthias Clasen
eec8cf1309 Deprecate gtk_widget_show/hide
gtk_widget_set_visible does the same job.
2022-12-13 13:46:02 -05:00
Georges Basile Stavracas Neto
8cf9810240 pathbar: Reimplement using GtkBox
The path bar does a lot of manual management of buttons, mostly to
be able to show navigation arrows when there's not enough space to
show the full path.

Since the GTK4 migration, this is slightly broken in some cases, due
to the 'need_sliders' variable being always set to TRUE. Furthermore,
after the introduction of the Recent button as a special cased fake
root, the allocation of the buttons is generating warnings.

Reimplement the path bar as a GtkBox, inside a GtkScrolledWindow.
This mimics what Nautilus does, and allows us to make navigation more
predictable, and remove most of the complexity from GtkPathBar. It
also prevents it from generating allocation warnings.

The path bar itself now doesn't override GtkWidget.measure nor
GtkWidget.allocate; instead, it delegates layout to the GtkBinLayout
layout manager.

CSS is adjusted to account for the changed hierarchy of buttons.
2022-12-13 14:45:15 -03:00
Georges Basile Stavracas Neto
f0a76f2ca8 filechooserwidget: Improve grid cell visuals
Use a GtkLabel instead of a GtkInscription to get filenames better
displayed within the available space.
2022-12-13 14:45:15 -03:00
Georges Basile Stavracas Neto
358d9d72d1 filechooserwidget: Don't check operation mode for tooltip
There's no way this could ever have been correct. We always want to
show the tooltip, and it's basically always available.
2022-12-13 14:45:15 -03:00
Sam Hewitt
aabb8dce91 filechooser: Add hover styles to the gridview children 2022-12-13 14:45:15 -03:00
Georges Basile Stavracas Neto
80736d782b filechooserwidget: Add toggle view button clone in search
It's positioned and looks exactly like the browse_toggle_view_button,
but due to the way things are organized, we cannot simply reuse that
button.

Add a clone of browse_toggle_view_button in the search entry page of
the toolbar stack. Make it toggle the same action as of the original
button, and bind the icon name and tooltip texts to it too.
2022-12-13 14:45:15 -03:00
Georges Basile Stavracas Neto
1464289710 filechooserwidget: Show pathbar in recent mode
As per design direction, show the pathbar in recent mode.
2022-12-13 14:45:15 -03:00
Georges Basile Stavracas Neto
72c676aecb pathbar: Special case recent button
Soon pathbar will be shown on the Recent mode, with a static
path pointing to, well, Recent, so special case it in the
GtkPathBar with a static icon.
2022-12-13 14:45:15 -03:00
Corey Berla
c717d10dda filechooserwidget: Hide ColumnView settings in GridView 2022-12-13 14:45:15 -03:00
Matthias Clasen
ee5324359d filechooser: Save and restore view type
With this, the filechooser comes up with the
same view (grid or list) that it had the last
time you used it.
2022-12-13 14:45:15 -03:00
Georges Basile Stavracas Neto
10338a5237 filechooserwidget: Rename callback
It's shared between both column and grid views now.
2022-12-13 14:45:15 -03:00
Georges Basile Stavracas Neto
1c5caf53b6 filechooserwidget: Implement 'keynav-failed' for grid view
It's exactly the same as of the column view. Since we're sharing
the callback now, rename it to browse_files_view_keynav_failed_cb.
2022-12-13 14:45:15 -03:00
Georges Basile Stavracas Neto
0bb6377a3a filechooserwidget: Use correct view in various places
Most of the pointer comparisons against 'browse_files_column_view'
should actually be performed against the current view widget. As
it turns out, it weren't that many places after all.
2022-12-13 14:45:15 -03:00
Georges Basile Stavracas Neto
ce12ab8307 style: Improve filechooser grid view slightly 2022-12-13 14:45:15 -03:00
Georges Basile Stavracas Neto
27613e3bc5 filechooserwidget: Add a grid view
Add a grid view outside of the widgetry tree. The grid view mimics
the column view using bindings, so we only need to manage the column
view.

Also add a button in the path bar section to toggle the view. This
is handled as a new 'toggle-view' action in the file chooser.

The way switching between views currently work is by setting either
the column or grid view as the child of the GtkScrolledWindow. This
has the benefit of unmapping the unused view, which is nice and can
avoid some tricky situations with thumbnails.

Fixes https://gitlab.gnome.org/GNOME/gtk/-/issues/233
2022-12-13 14:45:15 -03:00
Georges Basile Stavracas Neto
a9be0be32b filethumbnail: Add 'icon-size' property
This will be used by future commits so that we can reuse this widget
in the file chooser grid view.
2022-12-13 14:45:15 -03:00
Matthias Clasen
f94e9d26b5 gtk: Update all callers 2022-12-13 07:49:02 -05:00
Matthias Clasen
69cc4b42cf filelauncher: Add a file property 2022-12-13 07:48:35 -05:00
Matthias Clasen
631b0fa9fd Merge branch 'sunflowerskater-main-patch-64457' into 'main'
appchooser: Rename "application" to "app"

See merge request GNOME/gtk!5323
2022-12-12 16:48:56 +00:00
sunflowerskater
e319b14dc2 appchooserbutton: Rename "application" to "app"
This change is a part of an initiative to use the word "app" instead of "application" in the UI:

Teams/Design/initiatives#123
2022-12-11 19:20:12 -03:00
sunflowerskater
c96fefd7f5 appchooserwidget: Rename "application" to "app"
This change is a part of an initiative to use the word "app" instead of "application" in the UI:

https://gitlab.gnome.org/Teams/Design/initiatives/-/issues/123
2022-12-11 19:13:51 -03:00
sunflowerskater
b1a9afbdba appchooser: Rename "application" to "app"
This change is a part of an initiative to use the word "app" instead of "application" in the UI: https://gitlab.gnome.org/Teams/Design/initiatives/-/issues/123
2022-12-11 20:05:54 +00:00
Matthias Clasen
6bed0cfb5a Merge branch 'popover-present-docs' into 'main'
popover: Clarify docs

See merge request GNOME/gtk!5318
2022-12-11 04:03:10 +00:00
Matthias Clasen
973a8752ab Merge branch 'ebassi/image-dispose' into 'main'
Do not change the notification queue inside finalization

Closes #5420

See merge request GNOME/gtk!5321
2022-12-11 04:02:49 +00:00
Emmanuele Bassi
b3b5a5064e 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
2022-12-11 00:36:03 +00:00
Matthias Clasen
5c70f2ae9b 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
2022-12-10 17:12:02 -05:00
Matthias Clasen
5df9f4016e popover: Clarify docs
gtk_popover_present() is a misleadingly named
function, so at least give it clear docs that
tell people to use gtk_popover_popup() instead.
2022-12-10 16:36:00 -05:00
Matthias Clasen
00bdad23b0 Deprecate gtk_show_uri
This API has been superseded by GtkFileLauncher.
2022-12-09 13:36:28 -05:00
Matthias Clasen
8ff3217712 gtk: Stop using gtk_show_uri
Replace all uses of gtk_show_uri
with GtkFileLauncher.
2022-12-09 13:36:28 -05:00
Matthias Clasen
1d9ee050f4 Add GtkFileLauncher
This is a replacement for gtk_show_uri_full,
which can open a GFile in an application, or
open its containing folder in a file manager.
2022-12-09 13:25:02 -05:00
Matthias Clasen
40d54ad3eb window: Deprecate the ::keys-changed signal 2022-12-09 13:14:27 -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
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
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
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
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
Arjan Molenaar
19aaa8fee5 macos: Use Command key symbol for meta
Show the Apple Command symbol ⌘ as keyboard shortcut for the Meta key on macos,
similar to GtkAccelGroup.
2022-12-05 21:00:42 +01: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
Corey Berla
ff8d88b097 dragsource: Add a timeout before starting a drag
No one wants a drag that happens in less than 100ms (if so, it's
probably accidental).
2022-11-29 20:06:21 -08:00
Emmanuele Bassi
9bce5f0462 docs: Fix property cross-links in GtkTreeExpander 2022-11-29 13:49:35 +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
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
Corey Berla
44e297488f atspicontext: Log more helpful warnings when the a11y bus doesn't exist 2022-11-28 17:02:18 -08:00
Corey Berla
8072d202e3 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.
2022-11-28 17:02:13 -08:00
Matthias Clasen
b82fa26373 Merge branch 'matthiasc/for-main' into 'main'
Revert "builder: Stop using GtkBuildable.get_id"

See merge request GNOME/gtk!5274
2022-11-28 23:08:58 +00:00
Matthias Clasen
f624897589 Merge branch 'wip/carlosg/osk-activation-in-widgets' into 'main'
Handle OSK activation in GtkText/GtkTextView widgets

See merge request GNOME/gtk!5269
2022-11-28 19:43:19 +00:00
Matthias Clasen
a46bee1285 Revert "builder: Stop using GtkBuildable.get_id"
This reverts commit 92edd4c476.

This commit changed behavior that GNOME Builder relies on.
2022-11-28 14:36:47 -05:00
Matthias Clasen
f339cc276c 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.
2022-11-28 14:34:55 -05:00
Cam Cook
5b45efb49b Merge remote-tracking branch 'origin' into ccook/spelling-fixes 2022-11-28 12:34:38 -05:00
Benjamin Otte
57ac4740b3 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
2022-11-28 15:53:17 +00:00
Carlos Garnacho
929a51addb 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.
2022-11-28 15:46:41 +01:00
Carlos Garnacho
6cbb7b848a 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.
2022-11-28 15:46:41 +01:00
Carlos Garnacho
ed81c265ac 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.
2022-11-28 15:46:41 +01:00
Carlos Garnacho
ee6d9478c8 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.
2022-11-28 15:46:41 +01:00
Carlos Garnacho
76d80f7544 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.
2022-11-28 15:46:41 +01:00
Carlos Garnacho
e3b0d57ce7 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.
2022-11-28 15:46:41 +01:00
Carlos Garnacho
6d0f7a2d31 immulticontext: Implement activate_osk() vmethod
The multicontext lets this call go through to the active
underlying GtkIMContext.
2022-11-28 15:46:41 +01:00
Carlos Garnacho
459583ba9e 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.
2022-11-28 15:46:41 +01:00
Carlos Garnacho
59af80ab8b Revert "gtktext: Claim gesture more selectively"
This reverts commit ae54374a51.
2022-11-28 15:46:41 +01:00
Bilal Elmoussaoui
0919320086 g-i: Add missing since annotations 2022-11-28 07:54:48 +00:00
Corey Berla
72bc97fff5 treeexpander: Minor formatting changes 2022-11-27 19:39:20 -08:00
Corey Berla
648b38761c treeexpander: Add indent-for-depth property
When set to TRUE, indent-for-depth indents each level of
depth with an additional indent
2022-11-27 19:36:20 -08:00
Corey Berla
2b578a24e4 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
2022-11-27 19:36:11 -08:00
Matthias Clasen
90c986e493 Merge branch 'wip/corey/spi-logging' into 'main'
atspicontext: Log failure to connect to a11y

See merge request GNOME/gtk!5270
2022-11-28 01:29:10 +00:00
Corey Berla
16fd72e606 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.
2022-11-27 14:13:13 -08:00
Cam Cook
b876b4f568 | 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) |
2022-11-27 07:42:12 -05:00
Cam Cook
dd780b3ce0 | domain | current | suggestion |
|--------|---------|------------|
| [GtkHeaderBar](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkheaderbar.c#L780) | "specifies a icon" | "specifies an icon" |
2022-11-27 06:49:40 -05:00
Cam Cook
0663758566 | 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." |
2022-11-27 06:30:30 -05:00
Cam Cook
47bbc7e944 | 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]"|
2022-11-26 14:51:34 -05:00
Cam Cook
c89cdb680d | 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\`."|
2022-11-26 14:35:40 -05:00
Cam Cook
d19426d399 | 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" |
2022-11-26 13:32:27 -05:00
Emmanuele Bassi
cc546d7af1 build: Add a check argument to run_command()
Silence a Meson warning.
2022-11-26 15:18:42 +00:00
Cam Cook
cb303895aa 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."
2022-11-26 06:54:47 -05:00
Bilal Elmoussaoui
5ede8dd1eb g-i: Add missing since annotation 2022-11-25 10:16:37 +00:00
Matthias Clasen
e73f0f6974 file dialog: Handle Escape better
Closing the dialog by hitting Escape should
have the same effect as clicking the cancel
button. Make it so.
2022-11-24 10:29:43 -05:00
Matthias Clasen
ff14c51950 color dialog: Handle Escape better
Closing the dialog by hitting Escape should
have the same effect as clicking the cancel
button. Make it so.
2022-11-24 10:29:03 -05:00
Matthias Clasen
942f8d4b4b Deprecate GtkInfoBar
This widget has a dialog-like API, which is something
we want to get rid of in GTK 5, and libadwaita has
a replacement with AdwBanner incoming.
2022-11-23 13:00:09 -05:00
Florian "sp1rit"​
6dd939f13e
improved docs of Gtk.GestureStylus 2022-11-23 09:09:50 +01:00
Florian "sp1rit"​
c85fbcea55
adjusted stylus-only code to fit gtk code conventions 2022-11-23 08:59:29 +01:00
Florian "sp1rit"​
789778105d
gtk: gtkgesturestylus: implemented stylus-only property
this allows setting a Gtk.GestureStylus to a state, where it can be
used to handle non-stylus devices (e.g. mice).
This might be useful for applications that handle stylus input, but
want to allow falling back to a mice, if the user is unable to provide
stylus input.
2022-11-22 09:13:35 +01:00
Matthias Clasen
d34ac99916 filefilter: Add properties for the criteria
Add construct-only properties for patterns,
suffixes and mime-types. This provides an
alternative way to specify these in ui files.

Related: #5350
2022-11-21 22:44:03 -05:00
Matthias Clasen
205b718fe5 colorpicker: Always try the portal first
It does not hurt., and going forward, we want to
prefer portals.
2022-11-21 14:26:29 -05:00
Matthias Clasen
01ae136a4c Merge branch 'bilelmoussaoui/g-i' into 'main'
g-i: add missing array annotation to AlertDialog.set_buttons

See merge request GNOME/gtk!5234
2022-11-21 10:49:05 +00:00
Matthias Clasen
83839cb219 Merge branch 'drop-buildable-get-id' into 'main'
builder: Stop using GtkBuildable.get_id

See merge request GNOME/gtk!5239
2022-11-21 10:35:16 +00:00
Matthias Clasen
e357ff6055 Drop gtk_widget_buildable_parser_finished
No need to have this no-op implementation.
This was the only implementation of this vfunc
in GTK.
2022-11-20 14:36:35 -05:00
Matthias Clasen
92edd4c476 builder: Stop using GtkBuildable.get_id
Drop the only implementation of this vfunc,
and stop using it. It isn't needed, and the
only implementation did the same thing GtkBuilder
does anyway.
2022-11-20 14:35:36 -05:00
Matthias Clasen
f0aefe2f7f stringlist: Add a construct-only strings property
This enables creating string lists in ui files
without using custom markup.

Related: #5350
2022-11-20 14:07:45 -05:00
Matthias Clasen
8dc89ba3d8 centerbox: Add properties for child widgets
This provides and alternative to add children
in ui files.

Related: #5350
2022-11-20 12:54:31 -05:00
Bilal Elmoussaoui
97d76417fa g-i: add missing array annotation to AlertDialog.(s|g)et_buttons 2022-11-19 14:33:19 +01:00
Matthias Clasen
ab530b9e5a Merge branch 'builder-parse-attributes' into 'main'
builder: Parse PangoAttrList values

See merge request GNOME/gtk!5228
2022-11-19 02:49:23 +00:00
Matthias Clasen
21a69e7107 Merge branch 'wip/carlosg/osk-activation' into 'main'
gtktext: Claim gesture more selectively

Closes #5351

See merge request GNOME/gtk!5230
2022-11-18 19:33:55 +00:00
Matthias Clasen
d45155364e Merge branch 'kjellahl/menubar' into 'main'
gtk_popover_menu_bar_set_menu_model(): Accept model == NULL

See merge request GNOME/gtk!5232
2022-11-18 19:33:37 +00:00
Kjell Ahlstedt
8911015549 gtkpopovermenubar: Make model nullable
The description of gtk_popover_menu_bar_new_from_model() and
gtk_popover_menu_bar_set_menu_model() says that model is nullable.
Make it so.
2022-11-18 18:09:42 +01:00
Carlos Garnacho
ae54374a51 gtktext: Claim gesture more selectively
Even though button 1 (or touch down) presses do most often have
an effect in one way or another (starting drag, moving focus,
starting selection, ...), there is one situation that they do
immediately nothing: When clicking on the entry does not move
the text caret around. Dragging might start a selection, but
the entry did not do anything just yet, and an immediate
button/touch release should remain at "did nothing".

And that is precisely the hint that the Wayland IM context's click
gesture takes, clicks that do not scroll nor move the caret around,
having the GtkText not claim the gesture in that situation makes
the IM gesture able to do its thing without in-fighting.

This is typically not a problem when the GtkText is embedded in
another GtkEditable implementation (e.g. GtkEntry), since the
IM gesture is inactive and capturing from the parent widget, so
gets a pass that it otherwise doesn't get when both gestures are
in the same widget. This makes it work regardless of GtkText not
being a child of a composite widget, like NautilusQueryEditor
and AdwRowEntry.

Closes: https://gitlab.gnome.org/GNOME/gtk/-/issues/5351
2022-11-18 17:56:14 +01:00
Matthias Clasen
1f97714293 immodule: Accept 'simple' and 'none'
Everybody (including myself) gets this wrong,
so accept 'simple' and 'none' as shorthands
for the official IDs 'gtk-im-context-simple'
and 'gtk-im-context-none'.
2022-11-18 11:18:48 -05:00
Matthias Clasen
9af8c6fb25 immmodule: Warn if GTK_IM_MODULE is bad
If we don't find an immodule matching the
ids in the GTK_IM_MODULE envvar, print a
warning.
2022-11-18 11:18:48 -05:00
Matthias Clasen
9682085e09 builder: Parse PangoAttrList values
Allow specifying PangoAttrList properties in the
serialized format supported by pango_attr_list_to_string().

Test included.
2022-11-18 10:42:50 -05:00
Matthias Clasen
9cbfbbdf39 stringsorter: Fix one case of collation handling
When not ignoring case, and not collating, we were
returning sort keys that were already freed. Oops.

Pointed out by clang.
2022-11-18 00:04:23 -05:00
Matthias Clasen
95fc5109bb composetable: Fix a memory leak
Pointed out by clang.
2022-11-18 00:04:23 -05:00
Matthias Clasen
60aaf38f39 gdk: Clean up gdkprivate.h
Move apis to more specific headers.
2022-11-17 22:49:56 -05:00
Matthias Clasen
b12d31d189 Fix spelling errors
These were pointed out by codespell.
2022-11-17 22:49:45 -05:00
Matthias Clasen
0d2161ee40 Merge branch 'file-dialog-portals' into 'main'
file dialog: Use portals

See merge request GNOME/gtk!5221
2022-11-18 03:49:30 +00:00
Matthias Clasen
b0148972fd filedialog: Use portals
We want this new API to be portal-first.
Make it so.
2022-11-17 15:52:53 -05:00
Cam Cook
2a14753739 Merge branch 'main' into ccook/doc-spelling-fixes 2022-11-16 23:23:42 -05:00
Cam Cook
4ccc3b53eb doc/spelling changes: gtkselectionmodel.c, 'call this when the* selection changes' 2022-11-16 23:20:50 -05:00
Matthias Clasen
793954055e Merge branch 'radioactiveman-main-patch-52462' into 'main'
label: Fix markup doc example

See merge request GNOME/gtk!5201
2022-11-17 03:46:43 +00:00
Thomas Lange
7adf720f08 label: Fix markup doc example 2022-11-17 03:46:01 +00:00
Matthias Clasen
501577196a Merge branch 'matthiasc/for-main' into 'main'
Inspector: Add a missing event type

See merge request GNOME/gtk!5218
2022-11-16 19:24:54 +00:00
robxnano
adc0264dac
filechooser: Fix gtk_file_chooser_set_choice again
If the choice was in the form of a GtkDropDown, the code failed to
find the widget and so the choice never got set. Fixes #5346.
2022-11-16 18:07:20 +00:00
Matthias Clasen
4eb017904b Alertdialog: Cosmetics 2022-11-15 10:36:32 +00:00
Matthias Clasen
c9df9978d2 Inspector: Add a missing event type
We did not have a name for the new touchpad hold
events.

To prevent this from happening again in the future,
add a static assertion.
2022-11-15 07:18:41 +01:00
Cam Cook
d1bb927286 Documentation fix: Various spelling mistakes (and one use of the wrong verb) across a few domains that show up in documentation.
| domain | current | suggestion |
|--------|---------|------------|
| [GtkButton](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkbutton.c#L691)       | "Buttons can has a flat appearance" | "Buttons can have a flat appearance" |
| [GtkCenterBox](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkcenterbox.c#L275) | "pas %NULL" | "pass %NULL" |
| [GtkEditable](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkeditable.c#L466)   | "the text to append" | "the text to insert" |
| [GtkFlowbox](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkflowbox.c#L4921)    | "the are equal" | "they are equal" |
| [GtkSelectionModel](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkselectionmodel.c#L550) | "Call this when a the selection changes" | "Call this when a selection changes" |
| [GtkWIndow](https://gitlab.gnome.org/GNOME/gtk/-/blob/main/gtk/gtkwindow.c#L5321)                | "(e.g. the user or the window manager" | "(e.g. the user or the window manager)" |
2022-11-13 11:55:05 -05:00
Matthias Clasen
2daea9e459 Merge branch 'focus-no-parent' into 'main'
focus: fall back to old behaviour if we didn't focus anything

See merge request GNOME/gtk!5189
2022-11-11 10:29:00 +00:00
Matthias Clasen
d1bdc36331 window: fixups 2022-11-09 16:28:30 +01:00
Matthias Clasen
f9982a61e6 window: Use gdk_toplevel_export_handle 2022-11-09 16:28:29 +01:00
Matthias Clasen
9e28a407df Merge branch 'ebassi/since-for-main' into 'main'
docs: Add deprecation notices for properties

See merge request GNOME/gtk!5204
2022-11-08 16:01:11 +00:00
Matthias Clasen
a5780beba7 Merge branch 'ccook/gtk_aspect_frame_doc_fix' into 'main'
doc/comment fix: @self misspelled as self@

See merge request GNOME/gtk!5200
2022-11-08 15:28:08 +00:00
Emmanuele Bassi
5a51cbe673 docs: Add deprecation notices for properties 2022-11-08 10:45:09 +00:00
Matthias Clasen
e00b96053b colordialogbutton: Actually accept NULL
As pointed out in #5321, my previous fix was not
good enough.

Fixes: #5321
2022-11-07 15:24:13 +01:00
Cam Cook
ed16946685 doc/comment fix: the ref to @self was misspelled as self@ for gtkaspectframe.h/gtk_aspect_frame_get_child
Noticed this while reviewing the gi-docgen docs for GtkAspectFrame while developing some java bindings.
It's my understanding that @self was intended; as it would cause gi-docgen to interpret it as a reference to
the the GtkAspectFrame pointer named 'self'.
2022-11-06 17:59:23 -05:00
Matthias Clasen
466db31aac color/fontdialogbutton: Fix constructors
The arguments were meant to be nullable.
Make it so!

Fixes: #5321
2022-11-06 14:12:02 +01:00
Adam Williamson
e07f8ef506 focus: fall back to old behaviour if we didn't focus anything
8455b9ac74 seems to have introduced a problem where we can wind
up focusing no widget at all if the `while (parent)` loop doesn't
find a widget it can successfully move the focus to. This 'fixes'
that by falling back to doing the previous thing if we make it
all the way through that loop without moving the focus. Thanks to
@coreyberla for a hint to improve the implementation.

Signed-off-by: Adam Williamson <awilliam@redhat.com>
2022-11-02 09:32:32 -07:00
Matthias Clasen
030e8c0bf9 Be consistent in preconditions for async API
Do the same checks in all our finish functions.
2022-10-31 16:40:54 -04:00
Emmanuele Bassi
d665b0e042 docs: Add missing Deprecated annotations 2022-10-30 20:08:39 +00:00
Emmanuele Bassi
37fadb20a9 docs: Add missing Since annotations 2022-10-30 20:08:21 +00:00
Matthias Clasen
a36bf22134 alertdialog: Small refactoring
Move the deprecated code out into its own function.
2022-10-30 08:52:02 -04:00
Matthias Clasen
9948053cd7 Deprecate GtkDialog
GtkDialog is too flexible in terms of UI (headerbars vs action bar,
etc), and has archaic APIs. It is time to retire it.
2022-10-29 15:27:53 -04:00
Matthias Clasen
f54ab91ff3 Deprecate GtkFileChooser and implementations
These are being replaced by GtkFileDialog.

This commit only moves the headers for GtkFileChooserWidget and
GtkFileChooserDialog to deprecated/, and keeps the implementations
in gtk/, since they will eventually be salvaged into a private
GtkFileChooserWindow.
2022-10-29 13:31:41 -04:00
Matthias Clasen
66b062a976 Deprecate GtkMessageDialog
It is getting replaced by GtkAlertDialog

This commit only moves the header to deprecated/,
and keeps the implementation in gtk/, since it will
eventually be salvaged into a private, dialog-free
widget.
2022-10-29 13:31:41 -04:00
Matthias Clasen
15572b0183 Deprecate GtkFontChooser and implementations
These are being replaced by GtkFontDialog
and GtkFontDialogButton

This commit only moves the headers for GtkFontChooserWidget and
GtkFontChooserDialog to deprecated/, and keeps the implementations
in gtk/, since they will eventually be salvaged into a private
GtkFontChooserWindow.
2022-10-29 13:31:41 -04:00
Matthias Clasen
a51a6a3ee2 Deprecate GtkColorChooser and implementations
These are being replaced by GtkColorDialog
and GtkColorDialogButton.

This commit only moves the headers for GtkColorChooserWidget
and GtkColorChooserDialog to deprecated/, and keeps the
implementations in gtk/, since they will eventually be
salvaged into a private GtkColorChooserWindow.
2022-10-29 13:31:41 -04:00
Matthias Clasen
9839aca0bd inspector: Port to async dialog API 2022-10-29 13:31:41 -04:00
Matthias Clasen
9ab732ce2d gtk: Port to async dialog API 2022-10-29 13:31:41 -04:00
Matthias Clasen
6ed2d2b232 Add GtkFileDialog
Add an async API for picking a file, together with
a builder object for it. This is meant to replace direct
use of GtkFileChooserDialog.
2022-10-29 13:31:41 -04:00
Matthias Clasen
cccc74786f Add GtkAlertDialog
This is replacing GtkMessageDialog with an
async API for showing informational messages.
2022-10-29 13:31:41 -04:00
Matthias Clasen
aeacc8f3c5 Add GtkFontDialogButton
This is like GtkColorDialogButton, but for fonts.
2022-10-29 13:31:41 -04:00
Matthias Clasen
7d0ebe02db Add GtkFontDialog
This is similar to GtkColorDialog, but for fonts.
2022-10-29 13:31:41 -04:00
Matthias Clasen
655675e6a1 Add GtkColorDialogButton
This is a new color button implementation
built around GtkColorDialog.
2022-10-29 13:02:15 -04:00
Matthias Clasen
f877f33c19 Add GtkColorDialog
Add an async API for picking a color, together with
a builder object for it. This is meant to replace direct
use of GtkColorChooserDialog.
2022-10-29 10:18:37 -04:00
Matthias Clasen
2fce117d15 Add GtkDialogError
This error domain will be used by async apis
in future commits.
2022-10-29 10:18:37 -04:00
Matthias Clasen
bd5dedce12 fontchooser: Add a way to set a GtkFilter
We keep this private, since the chooser apis
are going away. This will be used in GtkFontDialog.
2022-10-29 10:18:37 -04:00
Matthias Clasen
bdc91c2339 messagedialog: Cosmetics 2022-10-28 22:23:04 -04:00
Matthias Clasen
5c9d68a550 printeroptionwidget: Drop unused include 2022-10-28 18:24:48 -04:00
Bilal Elmoussaoui
6ca33c639e g-i: Add missing since annotation 2022-10-27 15:38:14 +00:00
Mat
f6eb84189f Revert "treepopover: Do not propagate natural width of content"
This reverts commit 9c919ffa46.
2022-10-26 13:58:10 +03:00
Hodong
30525835f3 Fix a typo 2022-10-25 19:40:30 +00:00
Emmanuele Bassi
21bc2c5078 docs: Remove mentions of Glade
Glade does not support GTK4, so we should not link to it when discussing
developing GTK4 applications.
2022-10-24 20:11:50 +01:00
Matthias Clasen
3723778f42 fontchooser: Stop using deprecated harfbuzz api
The replacement is very straightforward.
2022-10-21 21:54:38 -04:00
Matthias Clasen
2868f1b509 placesview: Drop deprecation guards
We got rid of all deprecated api here.
2022-10-21 21:48:39 -04:00
Matthias Clasen
f44570e71a filechooserwidget: Drop deprecation guards
We got rid of all deprecated api here.
2022-10-21 21:48:39 -04:00
Matthias Clasen
15d39dddc5 filesystemmodel: Drop outdated comments
Drop a long comment describing an implementation
that no longer exists.
2022-10-21 21:48:39 -04:00
Matthias Clasen
1028449bcc filesystemmodel: Drop unneded deprecation guards
Nothing deprecated is used here anymore.
2022-10-21 21:48:39 -04:00
Matthias Clasen
01cca279f9 searchenginemodel: Drop unneeded deprecation guards
Nothing deprecated is used here anymore.
2022-10-21 21:48:39 -04:00
Corey Berla
e5cea4e39d filechooserwidget: Show popup when clicking on empty space
Add gesture to right click or long press in the empty space
in the FileChooserWidget.  Only show the global settings when
clicking on the empty space.
2022-10-21 13:57:21 -07:00
Corey Berla
22aca8952f filechoosercell: Select item when right click or long press 2022-10-21 13:57:15 -07:00
Corey Berla
c0e437d163 filechoosercell: Only use long press when in touch mode 2022-10-21 13:57:11 -07:00
Corey Berla
ffe97a453f filechoosercell: Claim sequence on click 2022-10-21 13:57:06 -07:00
Matthias Clasen
c09ba28b06 Merge branch 'gbsneto/filechooser-column-view' into 'main'
Port filechooser to GtkColumnView

See merge request GNOME/gtk!5108
2022-10-21 19:42:24 +00:00
Matthias Clasen
788be8b945 filesystemmodel: Fix a compiler warning 2022-10-21 12:15:36 -04:00
Matthias Clasen
0370979225 theme: Fix up padding for the file chooser
We need the padding inside the filelistcell, so that
its event controllers cover the whole area.

Introduce a .complex style class for columnviews that
achieves that, and make the filechooser use it.
2022-10-21 08:28:58 -04:00
Matthias Clasen
c0e8523a01 filesystemmodel: Fix a compiler warning 2022-10-21 07:44:13 -04:00
Chun-wei Fan
611d14108d gtkcomposetable.c: Fix build on non-X11
The build breaks with a C4013 warning/error on Visual Studio because we don't
have a prototype defined for _gtk_get_datadir(), so include gtkprivate.h.

The vs2017-x64 CI did not catch this error because it is building GLib as a
fallback subproject, causing the msvc_recommended_pragmas.h header not to be
found, which is used to detect problems like this.
2022-10-21 12:29:19 +08:00
Matthias Clasen
25cf702345 filechooser: Make search results show up
The tracker search engine implementation was not
setting all the custom attributes that we require
now.

The quartz search engine will need similar fixes.
2022-10-20 22:34:41 -04:00
Matthias Clasen
1d9c61cada filechooserwidget: Remember sort columns and order
These settings existed before, we keep using them.
This loses some information about sorting by multiple
columns, but it is sufficient to get the same primary
sort column back.
2022-10-20 22:34:41 -04:00
Corey Berla
71adb26a0d filechooserwidget: Fix time_sort_func 2022-10-20 22:34:41 -04:00
Corey Berla
e27fa33690 filechooser: Add show-time property
The "Show Time" setting does not take immediate effect (only after
changing folders) because it's set as a single call to
column_view_get_time_visible() on the FileChooserCell creation.
Instead create a bind a show-time property that gets updated
as the setting is changed.
2022-10-20 22:34:41 -04:00
Corey Berla
f7dfead861 filechoosercell: Add a GtkDragSource
Allow dragging one or more items.  If the item dragged is not part of
the current selection, only drag that item.
2022-10-20 22:34:41 -04:00
Corey Berla
aac04a0995 filechoosercell: Bind "item" and "selected" to cell 2022-10-20 22:34:41 -04:00
Corey Berla
8af191e52d filechooserwidget: Expose selection model
FileChooserCell may need to change the selection during a DND.
2022-10-20 22:34:41 -04:00