Commit graph

22533 commits

Author SHA1 Message Date
António Fernandes
cfdee53695 toolbar: Use list box for operations list
Using a GtkBox to display a dynamic list requires us to manually add
and remove children, relying on the GtkContainer API, gone in GTK4.

Instead, we can use GtkListBox, which we can pass a model and let
it take care of creating and disposing of children for us.

After the GTK4 switch, we should probably replace it with GtkListView
to avoid the default behaviors of GtkListBox which we are adding
workarounds for.
2021-12-06 00:24:52 +00:00
António Fernandes
57e3910e5e toolbar: Unify toolbar UI definitions
The toolbar's UI definition is split among two files because we used to
have a NautilusContainerMaxWidth between them, which is not GtkBuildable.

With out custom container gone from the toolbar, we can simplify this,
while also reduce the usage of GtkContainer API, which is gone in GTK4.
2021-12-06 00:24:52 +00:00
António Fernandes
690a03bb63 toolbar: Stop using custom max width container
We have been using NautilusMaxWidthContainer on the title widget in
order to set a size where it stops expanding and starts centering.

But we can achieve the same visual result (with default font) by
setting a the location entry's :max-width-chars to 88.

This is going to allow us to drop the custom container at a later
point, which is going to help wtih the transition to GTK4.

As a side effect, now the pathbar can grow beyond the max width if
neecessary to display more of a path. I see this as a nice bonus!
2021-12-06 00:24:52 +00:00
Aaron Jacobs
a43fb2deab extension: Allow @tip to be NULL in nautilus_menu_item_new()
Tooltips are currently unused, so it makes sense to allow NULL here, as
with the @icon parameter.
2021-12-04 20:35:25 -05:00
Aaron Jacobs
960ef5fb85 extension: Add some missing nullable annotations
I've generally verified that these are nullable by looking elsewhere in
the source.
2021-12-04 20:35:25 -05:00
Nishal Kulkarni
0dfaaaeecd extensions/image-properties: Replace deprecated functions
Build log contains deprecation warnings for gexiv2 functions.
Replaced `gexiv2_metadata_has_tag()` with
`gexiv2_metadata_try_has_tag()` and `gexiv2_metadata_get_orientation()`
with `gexiv2_metadata_try_get_orientation()`

Closes: #2033
2021-12-04 22:54:14 +00:00
Suhaas
b7b475298c src/nautilus-trash-bar.c: remove generic container
This is to prepare for the migration to GTK4.

https://gitlab.gnome.org/GNOME/nautilus/-/issues/1947
2021-12-04 22:42:17 +00:00
Fabio Tomat
9f45773097 Update Friulian translation 2021-12-03 10:56:29 +00:00
Aaron Jacobs
ecf366b58e extension: Mark backwards-compatibility typedefs as not introspectable
I believe these are only included to prevent breakage of existing C
extensions, but as they're not intended for actual use we should mark
them with `(skip)`.

This has the added benefit of making the VAPI file generated from the
resulting GIR file much less noisy.
2021-11-28 16:22:53 -05:00
Aleksandr Melman
0e7bf616f3 Update Russian translation 2021-11-28 15:24:14 +00:00
Aaron Jacobs
4309509d51 extension: Mark entry points as not introspectable
As pointed out by Emmanuele Bassi, these are not part of the ABI and
should be marked with (skip).

See: https://discourse.gnome.org/t/vala-bindings-for-an-unusual-c-ownership-function-signature/8184
2021-11-28 13:11:27 +00:00
Aaron Jacobs
068f0315bc extension: Fix annotation for modules's type list
As pointed out by Emmanuele Bassi, this should be transfer=none instead
of the present transfer=full.

See: https://discourse.gnome.org/t/vala-bindings-for-an-unusual-c-ownership-function-signature/8184
2021-11-28 13:10:14 +00:00
Nishit Patel
639eb6dd61 nautilus-search-engine: search by creation time
this will let user search for the files using the
crtime (creation time) of the files

Closes #1761
2021-11-27 11:04:53 +00:00
Daniel Mustieles
7797151a0a Updated Spanish translation 2021-11-26 18:05:45 +01:00
António Fernandes
cec92f898a progress-info-widget: Make button round again
The button currently looks like a vertical pill, not a circle.

This is a regression from a2d5dafa05

Not using the GtkButton image API apparently requires us to add the image-button style class ourselves.
2021-11-25 17:13:13 +00:00
Ernestas Kulik
8b293757e5 nautilus-search-popover.ui: Drop GtkSizeGroup:ignore-hidden
The property no longer exists, and the code acts as if it were true,
anyway.
2021-11-22 20:42:03 +00:00
Ernestas Kulik
684650c8ae general: Drop uses of gtk-timeout-expand setting
It's deprecated.

