Commit graph

22301 commits

Author SHA1 Message Date
Abanoub Ghadban
3b226230fd window-slot: Add file name to file not found dialog
Nautilus can show "Unable to find the requested file. Please check the
spelling and try again." error when starting. The message doesn't indicate
what file was not found. Let's add the file name to that dialog to make it
obvious.

Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1793
2021-07-09 09:52:40 +02:00
António Fernandes
a501aaf40e files-view: Make override method private
Always call the parent polimorphic method instead.
2021-07-08 20:26:35 +00:00
António Fernandes
1a0096fe4f view: Use view id macros instead of enum
The slot.files-view-mode action takes hardcoded id values. This may
break if the ids enumeration changes.

Instead, let's define the values with a macro which we can stringify.
While we are at it, drop the unused EMPTY id.
2021-07-08 20:26:35 +00:00
António Fernandes
e8147de9b0 window-slot: Make back_or_forward() a slot method
We define a NautilusWindow method in nauitlus-window-slot.c. That's
just wrong.

Also, there is no reason for this to be a NautilusWindow method,
rather than a slot one.

The only consumers are NautilusWindow and NautilusToolbar, and both
have a pointer to the current slot, so let's make this a slot method.

For convenience, also add a private NautilusWindow wrapper method.
2021-07-08 20:26:35 +00:00
António Fernandes
96f989f372 window-slot: Make type final
Last commit removed the only subclass because switching slot class is
problematic, so we probably don't want to do it again.

This partially reverts 0a512d00b6
2021-07-08 20:26:35 +00:00
António Fernandes
ad41d6f635 window-slot: Drop other-locations subclass
The NautilusOtherLocationsWindowSlot subclass has been introduced along
with its sibling NautilusDesktopWindowSlot.[0]

However, the desktop one is now gone, and this is the only subclass.
It does only 2 things differently from its parent class:

  * Creates a NautilusPlacesView instead of a NautilusFilesView
  * Disables the slot.files-view-mode-toggle and files-view-mode actions

There is little reason not to handle both things in the parent class.
Also, changing slots when going in and out of the Other Locations place
throws away the navigation data; while this can be worked around by
saving and restoring this data, this outweights any potential benefits
of subclassing.

This commit is equivalent to reverting [0], but due to code style and
other changes, a clean revert was not possible.

Effectively fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/32

[0] commit 5f295bd92c
2021-07-08 20:26:35 +00:00
Ernestas Kulik
b8ab8514c3 window-slot: Stop using flags parameter for history navigation
The feature that allows opening a new window from the history popup menu
by middle-clicking hasn’t been working for three years, since the flags
parameter in nautilus_window_back_or_forward() is not honored. In some
places it’s used inappropriately, so it’s better to just drop the code
and rethink the approach if such a feature is desirable.
2021-07-08 20:26:35 +00:00
António Fernandes
9a86aa22fd Revert "window, window-slot: Save and restore navigation history"
This reverts commit 691f1cf1bd.

It's a solid workaround, but we are going to fix the root issue.
2021-07-08 20:26:35 +00:00
Rodrigo Pedro
bf7b487eb9 toolbar: Prevent closing popover when "Show Hidden Files" is toggled
When the "Show Hidden Files" check button is toggled, the popover is closed,
however, when the "Show Sidebar" check button is toggled, the popover stays
opened. This is inconsistent and the popover should stay open in all cases.
This happens because of a bug in the `nautilus_toolbar_is_menu_visible`
function implementation, which is checking the visibility of the `view_button`
popover instead of the `app_menu` popover. Let's check the visibility of the
correct popover to fix this inconsistency.

Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1827
2021-07-08 12:26:21 +02:00
Florentina Mușat
04c9f6398d Update Romanian translation 2021-07-05 19:36:04 +00:00
Alexander Shopov
783ecffd82 Update Bulgarian translation 2021-07-04 12:56:56 +00:00
António Fernandes
1c88f37d5f Revert "window: add a signal to receive active selection updates"
This reverts commit 54d1ad250e.

This signal has been added because NautilusApplication needed to update
the previewer when selection changes. It no longer does that, since the
previous commit, so this signal is no longer needed.
2021-07-02 06:28:01 +00:00
António Fernandes
ae67618bda application: Hand preview updating over to FilesView
When the NautilusFilesView:selection property changes, this change is
notified to the slot, the the window, then the application, though a
chain of bindings and singals. The application class then calls a
NautilusFilesView method to actually update the preview.

