Commit Graph

74346 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
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
Luca Bacci
48bcae99af Merge branch 'gdk-win32-fix-native-decoration-resize' into 'main'
GdkWin32: Fix resizes with native decorations

Closes #5142, #5088, and #5090

See merge request GNOME/gtk!5096
2022-12-14 13:13:14 +00:00
Danial Behzadi
355b42b373 Update Persian translation
(cherry picked from commit aabae92482)
2022-12-14 12:33:20 +00:00
Luca Bacci
0bdf30dfbf Merge branch 'gdk-win32-modal-handling' into 'main'
GdkWin32: Do not use MA_NOACTIVATEANDEAT

Closes #5297 and #5326

See merge request GNOME/gtk!5208
2022-12-14 10:08:42 +00:00
Corey Berla
e8f70be2c1 Merge branch 'wip/otte/for-5422' into 'main'
contentserializer: Serialize to file:// if possible

Closes #5422

See merge request GNOME/gtk!5330
2022-12-14 01:56:04 +00:00
Benjamin Otte
ea056d261f contentserializer: Serialize to file:// if possible
Try to get a native file:// URI instead of any other GVFS
scheme, for interoperability with apps only handling file:// URIs.

This is what GTK3 Nautilus and Thunar do, so apps should be tuned
for this behavior.

See also https://bugzilla.xfce.org/show_bug.cgi?id=13845

Fixes: #5422
2022-12-14 02:33:45 +01: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
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
6b83ded8f0 Merge branch 'harfbuzz-dep' into 'main'
build: Use a stable harfbuzz

See merge request GNOME/gtk!5327
2022-12-13 16:15:43 +00:00
Matthias Clasen
cc23ef6eae build: Use a stable harfbuzz
We don't need the latest harfbuzz.
Stick to 4.0 for now.
2022-12-13 09:29:16 -05:00
Matthias Clasen
eba9c4e4c3 gtk-demo: Update the pickers demo 2022-12-13 07:49:10 -05: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
66b4f2a9dd Merge branch 'docs/default-args' into 'main'
docs: Emphasize requirement to provide filenames as arguments

See merge request GNOME/gtk!5322
2022-12-13 12:17:07 +00:00
andy5995
99d6eb9cb4
docs: Emphasize requirement to give filenames as arguments
(related to #5430)
2022-12-12 23:40:07 -06: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
Matthias Clasen
db3b216ad1 Merge branch 'builder-scope-note' into 'main'
builderscope: Add a note for implementors

See merge request GNOME/gtk!5317
2022-12-11 01:07:21 +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
6f7a4b67c2 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
2022-12-10 20:53:09 +00:00
andy5995
6e7ecb02f1 docs: Update deprecated G_APPLICATION_FLAGS_NONE 2022-12-10 01:12:13 -06:00
Matthias Clasen
146cf0bdd4 Merge branch 'deprecate-keys-changed' into 'main'
treeview: Drop a few unused variables

See merge request GNOME/gtk!5314
2022-12-09 19:03:01 +00: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
7a50e31b8d gtk-demo: Add a GtkFileLauncher demo
Replace the deprecated app chooser button by a
button that calls gtk_file_launcher_launch.
2022-12-09 13:25:02 -05:00