Add a hardcoded value equal to the default of gtk-timeout-expand.

Rebased and ammended by António Fernandes <antoniof@gnome.org>
2021-11-22 20:41:57 +00:00
Ernestas Kulik
b17c3f61a8 general: Don’t set xalign where unsupported
Most notably, GtkButton:xalign has been deprecated since GTK+ 3.14.
2021-11-22 20:37:38 +00:00
António Fernandes
fef7cb3dd8 properties-window: Stop using deprecated property
GtkImage:stock and GTK_STOCK_MISSING_IMAGE are deprecated.
2021-11-22 20:37:38 +00:00
Ernestas Kulik
1e010f94aa pathbar: Drop gtk_container_class_handle_border_width()
It's gone in GTK4 and removing this doesn't seem to cause any visual or
behavorial change at the moment.
2021-11-22 20:37:38 +00:00
António Fernandes
fad73c2c37 general: Stop setting GtkWidget:margin
This is also gone in GTK4, so we should set the margin for all 4 sides.

In batch-rename-dialog.ui there is a case where :margin was set to 0,
which is the default, so just remove the tag in that case.
2021-11-22 20:37:37 +00:00
Ernestas Kulik
497c16a69d general: Drop uses of GtkContainer:border-width
In preparation for porting to GTK4.

Rebased and ammeded by António Fernandes <antoniof@gnome.org>
2021-11-22 20:35:54 +00:00
António Fernandes
9d3a12c38d general: Stop using GtkBox padding, fill and expand child properties
In preparation for porting to GTK4, where child properties are no more.

Based on patch by Ernestas: d4b5c02ee9b2f1870f6b2e5e5bcf6b8d65ea2b85
2021-11-22 20:30:39 +00:00
Ernestas Kulik
67b66a4d51 tree-view-drag-dest: Stop connecting to ::draw
The "treeview-drop-indicator" style class was a thing in GTK2, but not
in GTK3. So, remove this old code which isn't even do anything visible
anymore. Also, the ::draw signal is going away when we move to GTK4.

Rebased and ammended by António Fernandes <antoniof@gnome.org>
2021-11-22 15:16:18 +00:00
Ernestas Kulik
09628b7484 pathbar: Remove event GdkWindow
This usage of GdkWindow is a X11'ism that's gone in GTK4.

Removing this doesn't seem to cause any visual or behavorial change at
the moment.

Rebased and ammended by António Fernandes <antoniof@gnome.org>
2021-11-22 15:16:18 +00:00
Ernestas Kulik
2cf73a92a1 pathbar: Drop gtk_widget_set_allocation()
It's gone in GTK4 and removing this doesn't seem to cause any visual or
behavorial change at the moment.
2021-11-22 15:16:18 +00:00
Ernestas Kulik
f717ec01ab pathbar: Drop gtk_widget_{g,s}et_clip()
It's gone in GTK4 and removing this doesn't seem to cause any visual or
behavorial change at the moment.

Originally it was a workaround to some visual problem with button
shadows. Our pathbar buttons don't have shadows nowadays, and even if
testing with added shadows, there is no apparent issue nowadays.

Rebased and ammended by António Fernandes <antoniof@gnome.org>
2021-11-22 15:16:18 +00:00
Ernestas Kulik
c56ccce791 pathbar: Drop gtk_widget_set_redraw_on_allocate()
It's gone in GTK4 [1] and doesn't seem to make a difference in GTK3.

[1] a8a755e5cd
2021-11-22 15:16:18 +00:00
António Fernandes
ad2fcd7b6d tree-view-drag-dest: Don't use gdk_window_get_position()
It's gone in GTK4.

Instead, translate to widget coordinates.
2021-11-22 15:16:18 +00:00
Ernestas Kulik
d32c24c266 files-view: Drop uses of removed GtkStyleContext API
gtk_style_context_set_junction_sides() is no more.
2021-11-22 15:16:18 +00:00
António Fernandes
be4b941ad2 autorun-software: Don't use gtk_window_set_icon()
It's gone in GTK4.

We get an icon from GMount. Assuming it's a GThemedIcon, so we can
simply get its first name and use gtk_window_set_icon_name() which is
still going to work in GTK4.
2021-11-22 15:16:18 +00:00
António Fernandes
b80d2f3234 properties-window: Don't use gtk_window_set_icon()
It's gone in GTK4.

Here it's used only as a fallback to a named icon.
Also, GNOME doesn't use window icons anyway.