The NautilusApplication class used to update the preview when the
active window changes, but that's no longer the case after the changes
in commit 0b7a7f95f8.

This whole roadtrip to NautilusApplication and back is useless now, so
let's handle it all in NautilusFilesView.
2021-07-02 06:28:01 +00:00
Lucas Chollet
38a7ea92b7 nautilus-properties-window.c: Display only Folder
The description of a folder in the properties dialog precise the
mime-type but it is useless for folders

Test if the mime type is not equal to "inode/directory" before
adding it to the detailed string.

https://gitlab.gnome.org/GNOME/nautilus/-/issues/1737
2021-07-01 16:57:58 +00:00
Abanoub Ghadban
1e3996d1c9 properties-window: don't focus on name field when open
When the properties window is opened, the name field get the focus automaticaly.
The user can accedentily change the file name, so let's prevent the name field from
being automaticaly selected.

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1805
2021-07-01 10:06:07 +00:00
Jakub Steiner
7932d37290 icon: add 'source'
Initiative: https://gitlab.gnome.org/Teams/Design/initiatives/-/issues/84
2021-06-29 14:35:11 +02:00
Ivan Komaritsyn
d64529a93d Update Russian translation 2021-06-25 11:52:37 +00:00
Daniel Mustieles
c9f6002239 Updated Spanish translation 2021-06-15 13:04:50 +02:00
Hugo Carvalho
940f753d15 Update Portuguese translation 2021-06-11 10:06:51 +00:00
Michael Webster
48d626cea9 nautilus-directory.c: Fix a memory leak.
When creating a new file using a template, it's possible for is_added
to be FALSE, so make sure the file is unref'd regardless.

This actually resolves an issue in caja and nemo which is caused by
files created in this manner not being finalized when no longer in use.
I can reproduce the issue with nautilus, but this *does not* fix it,
so I think that there may be an additional leak somewhere else (maybe
not related to template-created files).

To reproduce:
- Create an svg file and save in ~/Templates.
- Right-click, Create document-> svg file, name it whatever.
- Navigate out of the folder.
- Modify the file in a visible manner.
- Re-enter the folder, note that it never finishes loading.

Original report:
https://github.com/linuxmint/nemo/issues/2736
2021-06-07 18:17:58 +00:00
Ondrej Holy
fb8e0c4d41 files-view: Fix missing "Open Scripts Folder" menu item
The "Scripts" submenu used to contain "Open Scripts Folder" menu item
but it is not there currently. This is a regression in commit bd81bd89.
Let's show the menu item again.

Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1857
2021-06-04 10:45:16 +00:00
Yuri Chornoivan
e7babd906d Update Ukrainian translation 2021-06-02 16:03:19 +00:00
Alexander Mikhaylenko
1134d86886 floating-bar: Don't start spinner if it's not visible
Animating unmapped widgets can still change their size, so they have to
be measured every time. https://gitlab.gnome.org/GNOME/gtk/-/issues/1025

As a workaround, ensure the spinner doesn't animate while it's not shown,
to reduce CPU usage.
2021-06-01 19:48:15 +00:00
anton-z-s
9b7df261b1 gschema.xml: Update icon-view's description
The description was made when there was an option to set per-folder view mode.
2021-05-27 19:30:24 +00:00
Felipe Borges
0b7a7f95f8 application: Stop updating previewer on windows focus
It is a very specific corner case when the previewer (sushi) is
being used alongside multiple windows of Nautilus.

This causes a race condition when the change of active-window
notification arrives out of order with the check for the previewer
"Visible" property, making the update process loop when previewing
videos.

Fixes #1823
2021-05-26 15:12:16 +02:00
António Fernandes
59ca11451b Post branch version bump 2021-05-22 19:02:43 +01:00
Kjartan Maraas
c10cd96379 Update Norwegian Bokmål translation 2021-05-11 11:43:59 +00:00
Quentin PAGÈS
8b50a6a676 Update Occitan translation 2021-05-10 15:53:46 +00:00
Daniel Mustieles
6a98d951b9 Updated Spanish translation 2021-05-10 13:35:06 +02:00
Danial Behzadi
7fcc05dd39 Update Persian translation 2021-05-06 15:49:37 +00:00
Danial Behzadi
9f474cbe98 Update Persian translation 2021-05-06 15:24:27 +00:00
António Fernandes
3e03a8b052 files-view: Set PWD to current dir to run scripts
When running an executable text file as a program, it's reasonable to
expect that the directory currently displayed by the file browser
becomes the current working directory for that program. This used to be
handled correctly by the activation action.

