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
Adds file comparison based on actual file type, rather than generic
type category. For example .jpg and .png files will now be sorted
into two different groups.
Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1776
Signed-off-by: Rajat Jain <rajatjain.ix@gmail.com>
Commit 38803058cb introduced calls to
gtk_widget_show_all(), which causes the 'Rename' button to appear prematurely
when the dialog is created. Fix this by using gtk_widget_show() instead.
Take this opportunity to modify the call when creating the app chooser dialog
too as gtk_widget_show_all() doesn't exist in GTK 4.
"Copy To" or "Move To" dialog starting from the current location.
However, if the current location is starred://, GtkFileChooserDialog
prompts an error message "The specified location is not supported".
Instead, while in the Starred location, use the actual parent of the
selected item as a starting location for the "Copy To" dialog.
Fixes: #1243
Turn potentially infinite while loops into for loops with finite
amount of repetitions. In general 1000 tries should be sufficient,
so the chosen amount of 100.000 serves as an upper limit.
See https://gitlab.gnome.org/GNOME/nautilus/-/issues/1290
Remove usage of properties that are gone in GTK4, such as border-width.
Also, move the "Pattern:" label above the entry, drop the colon and
make it bold.
Now the Ctrl+S dialog is being built using the
GtkBuilder API, Now it's styling and can be
handled in the XML UI definition. The UI definiton
needs to be handled manually as Glade doesn't handle
the implementation of the GtkDialog used here.
invoke_main_context_sync() wraps the boilerplate needed for the file
operations thread to trigger UI dialogs and wait for their feedback.
It assumes that the UI task is completed by the time the invoked
function returns. This assumption presumably stems from the expected
usage of gtk_dialog_run().
However, gtk_dialog_run() is gone in GTK 4, so we should stop making
that assumption. Let's introduce an explicit way to signal that the
task is completed, such that it can be used either before or after
the wrapped function returns.
This will enable us to drop gtk_dialog_run() later. It will also
help with https://gitlab.gnome.org/GNOME/nautilus/-/issues/1829
It's gone in GTK4.
Anything we are doing on ::destroy can be done on ::dispose().
Extra care must be taken, however, because GObject.dispose() may be
run multiple times.
Also, while we are at it, move some object unreferencing from
.finalize() to .dispose(), which is where we should do it.
GtkButton lost its GtkImage-related API in GTK4, and should be used as
a regular container.
Note #1: In x-content-bar.c, this requires using gtk_box_pack_start()
and gtk_container_add(), which must later be replaced, respectively,
by gtk_box_preopend() and gtk_button_add_child() when switching to
GTK4. However, it's worth refactoring the code in advance such that
we can simply find and replace funciton calls later.
Rebased and ammended by António Fernandes <antoniof@gnome.org>
They need to be shown by code anyway. This prepares for GTK+ 4, where
widgets are shown by default unless explicitly hidden.
Rebased and ammended by António Fernandes <antoniof@gnome.org>
Modify the dialog to be built declarartively to enhance maintainability and aid
in porting to GTK 4.
This introduces a minor UI change with the 'Replace'/'Rename' and 'Skip'
buttons swapping places, with the suggested action now the endmost button as
is standard practice.
The button has a label and always-show-image is False by default.
As a result, the image is never actually used.
It's useless and the API is going away in GTK 4 so just remove it.
Keeping with the direction of preferring declarative UI definitions.
Also, it will help with porting to GTK4.
While we are at it, adopt HdyWindow for rounded corners and make
the label not bold and allow it to wrap (to avoid making the dialog
too wide with some translations).
Changes in libportal main branch break the CI and require dependency
changes which we shouldn't make on stable branch.
(cherry picked from commit 67927cb09b)
The notification is shown when all operations are completed and Nautilus doesn't
have a focus. It says that "All file operations have been successfully completed".
This is shown also when some errors were skipped. So the word "successfully"
is a bit misleading. Let's drop that word from the notification.
Relates: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1953