So, just drop it to ease the port to GTK4.
2021-11-22 15:16:18 +00:00
Ernestas Kulik
23279d5912 icon-info: Drop gtk_icon_size_lookup()
It no longer exists, and the enumeration only contains normal and large
sizes, so hardcoded icon sizes are now used.

Rebased and ammended by António Fernandes <antoniof@gnome.org>
2021-11-22 15:16:18 +00:00
António Fernandes
243861e97b file: Pass parent window to unmount operation
It's conveniently set as a property of GtkMountOperation, so there is no
reason not to pass both forward.

This is necessary for the preceding commit to actually work as intended.
2021-11-22 15:16:18 +00:00
António Fernandes
a3126525a1 file-operations: Make "trash on unmount" dialog modal
Actually set the parent window, instead of juggling with GdkScreen,
which is going away with GdkScreen. Furthermore, parentless dialogs
should not exist, HIG-wise.

While we are at it, also remove gtk_window_set_skip_taskbar_hint()
which is going away with GTK4 too.
2021-11-22 15:16:18 +00:00
António Fernandes
77f580f577 properties-window: Stop using GtkButtonBox
It's going away with GTK4.

Replace it with a GtkBox.

This will result in visual changes to the dialog, but the existing
visuals are outdated and a redesign is overdue anyway.
2021-11-22 15:16:18 +00:00
Ernestas Kulik
0105bfb8ac files-view: Handle parent changes in GObject::notify
GtkWidget::parent-set is gone in GTK4.

Rebased and ammended by António Fernandes <antoniof@gnome.org>
2021-11-22 15:16:18 +00:00
Ernestas Kulik
cd0299b20e general: Drop gtk_window_has_toplevel_focus()
It’s identical to gtk_window_is_active() as far as we are concerned.
Also, it's gone in GTK4.
2021-11-22 15:16:18 +00:00
Ernestas Kulik
8576d45c59 files-view-dnd: Drop GDK_ACTION_DEFAULT
It’s gone in GTK4, and its use has been discouraged in GTK3.

Rebased and ammended by António Fernandes <antoniof@gnome.org>
2021-11-22 15:16:18 +00:00
António Fernandes
49ec3bd2c5 file-changes-queue: Drop GdkPoint struct member
It's unused because we no longer handle icons on desktop.
Also, the type is gone in GDK4.
2021-11-22 15:16:18 +00:00
António Fernandes
37740f0d72 general: Stop using gtk_main_iteration()
It's going away with GTK4. Use the recomended replacement.
2021-11-22 15:16:18 +00:00
Ernestas Kulik
67baf819d2 general: Replace uses of GDK thread API
We are doing all GTK stuff from the main thread anyway. If we are not,
we are in big trouble anyway.

So, drop gdk_threads* API this in preparation for GTK4, where it won't
exist.

Rebased and ammended by António Fernandes <antoniof@gnome.org>
2021-11-22 15:16:18 +00:00
Fabio Tomat
03a21f33d2 Update Friulian translation 2021-11-21 23:26:58 +00:00
Fran Dieguez
ddf023b843 Update Galician translation 2021-11-19 22:45:39 +00:00
António Fernandes
c56e90ed69 pathbar: Avoid leaking stack pages
The templates submenu in the current location popover is recreated
every time the menu model is updated, but the old widgetry is never
destroyed.

This results in a memory leak and many warnings in the terminal output.

I couldn't find the root cause, after many investigations. However,
I've found that unsetting the model actually removes the old widgetry.
Let's do that as a workaround.

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1705
2021-11-19 16:19:41 +00:00
Goran Vidović
2c65d3e5ff Update Croatian translation 2021-11-19 15:56:22 +00:00
António Fernandes
7e3dab1f52 operations-ui-manager: Port passphrase dialog to GtkBuilder
This removes usage of the GtkContainer API, preparing for GTK4.
2021-11-19 08:36:50 +01:00
Ondrej Holy
9e4e95395b file-operations: Simplify archive password dialog handling
Our AutoarExtractor::request-passphrase handler implements in invoking
the main context for the dialog from an operation thread.

This duplicates existing code that caters the same use case for the
file conflict dialog (using the `invoke_main_context_sync()` function).

Let's move the code handling of the password dialog into the
`src/nautilus-operations-ui-manager.c` file to make use of
`invoke_main_context_sync()`.

Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1829
2021-11-19 08:36:00 +01:00
Danial Behzadi
e95cb881c0 Update Persian translation 2021-11-18 22:50:35 +00:00
Quentin PAGÈS
33bd031824 Update Occitan translation 2021-11-17 18:10:05 +00:00