While taking "Run as a Program" out of activation into a standalone
action, this behavior was left behind.

Let's add it back to the standalone action to fix the regression.

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1842
2021-05-02 00:13:27 +01:00
Ondrej Holy
7058f1e247 Post release version bump 2021-04-30 15:34:04 +02:00
Ondrej Holy
4f9ddd632f Release version 40.1 2021-04-30 15:29:56 +02:00
António Fernandes
e9e026df88 eel-vfs-extensions: Document get_extension_offset
Mostly to remember callers must be ready to handle a NULL return value,
trying to prevent more bugs like the one fixed by the previous commit.
2021-04-30 11:52:45 +01:00
António Fernandes
66e7223258 file-conflict-dialog: Fix crash on extensionless filenames
The new filename entry has the automatically suggested part of the name
selected for convenience since 9108b4028b

However, the logic for this relies on extensions offsets, causing
crashes when failing to handle the extensionless case, which is common
for folders.

So, improve the logic here to handle extensionless filenames, looking
at their length instead.

Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1841
2021-04-30 11:52:45 +01:00
Ondrej Holy
17e1cd13d5 file-operations: Return NULL if password dialog was cancelled
Currently, an empty string is passed to gnome-autoar if the archive
extraction password dialog is cancelled. This is not problem currently
as immediately the `abort_job` function is called, however, it would
be nice to return `NULL` to make obvious that the prompt dialog was
cancelled.

https://gitlab.gnome.org/GNOME/nautilus/-/merge_requests/657#note_1084750
2021-04-22 11:39:25 +00:00
Ondrej Holy
baf799dac2 file-operations: Fix crashes when extracting encrypted archives
When extracting encrypted archives, Nautilus randomly crashes when opening
the password dialog. This happens pretty often under X11, but I have
already seen a few crashes on Wayland as well. I suppose that all those
crashes are caused because the password dialog is constructed on the
extraction thread and GTK is not thread-safe. Let's modify the code to call
GTK on the main thread only to fix those crashes.

Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1825
2021-04-22 11:39:25 +00:00
Ondrej Holy
cba5beec52 gtkplacesview: Update to the latest code
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1811
2021-04-22 12:24:48 +02:00
Ondrej Holy
b3d68fbbf8 ci: Specify test dependencies to fix pipeline
The `validate-desktop`, `validate-desktop-autorun-software` and
`validate-appdata` meson tests fail currently because of the updated meson.
This is because of the recent change, which requires explicit specification
of dependencies. Let's specify them to fix the pipeline.

https://gitlab.gnome.org/GNOME/gnome-build-meta/-/issues/372
2021-04-21 10:47:58 +02:00
Dušan Kazik
3c5c9d42ac Update Slovak translation 2021-04-19 18:42:37 +00:00
António Fernandes
885de25eeb uncrustify: Enforce single space after control flow keywords
This is the style we use, but we were missing the uncrustify
configuration for it.
2021-04-19 11:20:13 +00:00
Pawan Chitrakar
b5b8823d2f Update Nepali translation 2021-04-17 09:39:57 +00:00
Ondrej Holy
ca845f2b3c flatpak: Drop network requirement
The network access is no more needed for gvfs support as it currently
uses named sockets instead of abstract ones. It is enough to allow access
to `xdg-run/gvfsd` folder, where the named sockets reside. I'm not aware
of other reasons for allowing network access. Let's drop the network
access. This also workarounds "Too many open files" errors caused by
leftover sockets (GNOME/gvfs#542).

Relates: https://gitlab.gnome.org/GNOME/gvfs/-/issues/515
2021-04-11 22:33:20 +00:00
Hugo Carvalho
222233e529 Update Portuguese translation 2021-04-08 14:31:26 +00:00
Simental Magana, Marcos
c839b586de .desktop: claim handling of rar mime types
This addition follows the logic of adding back RAR
support in gnome-autoar[1]

Closes #1813

[1] - 9356fae1a7
2021-04-03 16:53:36 -06:00
Chao-Hsiung Liao
d209007322 Update Chinese (Taiwan) translation 2021-04-03 03:17:59 +00:00
Yosef Or Boczko
34a9d36fe2 Update Hebrew translation 2021-03-28 20:47:56 +00:00
Anders Jonsson
8aabcf0d69 Update Swedish translation 2021-03-23 01:14:57 +00:00
Ondrej Holy
48b8297db6 Post release version bump 2021-03-20 09:25:42 +01:00