Compare commits
No commits in common. 'c9' and 'i8c' have entirely different histories.
@ -1 +1 @@
|
||||
SOURCES/nautilus-40.2.tar.xz
|
||||
SOURCES/nautilus-3.28.1.tar.xz
|
||||
|
@ -1 +1 @@
|
||||
c1b959b40074dd0e8e2df8289c61a3abf5fa8d5a SOURCES/nautilus-40.2.tar.xz
|
||||
f5fb5185ad922f906a22bc0aeae4cc76a243200d SOURCES/nautilus-3.28.1.tar.xz
|
||||
|
@ -0,0 +1,69 @@
|
||||
From db2b7aea67c994ba8a6e5a9ffec245b1daebcdfb Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Soriano <csoriano@redhat.com>
|
||||
Date: Mon, 6 Aug 2018 17:32:00 +0200
|
||||
Subject: [PATCH 01/11] dbus-manager: Implement trashing files
|
||||
|
||||
So desktop icons extension can use it.
|
||||
---
|
||||
data/dbus-interfaces.xml | 3 +++
|
||||
src/nautilus-dbus-manager.c | 24 ++++++++++++++++++++++++
|
||||
2 files changed, 27 insertions(+)
|
||||
|
||||
diff --git a/data/dbus-interfaces.xml b/data/dbus-interfaces.xml
|
||||
index 35fb9945b..4588762a9 100644
|
||||
--- a/data/dbus-interfaces.xml
|
||||
+++ b/data/dbus-interfaces.xml
|
||||
@@ -35,5 +35,8 @@
|
||||
<arg type='s' name='DestinationDirectoryURI' direction='in'/>
|
||||
<arg type='s' name='DestinationDisplayName' direction='in'/>
|
||||
</method>
|
||||
+ <method name='TrashFiles'>
|
||||
+ <arg type='as' name='URIs' direction='in'/>
|
||||
+ </method>
|
||||
</interface>
|
||||
</node>
|
||||
diff --git a/src/nautilus-dbus-manager.c b/src/nautilus-dbus-manager.c
|
||||
index 3611a2358..4da1c727b 100644
|
||||
--- a/src/nautilus-dbus-manager.c
|
||||
+++ b/src/nautilus-dbus-manager.c
|
||||
@@ -131,6 +131,26 @@ handle_empty_trash (NautilusDBusFileOperations *object,
|
||||
return TRUE; /* invocation was handled */
|
||||
}
|
||||
|
||||
+static gboolean
|
||||
+handle_trash_files (NautilusDBusFileOperations *object,
|
||||
+ GDBusMethodInvocation *invocation,
|
||||
+ const gchar **sources)
|
||||
+{
|
||||
+ g_autolist (GFile) source_files = NULL;
|
||||
+ gint idx;
|
||||
+
|
||||
+ for (idx = 0; sources[idx] != NULL; idx++)
|
||||
+ {
|
||||
+ source_files = g_list_prepend (source_files,
|
||||
+ g_file_new_for_uri (sources[idx]));
|
||||
+ }
|
||||
+
|
||||
+ nautilus_file_operations_trash_or_delete (source_files, NULL, NULL, NULL);
|
||||
+
|
||||
+ nautilus_dbus_file_operations_complete_trash_files (object, invocation);
|
||||
+ return TRUE; /* invocation was handled */
|
||||
+}
|
||||
+
|
||||
static void
|
||||
nautilus_dbus_manager_init (NautilusDBusManager *self)
|
||||
{
|
||||
@@ -148,6 +168,10 @@ nautilus_dbus_manager_init (NautilusDBusManager *self)
|
||||
"handle-empty-trash",
|
||||
G_CALLBACK (handle_empty_trash),
|
||||
self);
|
||||
+ g_signal_connect (self->file_operations,
|
||||
+ "handle-trash-files",
|
||||
+ G_CALLBACK (handle_trash_files),
|
||||
+ self);
|
||||
}
|
||||
|
||||
static void
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,71 @@
|
||||
From d2be99e4528759d28985246a55c9d4513e78f918 Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Soriano <csoriano@redhat.com>
|
||||
Date: Mon, 6 Aug 2018 20:11:31 +0200
|
||||
Subject: [PATCH 02/11] dbus-manager: Implement creation of new folders
|
||||
|
||||
For the integration with the desktop icons extension.
|
||||
---
|
||||
data/dbus-interfaces.xml | 3 +++
|
||||
src/nautilus-dbus-manager.c | 26 ++++++++++++++++++++++++++
|
||||
2 files changed, 29 insertions(+)
|
||||
|
||||
diff --git a/data/dbus-interfaces.xml b/data/dbus-interfaces.xml
|
||||
index 4588762a9..4e67f1393 100644
|
||||
--- a/data/dbus-interfaces.xml
|
||||
+++ b/data/dbus-interfaces.xml
|
||||
@@ -38,5 +38,8 @@
|
||||
<method name='TrashFiles'>
|
||||
<arg type='as' name='URIs' direction='in'/>
|
||||
</method>
|
||||
+ <method name='CreateFolder'>
|
||||
+ <arg type='s' name='URI' direction='in'/>
|
||||
+ </method>
|
||||
</interface>
|
||||
</node>
|
||||
diff --git a/src/nautilus-dbus-manager.c b/src/nautilus-dbus-manager.c
|
||||
index 4da1c727b..337a73262 100644
|
||||
--- a/src/nautilus-dbus-manager.c
|
||||
+++ b/src/nautilus-dbus-manager.c
|
||||
@@ -94,6 +94,28 @@ handle_copy_file (NautilusDBusFileOperations *object,
|
||||
return TRUE; /* invocation was handled */
|
||||
}
|
||||
|
||||
+static gboolean
|
||||
+handle_create_folder (NautilusDBusFileOperations *object,
|
||||
+ GDBusMethodInvocation *invocation,
|
||||
+ const gchar *uri)
|
||||
+{
|
||||
+ g_autoptr (GFile) file = NULL;
|
||||
+ g_autoptr (GFile) parent_file = NULL;
|
||||
+ g_autofree gchar *basename = NULL;
|
||||
+ g_autofree gchar *parent_file_uri = NULL;
|
||||
+
|
||||
+ file = g_file_new_for_uri (uri);
|
||||
+ basename = g_file_get_basename (file);
|
||||
+ parent_file = g_file_get_parent (file);
|
||||
+ parent_file_uri = g_file_get_uri (parent_file);
|
||||
+
|
||||
+ nautilus_file_operations_new_folder (NULL, parent_file_uri, basename,
|
||||
+ NULL, NULL);
|
||||
+
|
||||
+ nautilus_dbus_file_operations_complete_create_folder (object, invocation);
|
||||
+ return TRUE; /* invocation was handled */
|
||||
+}
|
||||
+
|
||||
static gboolean
|
||||
handle_copy_uris (NautilusDBusFileOperations *object,
|
||||
GDBusMethodInvocation *invocation,
|
||||
@@ -172,6 +194,10 @@ nautilus_dbus_manager_init (NautilusDBusManager *self)
|
||||
"handle-trash-files",
|
||||
G_CALLBACK (handle_trash_files),
|
||||
self);
|
||||
+ g_signal_connect (self->file_operations,
|
||||
+ "handle-create-folder",
|
||||
+ G_CALLBACK (handle_create_folder),
|
||||
+ self);
|
||||
}
|
||||
|
||||
static void
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,88 @@
|
||||
From 42ea37f93c134d55cd622e3e346726babaf56139 Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Soriano <csoriano@redhat.com>
|
||||
Date: Mon, 6 Aug 2018 20:12:00 +0200
|
||||
Subject: [PATCH 03/11] dbus-manager: Implement undo/redo
|
||||
|
||||
For the integration with the desktop icons extension.
|
||||
---
|
||||
data/dbus-interfaces.xml | 4 ++++
|
||||
src/nautilus-dbus-manager.c | 35 +++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 39 insertions(+)
|
||||
|
||||
diff --git a/data/dbus-interfaces.xml b/data/dbus-interfaces.xml
|
||||
index 4e67f1393..2133bb99c 100644
|
||||
--- a/data/dbus-interfaces.xml
|
||||
+++ b/data/dbus-interfaces.xml
|
||||
@@ -41,5 +41,9 @@
|
||||
<method name='CreateFolder'>
|
||||
<arg type='s' name='URI' direction='in'/>
|
||||
</method>
|
||||
+ <method name='Undo'>
|
||||
+ </method>
|
||||
+ <method name='Redo'>
|
||||
+ </method>
|
||||
</interface>
|
||||
</node>
|
||||
diff --git a/src/nautilus-dbus-manager.c b/src/nautilus-dbus-manager.c
|
||||
index 337a73262..bce6b5c4d 100644
|
||||
--- a/src/nautilus-dbus-manager.c
|
||||
+++ b/src/nautilus-dbus-manager.c
|
||||
@@ -26,6 +26,7 @@
|
||||
#include "nautilus-generated.h"
|
||||
|
||||
#include "nautilus-file-operations.h"
|
||||
+#include "nautilus-file-undo-manager.h"
|
||||
|
||||
#define DEBUG_FLAG NAUTILUS_DEBUG_DBUS
|
||||
#include "nautilus-debug.h"
|
||||
@@ -94,6 +95,32 @@ handle_copy_file (NautilusDBusFileOperations *object,
|
||||
return TRUE; /* invocation was handled */
|
||||
}
|
||||
|
||||
+static gboolean
|
||||
+handle_redo (NautilusDBusFileOperations *object,
|
||||
+ GDBusMethodInvocation *invocation)
|
||||
+{
|
||||
+ g_autoptr (NautilusFileUndoManager) undo_manager = NULL;
|
||||
+
|
||||
+ undo_manager = nautilus_file_undo_manager_get ();
|
||||
+ nautilus_file_undo_manager_redo (NULL);
|
||||
+
|
||||
+ nautilus_dbus_file_operations_complete_redo (object, invocation);
|
||||
+ return TRUE; /* invocation was handled */
|
||||
+}
|
||||
+
|
||||
+static gboolean
|
||||
+handle_undo (NautilusDBusFileOperations *object,
|
||||
+ GDBusMethodInvocation *invocation)
|
||||
+{
|
||||
+ g_autoptr (NautilusFileUndoManager) undo_manager = NULL;
|
||||
+
|
||||
+ undo_manager = nautilus_file_undo_manager_get ();
|
||||
+ nautilus_file_undo_manager_undo (NULL);
|
||||
+
|
||||
+ nautilus_dbus_file_operations_complete_undo (object, invocation);
|
||||
+ return TRUE; /* invocation was handled */
|
||||
+}
|
||||
+
|
||||
static gboolean
|
||||
handle_create_folder (NautilusDBusFileOperations *object,
|
||||
GDBusMethodInvocation *invocation,
|
||||
@@ -198,6 +225,14 @@ nautilus_dbus_manager_init (NautilusDBusManager *self)
|
||||
"handle-create-folder",
|
||||
G_CALLBACK (handle_create_folder),
|
||||
self);
|
||||
+ g_signal_connect (self->file_operations,
|
||||
+ "handle-undo",
|
||||
+ G_CALLBACK (handle_undo),
|
||||
+ self);
|
||||
+ g_signal_connect (self->file_operations,
|
||||
+ "handle-redo",
|
||||
+ G_CALLBACK (handle_redo),
|
||||
+ self);
|
||||
}
|
||||
|
||||
static void
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,46 @@
|
||||
From ef022816e3fe321d9ee9b5a2deab96ca718f7215 Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Soriano <csoriano@redhat.com>
|
||||
Date: Tue, 7 Aug 2018 10:47:28 +0200
|
||||
Subject: [PATCH 04/11] dbus-manager: Use a more robust copy operation
|
||||
|
||||
We were using the copy_file operation which seems to be quite buggy,
|
||||
Nautilus should probably drop that one soon, specially since no other
|
||||
part of Nautilus uses it.
|
||||
---
|
||||
src/nautilus-dbus-manager.c | 13 ++++---------
|
||||
1 file changed, 4 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/src/nautilus-dbus-manager.c b/src/nautilus-dbus-manager.c
|
||||
index bce6b5c4d..8135c9650 100644
|
||||
--- a/src/nautilus-dbus-manager.c
|
||||
+++ b/src/nautilus-dbus-manager.c
|
||||
@@ -150,22 +150,17 @@ handle_copy_uris (NautilusDBusFileOperations *object,
|
||||
const gchar *destination)
|
||||
{
|
||||
GList *source_files = NULL;
|
||||
- GFile *dest_dir;
|
||||
gint idx;
|
||||
|
||||
- dest_dir = g_file_new_for_uri (destination);
|
||||
-
|
||||
for (idx = 0; sources[idx] != NULL; idx++)
|
||||
{
|
||||
- source_files = g_list_prepend (source_files,
|
||||
- g_file_new_for_uri (sources[idx]));
|
||||
+ source_files = g_list_prepend (source_files, g_strdup (sources[idx]));
|
||||
}
|
||||
|
||||
- nautilus_file_operations_copy (source_files, dest_dir, NULL, NULL, NULL);
|
||||
-
|
||||
- g_list_free_full (source_files, g_object_unref);
|
||||
- g_object_unref (dest_dir);
|
||||
+ nautilus_file_operations_copy_move (source_files, destination,
|
||||
+ GDK_ACTION_COPY, NULL, NULL, NULL);
|
||||
|
||||
+ g_list_free_full (source_files, g_free);
|
||||
nautilus_dbus_file_operations_complete_copy_uris (object, invocation);
|
||||
return TRUE; /* invocation was handled */
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,88 @@
|
||||
From 32f347bd83495edf2bda746d17e613c868a7c379 Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Soriano <csoriano@redhat.com>
|
||||
Date: Tue, 7 Aug 2018 11:51:54 +0200
|
||||
Subject: [PATCH 05/11] file-operations: Don't crash if source file not present
|
||||
on creation
|
||||
|
||||
When creating a file it was checking if the file already exists, and if
|
||||
so it tried to give a new name based on the original file that was being
|
||||
duplicated from which is the case for the regular copy/paste and the
|
||||
template creation.
|
||||
|
||||
However, creating a file is not only about duplicating from another one,
|
||||
it also can come from creating a folder, that although in the UI it
|
||||
prevents doing so, it can still be done through the dbus operation.
|
||||
|
||||
Fix that by checking whether there is an actual source file, and if not,
|
||||
use the name provided as base name.
|
||||
---
|
||||
src/nautilus-file-operations.c | 36 ++++++++++++++++------------------
|
||||
1 file changed, 17 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
|
||||
index 4d84b98be..cf5e7f46b 100644
|
||||
--- a/src/nautilus-file-operations.c
|
||||
+++ b/src/nautilus-file-operations.c
|
||||
@@ -7324,20 +7324,18 @@ retry:
|
||||
{
|
||||
g_autofree char *filename2 = NULL;
|
||||
g_autofree char *suffix = NULL;
|
||||
- NautilusFile *file;
|
||||
|
||||
- file = nautilus_file_get (job->src);
|
||||
- if (nautilus_file_is_directory (file))
|
||||
- {
|
||||
- filename_base = filename;
|
||||
- }
|
||||
- else
|
||||
+ filename_base = filename;
|
||||
+ if (job->src != NULL)
|
||||
{
|
||||
- filename_base = eel_filename_strip_extension (filename);
|
||||
+ g_autoptr (NautilusFile) file = NULL;
|
||||
+ file = nautilus_file_get (job->src);
|
||||
+ if (!nautilus_file_is_directory (file))
|
||||
+ {
|
||||
+ filename_base = eel_filename_strip_extension (filename);
|
||||
+ }
|
||||
}
|
||||
|
||||
- nautilus_file_unref (file);
|
||||
-
|
||||
offset = strlen (filename_base);
|
||||
suffix = g_strdup (filename + offset);
|
||||
|
||||
@@ -7377,21 +7375,21 @@ retry:
|
||||
{
|
||||
g_autofree char *suffix = NULL;
|
||||
g_autofree gchar *filename2 = NULL;
|
||||
- NautilusFile *file;
|
||||
|
||||
g_clear_object (&dest);
|
||||
|
||||
- file = nautilus_file_get (job->src);
|
||||
- if (nautilus_file_is_directory (file))
|
||||
- {
|
||||
- filename_base = filename;
|
||||
- }
|
||||
- else
|
||||
+ filename_base = filename;
|
||||
+ if (job->src != NULL)
|
||||
{
|
||||
- filename_base = eel_filename_strip_extension (filename);
|
||||
+ g_autoptr (NautilusFile) file = NULL;
|
||||
+
|
||||
+ file = nautilus_file_get (job->src);
|
||||
+ if (!nautilus_file_is_directory (file))
|
||||
+ {
|
||||
+ filename_base = eel_filename_strip_extension (filename);
|
||||
+ }
|
||||
}
|
||||
|
||||
- nautilus_file_unref (file);
|
||||
|
||||
offset = strlen (filename_base);
|
||||
suffix = g_strdup (filename + offset);
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,359 @@
|
||||
From 965a1fb9dcd468b9fc0b87279f3a4a33b6bd635c Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Soriano <csoriano@redhat.com>
|
||||
Date: Tue, 7 Aug 2018 12:40:42 +0200
|
||||
Subject: [PATCH 06/11] properties-window: Keep alive properties window if
|
||||
called through DBus
|
||||
|
||||
The properties window can be used from within Nautilus, and therefore a
|
||||
dialog window makes sense, or from outside Nautilus, such as the
|
||||
FileManager dbus free desktop standard.
|
||||
|
||||
In the later, used for integration with things like desktop icons
|
||||
extensions, we need to keep the application alive since GApplication
|
||||
would close the application if no application window is alive after a
|
||||
timeout.
|
||||
|
||||
To fix this, this work makes the window hint a regular window if used
|
||||
from those cases.
|
||||
---
|
||||
src/nautilus-files-view.c | 6 +-
|
||||
src/nautilus-freedesktop-dbus.c | 10 ++-
|
||||
src/nautilus-pathbar.c | 3 +-
|
||||
src/nautilus-properties-window.c | 106 ++++++++++++++++++++++---------
|
||||
src/nautilus-properties-window.h | 10 ++-
|
||||
src/nautilus-window.c | 3 +-
|
||||
6 files changed, 101 insertions(+), 37 deletions(-)
|
||||
|
||||
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
|
||||
index 8aff33e25..5395390e7 100644
|
||||
--- a/src/nautilus-files-view.c
|
||||
+++ b/src/nautilus-files-view.c
|
||||
@@ -2435,14 +2435,16 @@ action_properties (GSimpleAction *action,
|
||||
{
|
||||
files = g_list_append (NULL, nautilus_file_ref (priv->directory_as_file));
|
||||
|
||||
- nautilus_properties_window_present (files, GTK_WIDGET (view), NULL);
|
||||
+ nautilus_properties_window_present (files, GTK_WIDGET (view), NULL,
|
||||
+ NULL, NULL);
|
||||
|
||||
nautilus_file_list_free (files);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
- nautilus_properties_window_present (selection, GTK_WIDGET (view), NULL);
|
||||
+ nautilus_properties_window_present (selection, GTK_WIDGET (view), NULL,
|
||||
+ NULL, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
diff --git a/src/nautilus-freedesktop-dbus.c b/src/nautilus-freedesktop-dbus.c
|
||||
index c4657aba3..b88809908 100644
|
||||
--- a/src/nautilus-freedesktop-dbus.c
|
||||
+++ b/src/nautilus-freedesktop-dbus.c
|
||||
@@ -114,6 +114,12 @@ skeleton_handle_show_folders_cb (NautilusFreedesktopFileManager1 *object,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
+static void
|
||||
+properties_window_on_finished (gpointer user_data)
|
||||
+{
|
||||
+ g_application_release (g_application_get_default ());
|
||||
+}
|
||||
+
|
||||
static gboolean
|
||||
skeleton_handle_show_item_properties_cb (NautilusFreedesktopFileManager1 *object,
|
||||
GDBusMethodInvocation *invocation,
|
||||
@@ -133,7 +139,9 @@ skeleton_handle_show_item_properties_cb (NautilusFreedesktopFileManager1 *object
|
||||
|
||||
files = g_list_reverse (files);
|
||||
|
||||
- nautilus_properties_window_present (files, NULL, startup_id);
|
||||
+ g_application_hold (g_application_get_default ());
|
||||
+ nautilus_properties_window_present (files, NULL, startup_id,
|
||||
+ properties_window_on_finished, NULL);
|
||||
|
||||
nautilus_file_list_free (files);
|
||||
|
||||
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
|
||||
index 630b8ed33..ea3d2b53f 100644
|
||||
--- a/src/nautilus-pathbar.c
|
||||
+++ b/src/nautilus-pathbar.c
|
||||
@@ -211,7 +211,8 @@ action_pathbar_properties (GSimpleAction *action,
|
||||
|
||||
files = g_list_append (NULL, nautilus_file_ref (priv->context_menu_file));
|
||||
|
||||
- nautilus_properties_window_present (files, GTK_WIDGET (self), NULL);
|
||||
+ nautilus_properties_window_present (files, GTK_WIDGET (self), NULL, NULL,
|
||||
+ NULL);
|
||||
|
||||
nautilus_file_list_free (files);
|
||||
}
|
||||
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
|
||||
index 8bd335a07..5405435cd 100644
|
||||
--- a/src/nautilus-properties-window.c
|
||||
+++ b/src/nautilus-properties-window.c
|
||||
@@ -152,6 +152,9 @@ typedef struct
|
||||
char *startup_id;
|
||||
char *pending_key;
|
||||
GHashTable *pending_files;
|
||||
+ NautilusPropertiesWindowCallback callback;
|
||||
+ gpointer callback_data;
|
||||
+ NautilusPropertiesWindow *window;
|
||||
} StartupData;
|
||||
|
||||
/* drag and drop definitions */
|
||||
@@ -197,8 +200,6 @@ static void is_directory_ready_callback (NautilusFile *file,
|
||||
gpointer data);
|
||||
static void cancel_group_change_callback (GroupChange *change);
|
||||
static void cancel_owner_change_callback (OwnerChange *change);
|
||||
-static void parent_widget_destroyed_callback (GtkWidget *widget,
|
||||
- gpointer callback_data);
|
||||
static void select_image_button_callback (GtkWidget *widget,
|
||||
NautilusPropertiesWindow *properties_window);
|
||||
static void set_icon (const char *icon_path,
|
||||
@@ -4811,12 +4812,15 @@ get_pending_key (GList *file_list)
|
||||
}
|
||||
|
||||
static StartupData *
|
||||
-startup_data_new (GList *original_files,
|
||||
- GList *target_files,
|
||||
- const char *pending_key,
|
||||
- GtkWidget *parent_widget,
|
||||
- GtkWindow *parent_window,
|
||||
- const char *startup_id)
|
||||
+startup_data_new (GList *original_files,
|
||||
+ GList *target_files,
|
||||
+ const char *pending_key,
|
||||
+ GtkWidget *parent_widget,
|
||||
+ GtkWindow *parent_window,
|
||||
+ const char *startup_id,
|
||||
+ NautilusPropertiesWindowCallback callback,
|
||||
+ gpointer callback_data,
|
||||
+ NautilusPropertiesWindow *window)
|
||||
{
|
||||
StartupData *data;
|
||||
GList *l;
|
||||
@@ -4830,6 +4834,9 @@ startup_data_new (GList *original_files,
|
||||
data->pending_key = g_strdup (pending_key);
|
||||
data->pending_files = g_hash_table_new (g_direct_hash,
|
||||
g_direct_equal);
|
||||
+ data->callback = callback;
|
||||
+ data->callback_data = callback_data;
|
||||
+ data->window = window;
|
||||
|
||||
for (l = data->target_files; l != NULL; l = l->next)
|
||||
{
|
||||
@@ -5149,7 +5156,7 @@ remove_window (NautilusPropertiesWindow *window)
|
||||
}
|
||||
}
|
||||
|
||||
-static GtkWindow *
|
||||
+static NautilusPropertiesWindow *
|
||||
get_existing_window (GList *file_list)
|
||||
{
|
||||
if (!file_list->next)
|
||||
@@ -5160,10 +5167,28 @@ get_existing_window (GList *file_list)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+static void
|
||||
+properties_window_finish (StartupData *data)
|
||||
+{
|
||||
+ if (data->parent_widget != NULL)
|
||||
+ {
|
||||
+ g_signal_handlers_disconnect_by_data (data->parent_widget,
|
||||
+ data);
|
||||
+ }
|
||||
+ if (data->window != NULL)
|
||||
+ {
|
||||
+ g_signal_handlers_disconnect_by_data (data->window,
|
||||
+ data);
|
||||
+ }
|
||||
+
|
||||
+ remove_pending (data, TRUE, TRUE, FALSE);
|
||||
+ startup_data_free (data);
|
||||
+}
|
||||
+
|
||||
static void
|
||||
cancel_create_properties_window_callback (gpointer callback_data)
|
||||
{
|
||||
- remove_pending ((StartupData *) callback_data, TRUE, FALSE, TRUE);
|
||||
+ properties_window_finish ((StartupData *) callback_data);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -5172,7 +5197,7 @@ parent_widget_destroyed_callback (GtkWidget *widget,
|
||||
{
|
||||
g_assert (widget == ((StartupData *) callback_data)->parent_widget);
|
||||
|
||||
- remove_pending ((StartupData *) callback_data, TRUE, TRUE, FALSE);
|
||||
+ properties_window_finish ((StartupData *) callback_data);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -5203,16 +5228,24 @@ remove_pending (StartupData *startup_data,
|
||||
eel_timed_wait_stop
|
||||
(cancel_create_properties_window_callback, startup_data);
|
||||
}
|
||||
- if (cancel_destroy_handler && startup_data->parent_widget)
|
||||
+ g_hash_table_remove (pending_lists, startup_data->pending_key);
|
||||
+}
|
||||
+
|
||||
+static gboolean
|
||||
+widget_on_destroy (GtkWidget *widget,
|
||||
+ gpointer user_data)
|
||||
+{
|
||||
+ StartupData *data = (StartupData *) user_data;
|
||||
+
|
||||
+
|
||||
+ if (data->callback != NULL)
|
||||
{
|
||||
- g_signal_handlers_disconnect_by_func (startup_data->parent_widget,
|
||||
- G_CALLBACK (parent_widget_destroyed_callback),
|
||||
- startup_data);
|
||||
+ data->callback (data->callback_data);
|
||||
}
|
||||
|
||||
- g_hash_table_remove (pending_lists, startup_data->pending_key);
|
||||
+ properties_window_finish (data);
|
||||
|
||||
- startup_data_free (startup_data);
|
||||
+ return GDK_EVENT_PROPAGATE;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -5232,29 +5265,34 @@ is_directory_ready_callback (NautilusFile *file,
|
||||
new_window = create_properties_window (startup_data);
|
||||
|
||||
add_window (new_window);
|
||||
+ startup_data->window = new_window;
|
||||
|
||||
remove_pending (startup_data, FALSE, TRUE, TRUE);
|
||||
|
||||
gtk_window_present (GTK_WINDOW (new_window));
|
||||
+ g_signal_connect(GTK_WIDGET (new_window), "destroy",
|
||||
+ G_CALLBACK (widget_on_destroy), startup_data);
|
||||
}
|
||||
}
|
||||
|
||||
-
|
||||
void
|
||||
-nautilus_properties_window_present (GList *original_files,
|
||||
- GtkWidget *parent_widget,
|
||||
- const gchar *startup_id)
|
||||
+nautilus_properties_window_present (GList *original_files,
|
||||
+ GtkWidget *parent_widget,
|
||||
+ const gchar *startup_id,
|
||||
+ NautilusPropertiesWindowCallback callback,
|
||||
+ gpointer callback_data)
|
||||
{
|
||||
GList *l, *next;
|
||||
- GtkWidget *parent_window;
|
||||
+ GtkWindow *parent_window;
|
||||
StartupData *startup_data;
|
||||
GList *target_files;
|
||||
- GtkWindow *existing_window;
|
||||
+ NautilusPropertiesWindow *existing_window;
|
||||
char *pending_key;
|
||||
|
||||
g_return_if_fail (original_files != NULL);
|
||||
g_return_if_fail (parent_widget == NULL || GTK_IS_WIDGET (parent_widget));
|
||||
|
||||
+
|
||||
/* Create the hash tables first time through. */
|
||||
if (windows == NULL)
|
||||
{
|
||||
@@ -5272,15 +5310,19 @@ nautilus_properties_window_present (GList *original_files,
|
||||
{
|
||||
if (parent_widget)
|
||||
{
|
||||
- gtk_window_set_screen (existing_window,
|
||||
+ gtk_window_set_screen (GTK_WINDOW (existing_window),
|
||||
gtk_widget_get_screen (parent_widget));
|
||||
}
|
||||
else if (startup_id)
|
||||
{
|
||||
- gtk_window_set_startup_id (existing_window, startup_id);
|
||||
+ gtk_window_set_startup_id (GTK_WINDOW (existing_window), startup_id);
|
||||
}
|
||||
|
||||
- gtk_window_present (existing_window);
|
||||
+ gtk_window_present (GTK_WINDOW (existing_window));
|
||||
+ startup_data = startup_data_new (NULL, NULL, NULL, NULL, NULL, NULL,
|
||||
+ callback, callback_data, existing_window);
|
||||
+ g_signal_connect(GTK_WIDGET (existing_window), "destroy",
|
||||
+ G_CALLBACK (widget_on_destroy), startup_data);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -5290,6 +5332,9 @@ nautilus_properties_window_present (GList *original_files,
|
||||
/* Look to see if we're already waiting for a window for this file. */
|
||||
if (g_hash_table_lookup (pending_lists, pending_key) != NULL)
|
||||
{
|
||||
+ /* FIXME: No callback is done if this happen. In practice, it's a quite
|
||||
+ * corner case
|
||||
+ */
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -5297,7 +5342,7 @@ nautilus_properties_window_present (GList *original_files,
|
||||
|
||||
if (parent_widget)
|
||||
{
|
||||
- parent_window = gtk_widget_get_ancestor (parent_widget, GTK_TYPE_WINDOW);
|
||||
+ parent_window = GTK_WINDOW (gtk_widget_get_ancestor (parent_widget, GTK_TYPE_WINDOW));
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -5308,8 +5353,11 @@ nautilus_properties_window_present (GList *original_files,
|
||||
target_files,
|
||||
pending_key,
|
||||
parent_widget,
|
||||
- GTK_WINDOW (parent_window),
|
||||
- startup_id);
|
||||
+ parent_window,
|
||||
+ startup_id,
|
||||
+ callback,
|
||||
+ callback_data,
|
||||
+ NULL);
|
||||
|
||||
nautilus_file_list_free (target_files);
|
||||
g_free (pending_key);
|
||||
diff --git a/src/nautilus-properties-window.h b/src/nautilus-properties-window.h
|
||||
index 9eff54c4e..e8d6a90e9 100644
|
||||
--- a/src/nautilus-properties-window.h
|
||||
+++ b/src/nautilus-properties-window.h
|
||||
@@ -59,8 +59,12 @@ typedef struct NautilusPropertiesWindowClass NautilusPropertiesWindowClass;
|
||||
|
||||
GType nautilus_properties_window_get_type (void);
|
||||
|
||||
-void nautilus_properties_window_present (GList *files,
|
||||
- GtkWidget *parent_widget,
|
||||
- const gchar *startup_id);
|
||||
+typedef void (* NautilusPropertiesWindowCallback) (gpointer callback_data);
|
||||
+
|
||||
+void nautilus_properties_window_present (GList *files,
|
||||
+ GtkWidget *parent_widget,
|
||||
+ const gchar *startup_id,
|
||||
+ NautilusPropertiesWindowCallback callback,
|
||||
+ gpointer callback_data);
|
||||
|
||||
#endif /* NAUTILUS_PROPERTIES_WINDOW_H */
|
||||
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
|
||||
index 41c4623be..a6ee4d489 100644
|
||||
--- a/src/nautilus-window.c
|
||||
+++ b/src/nautilus-window.c
|
||||
@@ -1309,7 +1309,8 @@ action_properties (GSimpleAction *action,
|
||||
file = nautilus_file_get (priv->selected_file);
|
||||
|
||||
list = g_list_append (NULL, file);
|
||||
- nautilus_properties_window_present (list, GTK_WIDGET (window), NULL);
|
||||
+ nautilus_properties_window_present (list, GTK_WIDGET (window), NULL, NULL,
|
||||
+ NULL);
|
||||
nautilus_file_list_free (list);
|
||||
|
||||
g_clear_object (&priv->selected_file);
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,149 @@
|
||||
From 80b807d9e52fdc3e5e0af5a2d4dd61fdb0a39bc8 Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Soriano <csoriano@redhat.com>
|
||||
Date: Tue, 7 Aug 2018 21:08:21 +0200
|
||||
Subject: [PATCH 07/11] dbus-manager: Keep application alive for operations
|
||||
|
||||
Operations started from Nautilus windows have the persistence handler,
|
||||
however, when not using windows like when invoked through DBus the
|
||||
application could die after a timeout.
|
||||
|
||||
This would stop the operation in the middle of its process, with
|
||||
possible data loss.
|
||||
|
||||
Make sure we keep the application alive while this is happening.
|
||||
---
|
||||
src/nautilus-dbus-manager.c | 55 +++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 52 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/nautilus-dbus-manager.c b/src/nautilus-dbus-manager.c
|
||||
index 8135c9650..0d5137292 100644
|
||||
--- a/src/nautilus-dbus-manager.c
|
||||
+++ b/src/nautilus-dbus-manager.c
|
||||
@@ -95,13 +95,29 @@ handle_copy_file (NautilusDBusFileOperations *object,
|
||||
return TRUE; /* invocation was handled */
|
||||
}
|
||||
|
||||
+static void
|
||||
+undo_redo_on_finished (gpointer user_data)
|
||||
+{
|
||||
+ g_autoptr (NautilusFileUndoManager) undo_manager = NULL;
|
||||
+ int *handler_id = (int *) user_data;
|
||||
+
|
||||
+ undo_manager = nautilus_file_undo_manager_get ();
|
||||
+ g_signal_handler_disconnect (undo_manager, *handler_id);
|
||||
+ g_application_release (g_application_get_default ());
|
||||
+ g_free (handler_id);
|
||||
+}
|
||||
+
|
||||
static gboolean
|
||||
handle_redo (NautilusDBusFileOperations *object,
|
||||
GDBusMethodInvocation *invocation)
|
||||
{
|
||||
g_autoptr (NautilusFileUndoManager) undo_manager = NULL;
|
||||
+ gint *handler_id = g_new0(int, 1);
|
||||
|
||||
undo_manager = nautilus_file_undo_manager_get ();
|
||||
+ *handler_id = g_signal_connect_swapped (undo_manager, "undo-changed",
|
||||
+ G_CALLBACK (undo_redo_on_finished),
|
||||
+ handler_id);
|
||||
nautilus_file_undo_manager_redo (NULL);
|
||||
|
||||
nautilus_dbus_file_operations_complete_redo (object, invocation);
|
||||
@@ -113,14 +129,26 @@ handle_undo (NautilusDBusFileOperations *object,
|
||||
GDBusMethodInvocation *invocation)
|
||||
{
|
||||
g_autoptr (NautilusFileUndoManager) undo_manager = NULL;
|
||||
+ gint *handler_id = g_new0(int, 1);
|
||||
|
||||
undo_manager = nautilus_file_undo_manager_get ();
|
||||
+ *handler_id = g_signal_connect_swapped (undo_manager, "undo-changed",
|
||||
+ G_CALLBACK (undo_redo_on_finished),
|
||||
+ handler_id);
|
||||
nautilus_file_undo_manager_undo (NULL);
|
||||
|
||||
nautilus_dbus_file_operations_complete_undo (object, invocation);
|
||||
return TRUE; /* invocation was handled */
|
||||
}
|
||||
|
||||
+static void
|
||||
+create_folder_on_finished (GFile *new_file,
|
||||
+ gboolean success,
|
||||
+ gpointer callback_data)
|
||||
+{
|
||||
+ g_application_release (g_application_get_default ());
|
||||
+}
|
||||
+
|
||||
static gboolean
|
||||
handle_create_folder (NautilusDBusFileOperations *object,
|
||||
GDBusMethodInvocation *invocation,
|
||||
@@ -136,13 +164,22 @@ handle_create_folder (NautilusDBusFileOperations *object,
|
||||
parent_file = g_file_get_parent (file);
|
||||
parent_file_uri = g_file_get_uri (parent_file);
|
||||
|
||||
+ g_application_hold (g_application_get_default ());
|
||||
nautilus_file_operations_new_folder (NULL, parent_file_uri, basename,
|
||||
- NULL, NULL);
|
||||
+ create_folder_on_finished, NULL);
|
||||
|
||||
nautilus_dbus_file_operations_complete_create_folder (object, invocation);
|
||||
return TRUE; /* invocation was handled */
|
||||
}
|
||||
|
||||
+static void
|
||||
+copy_on_finished (GHashTable *debutting_uris,
|
||||
+ gboolean success,
|
||||
+ gpointer callback_data)
|
||||
+{
|
||||
+ g_application_release (g_application_get_default ());
|
||||
+}
|
||||
+
|
||||
static gboolean
|
||||
handle_copy_uris (NautilusDBusFileOperations *object,
|
||||
GDBusMethodInvocation *invocation,
|
||||
@@ -157,14 +194,16 @@ handle_copy_uris (NautilusDBusFileOperations *object,
|
||||
source_files = g_list_prepend (source_files, g_strdup (sources[idx]));
|
||||
}
|
||||
|
||||
+ g_application_hold (g_application_get_default ());
|
||||
nautilus_file_operations_copy_move (source_files, destination,
|
||||
- GDK_ACTION_COPY, NULL, NULL, NULL);
|
||||
+ GDK_ACTION_COPY, NULL, copy_on_finished, NULL);
|
||||
|
||||
g_list_free_full (source_files, g_free);
|
||||
nautilus_dbus_file_operations_complete_copy_uris (object, invocation);
|
||||
return TRUE; /* invocation was handled */
|
||||
}
|
||||
|
||||
+/* FIXME: Needs a callback for maintaining alive the application */
|
||||
static gboolean
|
||||
handle_empty_trash (NautilusDBusFileOperations *object,
|
||||
GDBusMethodInvocation *invocation)
|
||||
@@ -175,6 +214,14 @@ handle_empty_trash (NautilusDBusFileOperations *object,
|
||||
return TRUE; /* invocation was handled */
|
||||
}
|
||||
|
||||
+static void
|
||||
+trash_on_finished (GHashTable *debutting_uris,
|
||||
+ gboolean user_cancel,
|
||||
+ gpointer callback_data)
|
||||
+{
|
||||
+ g_application_release (g_application_get_default ());
|
||||
+}
|
||||
+
|
||||
static gboolean
|
||||
handle_trash_files (NautilusDBusFileOperations *object,
|
||||
GDBusMethodInvocation *invocation,
|
||||
@@ -189,7 +236,9 @@ handle_trash_files (NautilusDBusFileOperations *object,
|
||||
g_file_new_for_uri (sources[idx]));
|
||||
}
|
||||
|
||||
- nautilus_file_operations_trash_or_delete (source_files, NULL, NULL, NULL);
|
||||
+ g_application_hold (g_application_get_default ());
|
||||
+ nautilus_file_operations_trash_or_delete (source_files, NULL,
|
||||
+ trash_on_finished, NULL);
|
||||
|
||||
nautilus_dbus_file_operations_complete_trash_files (object, invocation);
|
||||
return TRUE; /* invocation was handled */
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,209 @@
|
||||
From 474ed07f64df1381440b8692d7d500d26014c618 Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Soriano <csoriano@redhat.com>
|
||||
Date: Tue, 7 Aug 2018 21:25:01 +0200
|
||||
Subject: [PATCH 08/11] dbus-manager: Drop copy file operation
|
||||
|
||||
It was truly unreliable and not working clearly. We have a more powerful
|
||||
and simpler API with CopyURIs, so there is no point to have this one.
|
||||
|
||||
This commits drops the DBus API. Note that the DBus version is not
|
||||
bumped, I believe this DBus API is not used by any external service
|
||||
given how broken was it.
|
||||
---
|
||||
data/dbus-interfaces.xml | 6 ---
|
||||
src/nautilus-dbus-manager.c | 69 ++++++++++++++--------------------
|
||||
src/nautilus-file-operations.c | 41 --------------------
|
||||
src/nautilus-file-operations.h | 7 ----
|
||||
4 files changed, 29 insertions(+), 94 deletions(-)
|
||||
|
||||
diff --git a/data/dbus-interfaces.xml b/data/dbus-interfaces.xml
|
||||
index 2133bb99c..20ffadde1 100644
|
||||
--- a/data/dbus-interfaces.xml
|
||||
+++ b/data/dbus-interfaces.xml
|
||||
@@ -29,12 +29,6 @@
|
||||
</method>
|
||||
<method name='EmptyTrash'>
|
||||
</method>"
|
||||
- <method name='CopyFile'>
|
||||
- <arg type='s' name='SourceFileURI' direction='in'/>
|
||||
- <arg type='s' name='SourceDisplayName' direction='in'/>
|
||||
- <arg type='s' name='DestinationDirectoryURI' direction='in'/>
|
||||
- <arg type='s' name='DestinationDisplayName' direction='in'/>
|
||||
- </method>
|
||||
<method name='TrashFiles'>
|
||||
<arg type='as' name='URIs' direction='in'/>
|
||||
</method>
|
||||
diff --git a/src/nautilus-dbus-manager.c b/src/nautilus-dbus-manager.c
|
||||
index 0d5137292..1ac6e12c2 100644
|
||||
--- a/src/nautilus-dbus-manager.c
|
||||
+++ b/src/nautilus-dbus-manager.c
|
||||
@@ -61,40 +61,6 @@ nautilus_dbus_manager_dispose (GObject *object)
|
||||
G_OBJECT_CLASS (nautilus_dbus_manager_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
-static gboolean
|
||||
-handle_copy_file (NautilusDBusFileOperations *object,
|
||||
- GDBusMethodInvocation *invocation,
|
||||
- const gchar *source_uri,
|
||||
- const gchar *source_display_name,
|
||||
- const gchar *dest_dir_uri,
|
||||
- const gchar *dest_name)
|
||||
-{
|
||||
- GFile *source_file, *target_dir;
|
||||
- const gchar *target_name = NULL, *source_name = NULL;
|
||||
-
|
||||
- source_file = g_file_new_for_uri (source_uri);
|
||||
- target_dir = g_file_new_for_uri (dest_dir_uri);
|
||||
-
|
||||
- if (dest_name != NULL && dest_name[0] != '\0')
|
||||
- {
|
||||
- target_name = dest_name;
|
||||
- }
|
||||
-
|
||||
- if (source_display_name != NULL && source_display_name[0] != '\0')
|
||||
- {
|
||||
- source_name = source_display_name;
|
||||
- }
|
||||
-
|
||||
- nautilus_file_operations_copy_file (source_file, target_dir, source_name, target_name,
|
||||
- NULL, NULL, NULL);
|
||||
-
|
||||
- g_object_unref (source_file);
|
||||
- g_object_unref (target_dir);
|
||||
-
|
||||
- nautilus_dbus_file_operations_complete_copy_file (object, invocation);
|
||||
- return TRUE; /* invocation was handled */
|
||||
-}
|
||||
-
|
||||
static void
|
||||
undo_redo_on_finished (gpointer user_data)
|
||||
{
|
||||
@@ -173,9 +139,9 @@ handle_create_folder (NautilusDBusFileOperations *object,
|
||||
}
|
||||
|
||||
static void
|
||||
-copy_on_finished (GHashTable *debutting_uris,
|
||||
- gboolean success,
|
||||
- gpointer callback_data)
|
||||
+copy_move_on_finished (GHashTable *debutting_uris,
|
||||
+ gboolean success,
|
||||
+ gpointer callback_data)
|
||||
{
|
||||
g_application_release (g_application_get_default ());
|
||||
}
|
||||
@@ -196,7 +162,30 @@ handle_copy_uris (NautilusDBusFileOperations *object,
|
||||
|
||||
g_application_hold (g_application_get_default ());
|
||||
nautilus_file_operations_copy_move (source_files, destination,
|
||||
- GDK_ACTION_COPY, NULL, copy_on_finished, NULL);
|
||||
+ GDK_ACTION_COPY, NULL, copy_move_on_finished, NULL);
|
||||
+
|
||||
+ g_list_free_full (source_files, g_free);
|
||||
+ nautilus_dbus_file_operations_complete_copy_uris (object, invocation);
|
||||
+ return TRUE; /* invocation was handled */
|
||||
+}
|
||||
+
|
||||
+static gboolean
|
||||
+handle_move_uris (NautilusDBusFileOperations *object,
|
||||
+ GDBusMethodInvocation *invocation,
|
||||
+ const gchar **sources,
|
||||
+ const gchar *destination)
|
||||
+{
|
||||
+ GList *source_files = NULL;
|
||||
+ gint idx;
|
||||
+
|
||||
+ for (idx = 0; sources[idx] != NULL; idx++)
|
||||
+ {
|
||||
+ source_files = g_list_prepend (source_files, g_strdup (sources[idx]));
|
||||
+ }
|
||||
+
|
||||
+ g_application_hold (g_application_get_default ());
|
||||
+ nautilus_file_operations_copy_move (source_files, destination,
|
||||
+ GDK_ACTION_MOVE, NULL, copy_move_on_finished, NULL);
|
||||
|
||||
g_list_free_full (source_files, g_free);
|
||||
nautilus_dbus_file_operations_complete_copy_uris (object, invocation);
|
||||
@@ -254,8 +243,8 @@ nautilus_dbus_manager_init (NautilusDBusManager *self)
|
||||
G_CALLBACK (handle_copy_uris),
|
||||
self);
|
||||
g_signal_connect (self->file_operations,
|
||||
- "handle-copy-file",
|
||||
- G_CALLBACK (handle_copy_file),
|
||||
+ "handle-move-uris",
|
||||
+ G_CALLBACK (handle_move_uris),
|
||||
self);
|
||||
g_signal_connect (self->file_operations,
|
||||
"handle-empty-trash",
|
||||
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
|
||||
index cf5e7f46b..e306e7eff 100644
|
||||
--- a/src/nautilus-file-operations.c
|
||||
+++ b/src/nautilus-file-operations.c
|
||||
@@ -5705,47 +5705,6 @@ copy_task_thread_func (GTask *task,
|
||||
&source_info, &transfer_info);
|
||||
}
|
||||
|
||||
-void
|
||||
-nautilus_file_operations_copy_file (GFile *source_file,
|
||||
- GFile *target_dir,
|
||||
- const gchar *source_display_name,
|
||||
- const gchar *new_name,
|
||||
- GtkWindow *parent_window,
|
||||
- NautilusCopyCallback done_callback,
|
||||
- gpointer done_callback_data)
|
||||
-{
|
||||
- GTask *task;
|
||||
- CopyMoveJob *job;
|
||||
-
|
||||
- job = op_job_new (CopyMoveJob, parent_window);
|
||||
- job->done_callback = done_callback;
|
||||
- job->done_callback_data = done_callback_data;
|
||||
- job->files = g_list_append (NULL, g_object_ref (source_file));
|
||||
- job->destination = g_object_ref (target_dir);
|
||||
- /* Need to indicate the destination for the operation notification open
|
||||
- * button. */
|
||||
- nautilus_progress_info_set_destination (((CommonJob *) job)->progress, target_dir);
|
||||
- job->target_name = g_strdup (new_name);
|
||||
- job->debuting_files = g_hash_table_new_full (g_file_hash, (GEqualFunc) g_file_equal, g_object_unref, NULL);
|
||||
-
|
||||
- if (source_display_name != NULL)
|
||||
- {
|
||||
- gchar *path;
|
||||
-
|
||||
- path = g_build_filename ("/", source_display_name, NULL);
|
||||
- job->fake_display_source = g_file_new_for_path (path);
|
||||
-
|
||||
- g_free (path);
|
||||
- }
|
||||
-
|
||||
- inhibit_power_manager ((CommonJob *) job, _("Copying Files"));
|
||||
-
|
||||
- task = g_task_new (NULL, job->common.cancellable, copy_task_done, job);
|
||||
- g_task_set_task_data (task, job, NULL);
|
||||
- g_task_run_in_thread (task, copy_task_thread_func);
|
||||
- g_object_unref (task);
|
||||
-}
|
||||
-
|
||||
void
|
||||
nautilus_file_operations_copy (GList *files,
|
||||
GFile *target_dir,
|
||||
diff --git a/src/nautilus-file-operations.h b/src/nautilus-file-operations.h
|
||||
index e8c6ed393..2a9c6a6a0 100644
|
||||
--- a/src/nautilus-file-operations.h
|
||||
+++ b/src/nautilus-file-operations.h
|
||||
@@ -57,13 +57,6 @@ void nautilus_file_operations_copy_move (const GList *item_uris,
|
||||
GtkWidget *parent_view,
|
||||
NautilusCopyCallback done_callback,
|
||||
gpointer done_callback_data);
|
||||
-void nautilus_file_operations_copy_file (GFile *source_file,
|
||||
- GFile *target_dir,
|
||||
- const gchar *source_display_name,
|
||||
- const gchar *new_name,
|
||||
- GtkWindow *parent_window,
|
||||
- NautilusCopyCallback done_callback,
|
||||
- gpointer done_callback_data);
|
||||
void nautilus_file_operations_empty_trash (GtkWidget *parent_view);
|
||||
void nautilus_file_operations_new_folder (GtkWidget *parent_view,
|
||||
const char *parent_dir_uri,
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,28 @@
|
||||
From 60ba10283b631f08bd7e763a63a1a8e048b66379 Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Soriano <csoriano@gnome.org>
|
||||
Date: Wed, 8 Aug 2018 14:07:48 +0200
|
||||
Subject: [PATCH 09/11] dbus: Implement move operation
|
||||
|
||||
Analog to the copy operation.
|
||||
---
|
||||
data/dbus-interfaces.xml | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/data/dbus-interfaces.xml b/data/dbus-interfaces.xml
|
||||
index 20ffadde1..64176225c 100644
|
||||
--- a/data/dbus-interfaces.xml
|
||||
+++ b/data/dbus-interfaces.xml
|
||||
@@ -27,6 +27,10 @@
|
||||
<arg type='as' name='SourceFilesURIList' direction='in'/>
|
||||
<arg type='s' name='DestinationDirectoryURI' direction='in'/>
|
||||
</method>
|
||||
+ <method name='MoveURIs'>
|
||||
+ <arg type='as' name='SourceFilesURIList' direction='in'/>
|
||||
+ <arg type='s' name='DestinationDirectoryURI' direction='in'/>
|
||||
+ </method>
|
||||
<method name='EmptyTrash'>
|
||||
</method>"
|
||||
<method name='TrashFiles'>
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,45 @@
|
||||
From 7cea30b7357cf246cbab67e895c90ebb5cc6a772 Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Soriano <csoriano@gnome.org>
|
||||
Date: Wed, 8 Aug 2018 14:32:00 +0200
|
||||
Subject: [PATCH 10/11] dbus-manager: Fix double free
|
||||
|
||||
nautilus_undo_manager_get doesn't return a new reference, so we
|
||||
shouldn't use g_autoptr.
|
||||
---
|
||||
src/nautilus-dbus-manager.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/nautilus-dbus-manager.c b/src/nautilus-dbus-manager.c
|
||||
index 1ac6e12c2..728b1dea2 100644
|
||||
--- a/src/nautilus-dbus-manager.c
|
||||
+++ b/src/nautilus-dbus-manager.c
|
||||
@@ -64,7 +64,7 @@ nautilus_dbus_manager_dispose (GObject *object)
|
||||
static void
|
||||
undo_redo_on_finished (gpointer user_data)
|
||||
{
|
||||
- g_autoptr (NautilusFileUndoManager) undo_manager = NULL;
|
||||
+ NautilusFileUndoManager *undo_manager = NULL;
|
||||
int *handler_id = (int *) user_data;
|
||||
|
||||
undo_manager = nautilus_file_undo_manager_get ();
|
||||
@@ -77,7 +77,7 @@ static gboolean
|
||||
handle_redo (NautilusDBusFileOperations *object,
|
||||
GDBusMethodInvocation *invocation)
|
||||
{
|
||||
- g_autoptr (NautilusFileUndoManager) undo_manager = NULL;
|
||||
+ NautilusFileUndoManager *undo_manager = NULL;
|
||||
gint *handler_id = g_new0(int, 1);
|
||||
|
||||
undo_manager = nautilus_file_undo_manager_get ();
|
||||
@@ -94,7 +94,7 @@ static gboolean
|
||||
handle_undo (NautilusDBusFileOperations *object,
|
||||
GDBusMethodInvocation *invocation)
|
||||
{
|
||||
- g_autoptr (NautilusFileUndoManager) undo_manager = NULL;
|
||||
+ NautilusFileUndoManager *undo_manager = NULL;
|
||||
gint *handler_id = g_new0(int, 1);
|
||||
|
||||
undo_manager = nautilus_file_undo_manager_get ();
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,36 @@
|
||||
From 12fa036ee7689774cfdf941ae7fda04d18d34ae8 Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Soriano <csoriano@gnome.org>
|
||||
Date: Wed, 8 Aug 2018 14:32:56 +0200
|
||||
Subject: [PATCH 11/11] dbus-manager: Fix not holding application
|
||||
|
||||
The code was releasing it on the callback but forgot to put the hold
|
||||
on the initial call.
|
||||
---
|
||||
src/nautilus-dbus-manager.c | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/src/nautilus-dbus-manager.c b/src/nautilus-dbus-manager.c
|
||||
index 728b1dea2..f11ede0ad 100644
|
||||
--- a/src/nautilus-dbus-manager.c
|
||||
+++ b/src/nautilus-dbus-manager.c
|
||||
@@ -80,6 +80,8 @@ handle_redo (NautilusDBusFileOperations *object,
|
||||
NautilusFileUndoManager *undo_manager = NULL;
|
||||
gint *handler_id = g_new0(int, 1);
|
||||
|
||||
+ g_application_hold (g_application_get_default ());
|
||||
+
|
||||
undo_manager = nautilus_file_undo_manager_get ();
|
||||
*handler_id = g_signal_connect_swapped (undo_manager, "undo-changed",
|
||||
G_CALLBACK (undo_redo_on_finished),
|
||||
@@ -97,6 +99,8 @@ handle_undo (NautilusDBusFileOperations *object,
|
||||
NautilusFileUndoManager *undo_manager = NULL;
|
||||
gint *handler_id = g_new0(int, 1);
|
||||
|
||||
+ g_application_hold (g_application_get_default ());
|
||||
+
|
||||
undo_manager = nautilus_file_undo_manager_get ();
|
||||
*handler_id = g_signal_connect_swapped (undo_manager, "undo-changed",
|
||||
G_CALLBACK (undo_redo_on_finished),
|
||||
--
|
||||
2.17.1
|
||||
|
@ -0,0 +1,552 @@
|
||||
From 228971be31f92625f641531e1b78b8c8e63677b0 Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Soriano <csoriano@redhat.com>
|
||||
Date: Tue, 31 Jul 2018 22:10:03 +0200
|
||||
Subject: [PATCH] clipboard: Use text based clipboard only
|
||||
|
||||
---
|
||||
src/nautilus-canvas-view.c | 13 ++++++-------
|
||||
src/nautilus-clipboard.c | 113 ++++++++++++++++++++++++++++++++++++++++++++++++++++++-----------------------------------------------------------
|
||||
src/nautilus-clipboard.h | 5 +++--
|
||||
src/nautilus-files-view.c | 112 +++++++++++++++++++++++++++++++++-------------------------------------------------------------------------------
|
||||
src/nautilus-list-view.c | 13 ++++++-------
|
||||
5 files changed, 102 insertions(+), 154 deletions(-)
|
||||
|
||||
diff --git a/src/nautilus-canvas-view.c b/src/nautilus-canvas-view.c
|
||||
index f99ddd9..7de0808 100644
|
||||
--- a/src/nautilus-canvas-view.c
|
||||
+++ b/src/nautilus-canvas-view.c
|
||||
@@ -549,9 +549,9 @@ nautilus_canvas_view_begin_loading (NautilusFilesView *view)
|
||||
}
|
||||
|
||||
static void
|
||||
-on_clipboard_contents_received (GtkClipboard *clipboard,
|
||||
- GtkSelectionData *selection_data,
|
||||
- gpointer user_data)
|
||||
+on_clipboard_contents_received (GtkClipboard *clipboard,
|
||||
+ const gchar *selection_data,
|
||||
+ gpointer user_data)
|
||||
{
|
||||
NautilusCanvasView *canvas_view;
|
||||
|
||||
@@ -590,10 +590,9 @@ static void
|
||||
update_clipboard_status (NautilusCanvasView *view)
|
||||
{
|
||||
g_object_ref (view); /* Need to keep the object alive until we get the reply */
|
||||
- gtk_clipboard_request_contents (nautilus_clipboard_get (GTK_WIDGET (view)),
|
||||
- nautilus_clipboard_get_atom (),
|
||||
- on_clipboard_contents_received,
|
||||
- view);
|
||||
+ gtk_clipboard_request_text (nautilus_clipboard_get (GTK_WIDGET (view)),
|
||||
+ on_clipboard_contents_received,
|
||||
+ view);
|
||||
}
|
||||
|
||||
static void
|
||||
diff --git a/src/nautilus-clipboard.c b/src/nautilus-clipboard.c
|
||||
index 267d7a3..752ff13 100644
|
||||
--- a/src/nautilus-clipboard.c
|
||||
+++ b/src/nautilus-clipboard.c
|
||||
@@ -33,30 +33,32 @@
|
||||
#include <gtk/gtk.h>
|
||||
#include <string.h>
|
||||
|
||||
-static GdkAtom copied_files_atom;
|
||||
-
|
||||
typedef struct
|
||||
{
|
||||
gboolean cut;
|
||||
GList *files;
|
||||
} ClipboardInfo;
|
||||
|
||||
static GList *
|
||||
-convert_lines_to_str_list (char **lines)
|
||||
+convert_selection_data_to_str_list (const gchar *data)
|
||||
{
|
||||
int i;
|
||||
GList *result;
|
||||
+ size_t number_of_lines;
|
||||
+ gchar **lines;
|
||||
|
||||
- if (lines[0] == NULL)
|
||||
- {
|
||||
- return NULL;
|
||||
- }
|
||||
-
|
||||
+ lines = g_strsplit (data, "\n", 0);
|
||||
result = NULL;
|
||||
- for (i = 0; lines[i] != NULL; i++)
|
||||
+ number_of_lines = g_strv_length (lines);
|
||||
+ /* Also, this skips the last line, since it would be an
|
||||
+ * empty string from the split */
|
||||
+ for (i = 0; i < number_of_lines - 1; i++)
|
||||
{
|
||||
result = g_list_prepend (result, g_strdup (lines[i]));
|
||||
}
|
||||
+
|
||||
+ g_strfreev (lines);
|
||||
+
|
||||
return g_list_reverse (result);
|
||||
}
|
||||
|
||||
@@ -77,7 +79,8 @@ convert_file_list_to_string (ClipboardInfo *info,
|
||||
}
|
||||
else
|
||||
{
|
||||
- uris = g_string_new (info->cut ? "cut" : "copy");
|
||||
+ uris = g_string_new ("x-special/nautilus-clipboard\n");
|
||||
+ g_string_append (uris, info->cut ? "cut\n" : "copy\n");
|
||||
}
|
||||
|
||||
for (i = 0, l = info->files; l != NULL; l = l->next, i++)
|
||||
@@ -100,16 +103,12 @@ convert_file_list_to_string (ClipboardInfo *info,
|
||||
g_string_append (uris, uri);
|
||||
}
|
||||
|
||||
- /* skip newline for last element */
|
||||
- if (i + 1 < g_list_length (info->files))
|
||||
- {
|
||||
- g_string_append_c (uris, '\n');
|
||||
- }
|
||||
+ g_string_append_c (uris, '\n');
|
||||
}
|
||||
else
|
||||
{
|
||||
- g_string_append_c (uris, '\n');
|
||||
g_string_append (uris, uri);
|
||||
+ g_string_append_c (uris, '\n');
|
||||
}
|
||||
|
||||
g_free (uri);
|
||||
@@ -120,43 +119,60 @@ convert_file_list_to_string (ClipboardInfo *info,
|
||||
}
|
||||
|
||||
static GList *
|
||||
-get_item_list_from_selection_data (GtkSelectionData *selection_data)
|
||||
+get_item_list_from_selection_data (const gchar *selection_data)
|
||||
{
|
||||
- GList *items;
|
||||
- char **lines;
|
||||
+ GList *items = NULL;
|
||||
|
||||
- if (gtk_selection_data_get_data_type (selection_data) != copied_files_atom
|
||||
- || gtk_selection_data_get_length (selection_data) <= 0)
|
||||
+ if (selection_data != NULL)
|
||||
{
|
||||
- items = NULL;
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- gchar *data;
|
||||
+ gboolean valid_data = TRUE;
|
||||
/* Not sure why it's legal to assume there's an extra byte
|
||||
* past the end of the selection data that it's safe to write
|
||||
* to. But gtk_editable_selection_received does this, so I
|
||||
* think it is OK.
|
||||
*/
|
||||
- data = (gchar *) gtk_selection_data_get_data (selection_data);
|
||||
- data[gtk_selection_data_get_length (selection_data)] = '\0';
|
||||
- lines = g_strsplit (data, "\n", 0);
|
||||
- items = convert_lines_to_str_list (lines);
|
||||
- g_strfreev (lines);
|
||||
+ items = convert_selection_data_to_str_list (selection_data);
|
||||
+ if (items == NULL || g_strcmp0 (items->data, "x-special/nautilus-clipboard") != 0)
|
||||
+ {
|
||||
+ valid_data = FALSE;
|
||||
+ }
|
||||
+ else if (items->next == NULL)
|
||||
+ {
|
||||
+ valid_data = FALSE;
|
||||
+ }
|
||||
+ else if (g_strcmp0 (items->next->data, "cut") != 0 &&
|
||||
+ g_strcmp0 (items->next->data, "copy") != 0)
|
||||
+ {
|
||||
+ valid_data = FALSE;
|
||||
+ }
|
||||
+
|
||||
+ if (!valid_data)
|
||||
+ {
|
||||
+ g_list_free_full (items, g_free);
|
||||
+ items = NULL;
|
||||
+ }
|
||||
}
|
||||
|
||||
return items;
|
||||
}
|
||||
|
||||
+gboolean
|
||||
+nautilus_clipboard_is_data_valid_from_selection_data (const gchar *selection_data)
|
||||
+{
|
||||
+ return nautilus_clipboard_get_uri_list_from_selection_data (selection_data) != NULL;
|
||||
+}
|
||||
+
|
||||
GList *
|
||||
-nautilus_clipboard_get_uri_list_from_selection_data (GtkSelectionData *selection_data)
|
||||
+nautilus_clipboard_get_uri_list_from_selection_data (const gchar *selection_data)
|
||||
{
|
||||
GList *items;
|
||||
|
||||
items = get_item_list_from_selection_data (selection_data);
|
||||
if (items)
|
||||
{
|
||||
- /* Line 0 is "cut" or "copy", so uris start at line 1. */
|
||||
+ /* Line 0 is x-special/nautilus-clipboard. */
|
||||
+ items = g_list_remove (items, items->data);
|
||||
+ /* Line 1 is "cut" or "copy", so uris start at line 2. */
|
||||
items = g_list_remove (items, items->data);
|
||||
}
|
||||
|
||||
@@ -174,13 +190,12 @@ void
|
||||
nautilus_clipboard_clear_if_colliding_uris (GtkWidget *widget,
|
||||
const GList *item_uris)
|
||||
{
|
||||
- GtkSelectionData *data;
|
||||
+ g_autofree gchar *data = NULL;
|
||||
GList *clipboard_item_uris, *l;
|
||||
gboolean collision;
|
||||
|
||||
collision = FALSE;
|
||||
- data = gtk_clipboard_wait_for_contents (nautilus_clipboard_get (widget),
|
||||
- copied_files_atom);
|
||||
+ data = gtk_clipboard_wait_for_text (nautilus_clipboard_get (widget));
|
||||
if (data == NULL)
|
||||
{
|
||||
return;
|
||||
@@ -210,14 +225,14 @@ nautilus_clipboard_clear_if_colliding_uris (GtkWidget *widget,
|
||||
}
|
||||
|
||||
gboolean
|
||||
-nautilus_clipboard_is_cut_from_selection_data (GtkSelectionData *selection_data)
|
||||
+nautilus_clipboard_is_cut_from_selection_data (const gchar *selection_data)
|
||||
{
|
||||
GList *items;
|
||||
gboolean is_cut_from_selection_data;
|
||||
|
||||
items = get_item_list_from_selection_data (selection_data);
|
||||
is_cut_from_selection_data = items != NULL &&
|
||||
- g_strcmp0 ((gchar *) items->data, "cut") == 0;
|
||||
+ g_strcmp0 ((gchar *) items->next->data, "cut") == 0;
|
||||
|
||||
g_list_free_full (items, g_free);
|
||||
|
||||
@@ -262,17 +277,8 @@ on_get_clipboard (GtkClipboard *clipboard,
|
||||
char *str;
|
||||
gsize len;
|
||||
|
||||
- str = convert_file_list_to_string (clipboard_info, TRUE, &len);
|
||||
- gtk_selection_data_set_text (selection_data, str, len);
|
||||
- g_free (str);
|
||||
- }
|
||||
- else if (target == copied_files_atom)
|
||||
- {
|
||||
- char *str;
|
||||
- gsize len;
|
||||
-
|
||||
str = convert_file_list_to_string (clipboard_info, FALSE, &len);
|
||||
- gtk_selection_data_set (selection_data, copied_files_atom, 8, (guchar *) str, len);
|
||||
+ gtk_selection_data_set_text (selection_data, str, len);
|
||||
g_free (str);
|
||||
}
|
||||
}
|
||||
@@ -303,7 +309,6 @@ nautilus_clipboard_prepare_for_files (GtkClipboard *clipboard,
|
||||
clipboard_info->files = nautilus_file_list_copy (files);
|
||||
|
||||
target_list = gtk_target_list_new (NULL, 0);
|
||||
- gtk_target_list_add (target_list, copied_files_atom, 0, 0);
|
||||
gtk_target_list_add_uri_targets (target_list, 0);
|
||||
gtk_target_list_add_text_targets (target_list, 0);
|
||||
|
||||
@@ -317,13 +322,3 @@ nautilus_clipboard_prepare_for_files (GtkClipboard *clipboard,
|
||||
gtk_target_table_free (targets, n_targets);
|
||||
}
|
||||
|
||||
-GdkAtom
|
||||
-nautilus_clipboard_get_atom (void)
|
||||
-{
|
||||
- if (!copied_files_atom)
|
||||
- {
|
||||
- copied_files_atom = gdk_atom_intern_static_string ("x-special/gnome-copied-files");
|
||||
- }
|
||||
-
|
||||
- return copied_files_atom;
|
||||
-}
|
||||
diff --git a/src/nautilus-clipboard.h b/src/nautilus-clipboard.h
|
||||
index 613e983..3be19c9 100644
|
||||
--- a/src/nautilus-clipboard.h
|
||||
+++ b/src/nautilus-clipboard.h
|
||||
@@ -28,11 +28,12 @@
|
||||
void nautilus_clipboard_clear_if_colliding_uris (GtkWidget *widget,
|
||||
const GList *item_uris);
|
||||
GtkClipboard* nautilus_clipboard_get (GtkWidget *widget);
|
||||
-GList* nautilus_clipboard_get_uri_list_from_selection_data (GtkSelectionData *selection_data);
|
||||
-gboolean nautilus_clipboard_is_cut_from_selection_data (GtkSelectionData *selection_data);
|
||||
+GList* nautilus_clipboard_get_uri_list_from_selection_data (const gchar *selection_data);
|
||||
+gboolean nautilus_clipboard_is_cut_from_selection_data (const gchar *selection_data);
|
||||
void nautilus_clipboard_prepare_for_files (GtkClipboard *clipboard,
|
||||
GList *files,
|
||||
gboolean cut);
|
||||
GdkAtom nautilus_clipboard_get_atom (void);
|
||||
+gboolean nautilus_clipboard_is_data_valid_from_selection_data (const gchar *selection_data);
|
||||
|
||||
#endif /* NAUTILUS_CLIPBOARD_H */
|
||||
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
|
||||
index 8aff33e..a74b691 100644
|
||||
--- a/src/nautilus-files-view.c
|
||||
+++ b/src/nautilus-files-view.c
|
||||
@@ -2551,7 +2551,7 @@ action_open_item_new_window (GSimpleAction *action,
|
||||
|
||||
static void
|
||||
handle_clipboard_data (NautilusFilesView *view,
|
||||
- GtkSelectionData *selection_data,
|
||||
+ const gchar *selection_data,
|
||||
char *destination_uri,
|
||||
GdkDragAction action)
|
||||
{
|
||||
@@ -2576,7 +2576,7 @@ handle_clipboard_data (NautilusFilesView *view,
|
||||
|
||||
static void
|
||||
paste_clipboard_data (NautilusFilesView *view,
|
||||
- GtkSelectionData *selection_data,
|
||||
+ const gchar *selection_data,
|
||||
char *destination_uri)
|
||||
{
|
||||
GdkDragAction action;
|
||||
@@ -2594,9 +2594,9 @@ paste_clipboard_data (NautilusFilesView *view,
|
||||
}
|
||||
|
||||
static void
|
||||
-paste_clipboard_received_callback (GtkClipboard *clipboard,
|
||||
- GtkSelectionData *selection_data,
|
||||
- gpointer data)
|
||||
+paste_clipboard_text_received_callback (GtkClipboard *clipboard,
|
||||
+ const gchar *selection_data,
|
||||
+ gpointer data)
|
||||
{
|
||||
NautilusFilesView *view;
|
||||
NautilusFilesViewPrivate *priv;
|
||||
@@ -2629,16 +2629,15 @@ action_paste_files (GSimpleAction *action,
|
||||
view = NAUTILUS_FILES_VIEW (user_data);
|
||||
|
||||
g_object_ref (view);
|
||||
- gtk_clipboard_request_contents (nautilus_clipboard_get (GTK_WIDGET (view)),
|
||||
- nautilus_clipboard_get_atom (),
|
||||
- paste_clipboard_received_callback,
|
||||
- view);
|
||||
+ gtk_clipboard_request_text (nautilus_clipboard_get (GTK_WIDGET (view)),
|
||||
+ paste_clipboard_text_received_callback,
|
||||
+ view);
|
||||
}
|
||||
|
||||
static void
|
||||
-create_links_clipboard_received_callback (GtkClipboard *clipboard,
|
||||
- GtkSelectionData *selection_data,
|
||||
- gpointer data)
|
||||
+create_links_clipboard_received_callback (GtkClipboard *clipboard,
|
||||
+ const gchar *selection_data,
|
||||
+ gpointer data)
|
||||
{
|
||||
NautilusFilesView *view;
|
||||
NautilusFilesViewPrivate *priv;
|
||||
@@ -2671,10 +2670,9 @@ action_create_links (GSimpleAction *action,
|
||||
view = NAUTILUS_FILES_VIEW (user_data);
|
||||
|
||||
g_object_ref (view);
|
||||
- gtk_clipboard_request_contents (nautilus_clipboard_get (GTK_WIDGET (view)),
|
||||
- nautilus_clipboard_get_atom (),
|
||||
- create_links_clipboard_received_callback,
|
||||
- view);
|
||||
+ gtk_clipboard_request_text (nautilus_clipboard_get (GTK_WIDGET (view)),
|
||||
+ create_links_clipboard_received_callback,
|
||||
+ view);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -6016,9 +6014,9 @@ typedef struct
|
||||
} PasteIntoData;
|
||||
|
||||
static void
|
||||
-paste_into_clipboard_received_callback (GtkClipboard *clipboard,
|
||||
- GtkSelectionData *selection_data,
|
||||
- gpointer callback_data)
|
||||
+paste_into_clipboard_received_callback (GtkClipboard *clipboard,
|
||||
+ const gchar *selection_data,
|
||||
+ gpointer callback_data)
|
||||
{
|
||||
NautilusFilesViewPrivate *priv;
|
||||
PasteIntoData *data;
|
||||
@@ -6058,10 +6056,9 @@ paste_into (NautilusFilesView *view,
|
||||
data->view = g_object_ref (view);
|
||||
data->target = nautilus_file_ref (target);
|
||||
|
||||
- gtk_clipboard_request_contents (nautilus_clipboard_get (GTK_WIDGET (view)),
|
||||
- nautilus_clipboard_get_atom (),
|
||||
- paste_into_clipboard_received_callback,
|
||||
- data);
|
||||
+ gtk_clipboard_request_text (nautilus_clipboard_get (GTK_WIDGET (view)),
|
||||
+ paste_into_clipboard_received_callback,
|
||||
+ data);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -6925,18 +6922,19 @@ can_paste_into_file (NautilusFile *file)
|
||||
}
|
||||
|
||||
static void
|
||||
-on_clipboard_contents_received (GtkClipboard *clipboard,
|
||||
- GtkSelectionData *selection_data,
|
||||
- gpointer user_data)
|
||||
+on_clipboard_contents_received (GtkClipboard *clipboard,
|
||||
+ const gchar *selection_data,
|
||||
+ gpointer user_data)
|
||||
{
|
||||
NautilusFilesViewPrivate *priv;
|
||||
NautilusFilesView *view;
|
||||
gboolean can_link_from_copied_files;
|
||||
gboolean settings_show_create_link;
|
||||
gboolean is_read_only;
|
||||
gboolean selection_contains_recent;
|
||||
gboolean selection_contains_starred;
|
||||
GAction *action;
|
||||
+ gboolean is_data_valid;
|
||||
|
||||
view = NAUTILUS_FILES_VIEW (user_data);
|
||||
priv = nautilus_files_view_get_instance_private (view);
|
||||
@@ -6949,77 +6947,41 @@ on_clipboard_contents_received (GtkClipboard *clipboard,
|
||||
return;
|
||||
}
|
||||
|
||||
+ is_data_valid = nautilus_clipboard_is_data_valid_from_selection_data (selection_data);
|
||||
settings_show_create_link = g_settings_get_boolean (nautilus_preferences,
|
||||
NAUTILUS_PREFERENCES_SHOW_CREATE_LINK);
|
||||
is_read_only = nautilus_files_view_is_read_only (view);
|
||||
selection_contains_recent = showing_recent_directory (view);
|
||||
selection_contains_starred = showing_starred_directory (view);
|
||||
can_link_from_copied_files = !nautilus_clipboard_is_cut_from_selection_data (selection_data) &&
|
||||
!selection_contains_recent && !selection_contains_starred &&
|
||||
- !is_read_only && gtk_selection_data_get_length (selection_data) > 0;
|
||||
+ !is_read_only && selection_data != NULL;
|
||||
|
||||
action = g_action_map_lookup_action (G_ACTION_MAP (priv->view_action_group),
|
||||
"create-link");
|
||||
g_simple_action_set_enabled (G_SIMPLE_ACTION (action),
|
||||
can_link_from_copied_files &&
|
||||
settings_show_create_link);
|
||||
|
||||
- g_object_unref (view);
|
||||
-}
|
||||
-
|
||||
-static void
|
||||
-on_clipboard_targets_received (GtkClipboard *clipboard,
|
||||
- GdkAtom *targets,
|
||||
- int n_targets,
|
||||
- gpointer user_data)
|
||||
-{
|
||||
- NautilusFilesViewPrivate *priv;
|
||||
- NautilusFilesView *view;
|
||||
- gboolean is_data_copied;
|
||||
- int i;
|
||||
- GAction *action;
|
||||
-
|
||||
- view = NAUTILUS_FILES_VIEW (user_data);
|
||||
- priv = nautilus_files_view_get_instance_private (view);
|
||||
- is_data_copied = FALSE;
|
||||
-
|
||||
- if (priv->slot == NULL ||
|
||||
- !priv->active)
|
||||
- {
|
||||
- /* We've been destroyed or became inactive since call */
|
||||
- g_object_unref (view);
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- if (targets)
|
||||
- {
|
||||
- for (i = 0; i < n_targets; i++)
|
||||
- {
|
||||
- if (targets[i] == nautilus_clipboard_get_atom ())
|
||||
- {
|
||||
- is_data_copied = TRUE;
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
action = g_action_map_lookup_action (G_ACTION_MAP (priv->view_action_group),
|
||||
"paste");
|
||||
/* Take into account if the action was previously disabled for other reasons,
|
||||
* like the directory not being writabble */
|
||||
g_simple_action_set_enabled (G_SIMPLE_ACTION (action),
|
||||
- is_data_copied && g_action_get_enabled (action));
|
||||
+ is_data_valid && g_action_get_enabled (action));
|
||||
|
||||
action = g_action_map_lookup_action (G_ACTION_MAP (priv->view_action_group),
|
||||
"paste-into");
|
||||
|
||||
g_simple_action_set_enabled (G_SIMPLE_ACTION (action),
|
||||
- is_data_copied && g_action_get_enabled (action));
|
||||
+ is_data_valid && g_action_get_enabled (action));
|
||||
|
||||
action = g_action_map_lookup_action (G_ACTION_MAP (priv->view_action_group),
|
||||
"create-link");
|
||||
|
||||
g_simple_action_set_enabled (G_SIMPLE_ACTION (action),
|
||||
- is_data_copied && g_action_get_enabled (action));
|
||||
+ is_data_valid && g_action_get_enabled (action));
|
||||
+
|
||||
|
||||
g_object_unref (view);
|
||||
}
|
||||
@@ -7565,18 +7527,10 @@ real_update_actions_state (NautilusFilesView *view)
|
||||
!selection_contains_starred &&
|
||||
priv->templates_present);
|
||||
|
||||
- /* Actions that are related to the clipboard need request, request the data
|
||||
- * and update them once we have the data */
|
||||
- g_object_ref (view); /* Need to keep the object alive until we get the reply */
|
||||
- gtk_clipboard_request_targets (nautilus_clipboard_get (GTK_WIDGET (view)),
|
||||
- on_clipboard_targets_received,
|
||||
- view);
|
||||
-
|
||||
g_object_ref (view); /* Need to keep the object alive until we get the reply */
|
||||
- gtk_clipboard_request_contents (nautilus_clipboard_get (GTK_WIDGET (view)),
|
||||
- nautilus_clipboard_get_atom (),
|
||||
- on_clipboard_contents_received,
|
||||
- view);
|
||||
+ gtk_clipboard_request_text (nautilus_clipboard_get (GTK_WIDGET (view)),
|
||||
+ on_clipboard_contents_received,
|
||||
+ view);
|
||||
|
||||
action = g_action_map_lookup_action (G_ACTION_MAP (view_action_group),
|
||||
"select-all");
|
||||
diff --git a/src/nautilus-list-view.c b/src/nautilus-list-view.c
|
||||
index d2ba388..4f65080 100644
|
||||
--- a/src/nautilus-list-view.c
|
||||
+++ b/src/nautilus-list-view.c
|
||||
@@ -3628,9 +3628,9 @@ list_view_scroll_to_file (NautilusFilesView *view,
|
||||
}
|
||||
|
||||
static void
|
||||
-on_clipboard_contents_received (GtkClipboard *clipboard,
|
||||
- GtkSelectionData *selection_data,
|
||||
- gpointer user_data)
|
||||
+on_clipboard_contents_received (GtkClipboard *clipboard,
|
||||
+ const gchar *selection_data,
|
||||
+ gpointer user_data)
|
||||
{
|
||||
NautilusListView *view = NAUTILUS_LIST_VIEW (user_data);
|
||||
|
||||
@@ -3665,10 +3665,9 @@ static void
|
||||
update_clipboard_status (NautilusListView *view)
|
||||
{
|
||||
g_object_ref (view); /* Need to keep the object alive until we get the reply */
|
||||
- gtk_clipboard_request_contents (nautilus_clipboard_get (GTK_WIDGET (view)),
|
||||
- nautilus_clipboard_get_atom (),
|
||||
- on_clipboard_contents_received,
|
||||
- view);
|
||||
+ gtk_clipboard_request_text (nautilus_clipboard_get (GTK_WIDGET (view)),
|
||||
+ on_clipboard_contents_received,
|
||||
+ view);
|
||||
}
|
||||
|
||||
static void
|
||||
--
|
||||
libgit2 0.26.0
|
||||
|
@ -0,0 +1,78 @@
|
||||
From 90229bd32fde57feb4dd37bc018d47c7a29e7e93 Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Soriano <csoriano@redhat.com>
|
||||
Date: Sat, 18 Aug 2018 20:31:36 +0200
|
||||
Subject: [PATCH] dbus-manager: Provide undo status
|
||||
|
||||
This is interesting for the desktop icons integration, so it can hide
|
||||
the undo/redo menu items appropriately.
|
||||
---
|
||||
data/dbus-interfaces.xml | 1 +
|
||||
src/nautilus-dbus-manager.c | 31 +++++++++++++++++++++++++++++--
|
||||
2 files changed, 30 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/data/dbus-interfaces.xml b/data/dbus-interfaces.xml
|
||||
index 64176225c..078cf24a2 100644
|
||||
--- a/data/dbus-interfaces.xml
|
||||
+++ b/data/dbus-interfaces.xml
|
||||
@@ -43,5 +43,6 @@
|
||||
</method>
|
||||
<method name='Redo'>
|
||||
</method>
|
||||
+ <property name="UndoStatus" type="i" access="read"/>
|
||||
</interface>
|
||||
</node>
|
||||
diff --git a/src/nautilus-dbus-manager.c b/src/nautilus-dbus-manager.c
|
||||
index f11ede0ad..64f004d88 100644
|
||||
--- a/src/nautilus-dbus-manager.c
|
||||
+++ b/src/nautilus-dbus-manager.c
|
||||
@@ -237,6 +237,17 @@ handle_trash_files (NautilusDBusFileOperations *object,
|
||||
return TRUE; /* invocation was handled */
|
||||
}
|
||||
|
||||
+
|
||||
+static void
|
||||
+undo_manager_changed (NautilusDBusManager *self)
|
||||
+{
|
||||
+ NautilusFileUndoManagerState undo_state;
|
||||
+
|
||||
+ undo_state = nautilus_file_undo_manager_get_state ();
|
||||
+ nautilus_dbus_file_operations_set_undo_status (self->file_operations,
|
||||
+ undo_state);
|
||||
+}
|
||||
+
|
||||
static void
|
||||
nautilus_dbus_manager_init (NautilusDBusManager *self)
|
||||
{
|
||||
@@ -292,12 +303,28 @@ nautilus_dbus_manager_register (NautilusDBusManager *self,
|
||||
GDBusConnection *connection,
|
||||
GError **error)
|
||||
{
|
||||
- return g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (self->file_operations),
|
||||
- connection, "/org/gnome/Nautilus" PROFILE, error);
|
||||
+ gboolean succes;
|
||||
+
|
||||
+ succes = g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (self->file_operations),
|
||||
+ connection, "/org/gnome/Nautilus" PROFILE, error);
|
||||
+ if (succes)
|
||||
+ {
|
||||
+ g_signal_connect_object (nautilus_file_undo_manager_get (),
|
||||
+ "undo-changed",
|
||||
+ G_CALLBACK (undo_manager_changed),
|
||||
+ self,
|
||||
+ G_CONNECT_SWAPPED);
|
||||
+
|
||||
+ undo_manager_changed (self);
|
||||
+ }
|
||||
+
|
||||
+ return succes;
|
||||
}
|
||||
|
||||
void
|
||||
nautilus_dbus_manager_unregister (NautilusDBusManager *self)
|
||||
{
|
||||
g_dbus_interface_skeleton_unexport (G_DBUS_INTERFACE_SKELETON (self->file_operations));
|
||||
+
|
||||
+ g_signal_handlers_disconnect_by_data (nautilus_file_undo_manager_get (), self);
|
||||
}
|
||||
--
|
||||
2.17.1
|
@ -0,0 +1,59 @@
|
||||
From f0e34498a2f2e2ec6644a3af47c1b56ac5b6dec3 Mon Sep 17 00:00:00 2001
|
||||
From: Ernestas Kulik <ernestask@gnome.org>
|
||||
Date: Thu, 2 Aug 2018 22:29:03 +0300
|
||||
Subject: [PATCH] clipboard: Prevent crash when selection data is empty
|
||||
|
||||
Somehow, magically, it can happen that the clipboard contains an empty
|
||||
string, which wreaks havoc in convert_selection_data_to_str_list(),
|
||||
since the loop counter goes from 0 to the number of lines in the data
|
||||
string minus one. This commit adds a check for the number of lines and
|
||||
returns early. Additionally, this introduces automatic cleanup for a
|
||||
variable and fixes mismatched types.
|
||||
---
|
||||
src/nautilus-clipboard.c | 20 +++++++++++++-------
|
||||
1 file changed, 13 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/nautilus-clipboard.c b/src/nautilus-clipboard.c
|
||||
index 752ff131f..2a77cf28f 100644
|
||||
--- a/src/nautilus-clipboard.c
|
||||
+++ b/src/nautilus-clipboard.c
|
||||
@@ -42,23 +42,29 @@ typedef struct
|
||||
static GList *
|
||||
convert_selection_data_to_str_list (const gchar *data)
|
||||
{
|
||||
- int i;
|
||||
+ g_auto (GStrv) lines;
|
||||
+ guint number_of_lines;
|
||||
GList *result;
|
||||
- size_t number_of_lines;
|
||||
- gchar **lines;
|
||||
|
||||
lines = g_strsplit (data, "\n", 0);
|
||||
- result = NULL;
|
||||
number_of_lines = g_strv_length (lines);
|
||||
+ if (number_of_lines == 0)
|
||||
+ {
|
||||
+ /* An empty string will result in g_strsplit() returning an empty
|
||||
+ * array, so, naturally, 0 - 1 = UINT32_MAX and we read all sorts
|
||||
+ * of invalid memory.
|
||||
+ */
|
||||
+ return NULL;
|
||||
+ }
|
||||
+ result = NULL;
|
||||
+
|
||||
/* Also, this skips the last line, since it would be an
|
||||
* empty string from the split */
|
||||
- for (i = 0; i < number_of_lines - 1; i++)
|
||||
+ for (guint i = 0; i < number_of_lines - 1; i++)
|
||||
{
|
||||
result = g_list_prepend (result, g_strdup (lines[i]));
|
||||
}
|
||||
|
||||
- g_strfreev (lines);
|
||||
-
|
||||
return g_list_reverse (result);
|
||||
}
|
||||
|
||||
--
|
||||
2.17.2
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,160 +0,0 @@
|
||||
From 7de08188d8d012d9aa8f49fe27b7992d081a7307 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Holy <oholy@redhat.com>
|
||||
Date: Wed, 11 Jan 2023 09:44:25 +0100
|
||||
Subject: [PATCH] Revert "freedesktop-dbus: Defer D-Bus property setting"
|
||||
|
||||
This reverts commit 3014f69485a120bedf0eec5af441346a95fe27f7 and part of
|
||||
the commit a1751d3d870c6cdc092f893755623c4ff20e1ef3. This extra handling
|
||||
was needed because `NautilusFreedesktopDBus` methods might be called before
|
||||
establishing its own D-Bus connection. The follow-up commit is going to use
|
||||
the already established connection from the `dbus_register` vfunc. It
|
||||
should be ensured that the `dbus_register` vfunc is called before the
|
||||
`window_added`, `window_removed`, or `startup` vfunc. Consequently, this
|
||||
extra handling is going to be redundant. Let's remove it as a preparation
|
||||
for the next commit.
|
||||
---
|
||||
src/nautilus-freedesktop-dbus.c | 79 ++-------------------------------
|
||||
1 file changed, 3 insertions(+), 76 deletions(-)
|
||||
|
||||
diff --git a/src/nautilus-freedesktop-dbus.c b/src/nautilus-freedesktop-dbus.c
|
||||
index 5cbbbad01..c75678399 100644
|
||||
--- a/src/nautilus-freedesktop-dbus.c
|
||||
+++ b/src/nautilus-freedesktop-dbus.c
|
||||
@@ -40,11 +40,6 @@ struct _NautilusFreedesktopDBus
|
||||
|
||||
/* Our DBus implementation skeleton */
|
||||
NautilusFreedesktopFileManager1 *skeleton;
|
||||
-
|
||||
- GStrv pending_open_locations;
|
||||
- GVariant *pending_open_windows_with_locations;
|
||||
-
|
||||
- gboolean name_lost;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (NautilusFreedesktopDBus, nautilus_freedesktop_dbus, G_TYPE_OBJECT);
|
||||
@@ -162,24 +157,6 @@ bus_acquired_cb (GDBusConnection *conn,
|
||||
G_CALLBACK (skeleton_handle_show_item_properties_cb), fdb);
|
||||
|
||||
g_dbus_interface_skeleton_export (G_DBUS_INTERFACE_SKELETON (fdb->skeleton), conn, NAUTILUS_FDO_DBUS_PATH, NULL);
|
||||
-
|
||||
- if (G_UNLIKELY (fdb->pending_open_locations != NULL))
|
||||
- {
|
||||
- g_auto (GStrv) locations = NULL;
|
||||
-
|
||||
- locations = g_steal_pointer (&fdb->pending_open_locations);
|
||||
-
|
||||
- nautilus_freedesktop_dbus_set_open_locations (fdb, (const gchar **) locations);
|
||||
- }
|
||||
-
|
||||
- if (G_UNLIKELY (fdb->pending_open_windows_with_locations != NULL))
|
||||
- {
|
||||
- g_autoptr (GVariant) locations = NULL;
|
||||
-
|
||||
- locations = g_steal_pointer (&fdb->pending_open_windows_with_locations);
|
||||
-
|
||||
- nautilus_freedesktop_dbus_set_open_windows_with_locations (fdb, locations);
|
||||
- }
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -195,13 +172,7 @@ name_lost_cb (GDBusConnection *connection,
|
||||
const gchar *name,
|
||||
gpointer user_data)
|
||||
{
|
||||
- NautilusFreedesktopDBus *fdb;
|
||||
-
|
||||
DEBUG ("Lost (or failed to acquire) the name %s on the session message bus\n", name);
|
||||
-
|
||||
- fdb = NAUTILUS_FREEDESKTOP_DBUS (user_data);
|
||||
-
|
||||
- fdb->name_lost = TRUE;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -225,24 +196,12 @@ nautilus_freedesktop_dbus_dispose (GObject *object)
|
||||
G_OBJECT_CLASS (nautilus_freedesktop_dbus_parent_class)->dispose (object);
|
||||
}
|
||||
|
||||
-static void
|
||||
-nautilus_freedesktop_dbus_finalize (GObject *object)
|
||||
-{
|
||||
- NautilusFreedesktopDBus *fdb;
|
||||
-
|
||||
- fdb = NAUTILUS_FREEDESKTOP_DBUS (object);
|
||||
-
|
||||
- g_clear_pointer (&fdb->pending_open_locations, g_strfreev);
|
||||
- g_clear_pointer (&fdb->pending_open_windows_with_locations, g_variant_unref);
|
||||
-}
|
||||
-
|
||||
static void
|
||||
nautilus_freedesktop_dbus_class_init (NautilusFreedesktopDBusClass *klass)
|
||||
{
|
||||
GObjectClass *object_class = G_OBJECT_CLASS (klass);
|
||||
|
||||
object_class->dispose = nautilus_freedesktop_dbus_dispose;
|
||||
- object_class->finalize = nautilus_freedesktop_dbus_finalize;
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -256,10 +215,6 @@ nautilus_freedesktop_dbus_init (NautilusFreedesktopDBus *fdb)
|
||||
name_lost_cb,
|
||||
fdb,
|
||||
NULL);
|
||||
- fdb->skeleton = NULL;
|
||||
- fdb->pending_open_locations = NULL;
|
||||
- fdb->pending_open_windows_with_locations = NULL;
|
||||
- fdb->name_lost = FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
@@ -268,21 +223,7 @@ nautilus_freedesktop_dbus_set_open_locations (NautilusFreedesktopDBus *fdb,
|
||||
{
|
||||
g_return_if_fail (NAUTILUS_IS_FREEDESKTOP_DBUS (fdb));
|
||||
|
||||
- if (G_UNLIKELY (fdb->skeleton == NULL))
|
||||
- {
|
||||
- if (G_LIKELY (fdb->name_lost))
|
||||
- {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- g_clear_pointer (&fdb->pending_open_locations, g_strfreev);
|
||||
-
|
||||
- fdb->pending_open_locations = g_strdupv ((gchar **) locations);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- nautilus_freedesktop_file_manager1_set_open_locations (fdb->skeleton, locations);
|
||||
- }
|
||||
+ nautilus_freedesktop_file_manager1_set_open_locations (fdb->skeleton, locations);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -301,22 +242,8 @@ nautilus_freedesktop_dbus_set_open_windows_with_locations (NautilusFreedesktopDB
|
||||
{
|
||||
g_return_if_fail (NAUTILUS_IS_FREEDESKTOP_DBUS (fdb));
|
||||
|
||||
- if (G_UNLIKELY (fdb->skeleton == NULL))
|
||||
- {
|
||||
- if (G_LIKELY (fdb->name_lost))
|
||||
- {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
- g_clear_pointer (&fdb->pending_open_windows_with_locations, g_variant_unref);
|
||||
-
|
||||
- fdb->pending_open_windows_with_locations = g_variant_ref (locations);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- nautilus_freedesktop_file_manager1_set_open_windows_with_locations (fdb->skeleton,
|
||||
- locations);
|
||||
- }
|
||||
+ nautilus_freedesktop_file_manager1_set_open_windows_with_locations (fdb->skeleton,
|
||||
+ locations);
|
||||
}
|
||||
|
||||
/* Tries to own the org.freedesktop.FileManager1 service name */
|
||||
--
|
||||
2.38.1
|
||||
|
@ -0,0 +1,90 @@
|
||||
From bac4bd595c518983571b0fb41fcf5586f27544eb Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Soriano <csoriano@redhat.com>
|
||||
Date: Mon, 19 Nov 2018 08:55:22 +0000
|
||||
Subject: [PATCH] dbus: Implement rename file
|
||||
|
||||
So desktop icons extensions can use it.
|
||||
|
||||
|
||||
(cherry picked from commit 42c5ce657e2b24ddf19932e9e3284a045d60ff51)
|
||||
---
|
||||
data/dbus-interfaces.xml | 4 ++++
|
||||
src/nautilus-dbus-manager.c | 33 +++++++++++++++++++++++++++++++++
|
||||
2 files changed, 37 insertions(+)
|
||||
|
||||
diff --git a/data/dbus-interfaces.xml b/data/dbus-interfaces.xml
|
||||
index 298871bc4..1827f92ab 100644
|
||||
--- a/data/dbus-interfaces.xml
|
||||
+++ b/data/dbus-interfaces.xml
|
||||
@@ -39,6 +39,10 @@
|
||||
<method name='CreateFolder'>
|
||||
<arg type='s' name='URI' direction='in'/>
|
||||
</method>
|
||||
+ <method name='RenameFile'>
|
||||
+ <arg type='s' name='URI' direction='in'/>
|
||||
+ <arg type='s' name='NewName' direction='in'/>
|
||||
+ </method>
|
||||
<method name='Undo'>
|
||||
</method>
|
||||
<method name='Redo'>
|
||||
diff --git a/src/nautilus-dbus-manager.c b/src/nautilus-dbus-manager.c
|
||||
index 3257c4bd4..43f27e10a 100644
|
||||
--- a/src/nautilus-dbus-manager.c
|
||||
+++ b/src/nautilus-dbus-manager.c
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
#include "nautilus-file-operations.h"
|
||||
#include "nautilus-file-undo-manager.h"
|
||||
+#include "nautilus-file.h"
|
||||
|
||||
#define DEBUG_FLAG NAUTILUS_DEBUG_DBUS
|
||||
#include "nautilus-debug.h"
|
||||
@@ -230,6 +231,34 @@ handle_trash_files (NautilusDBusFileOperations *object,
|
||||
return TRUE; /* invocation was handled */
|
||||
}
|
||||
|
||||
+static void
|
||||
+rename_file_on_finished (NautilusFile *file,
|
||||
+ GFile *result_location,
|
||||
+ GError *error,
|
||||
+ gpointer callback_data)
|
||||
+{
|
||||
+ g_application_release (g_application_get_default ());
|
||||
+}
|
||||
+
|
||||
+static gboolean
|
||||
+handle_rename_file (NautilusDBusFileOperations *object,
|
||||
+ GDBusMethodInvocation *invocation,
|
||||
+ const gchar *uri,
|
||||
+ const gchar *new_name)
|
||||
+{
|
||||
+ NautilusFile *file = NULL;
|
||||
+
|
||||
+ file = nautilus_file_get_by_uri (uri);
|
||||
+
|
||||
+ g_application_hold (g_application_get_default ());
|
||||
+ nautilus_file_rename (file, new_name,
|
||||
+ rename_file_on_finished, NULL);
|
||||
+
|
||||
+ nautilus_dbus_file_operations_complete_rename_file (object, invocation);
|
||||
+
|
||||
+ return TRUE; /* invocation was handled */
|
||||
+}
|
||||
+
|
||||
|
||||
static void
|
||||
undo_manager_changed (NautilusDBusManager *self)
|
||||
@@ -266,6 +295,10 @@ nautilus_dbus_manager_init (NautilusDBusManager *self)
|
||||
"handle-create-folder",
|
||||
G_CALLBACK (handle_create_folder),
|
||||
self);
|
||||
+ g_signal_connect (self->file_operations,
|
||||
+ "handle-rename-file",
|
||||
+ G_CALLBACK (handle_rename_file),
|
||||
+ self);
|
||||
g_signal_connect (self->file_operations,
|
||||
"handle-undo",
|
||||
G_CALLBACK (handle_undo),
|
||||
--
|
||||
2.18.1
|
||||
|
@ -0,0 +1,19 @@
|
||||
diff --git a/data/org.gnome.Nautilus.appdata.xml.in.in b/data/org.gnome.Nautilus.appdata.xml.in.in
|
||||
index 1e3986323..35e54cb14 100644
|
||||
--- a/data/org.gnome.Nautilus.appdata.xml.in.in
|
||||
+++ b/data/org.gnome.Nautilus.appdata.xml.in.in
|
||||
@@ -2,11 +2,11 @@
|
||||
<id>@appid@.desktop</id>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>GPL-2.0+</project_license>
|
||||
- <name>Nautilus</name>
|
||||
+ <name>Files</name>
|
||||
<summary>Access and organize files</summary>
|
||||
<description>
|
||||
<p>
|
||||
- Nautilus, also known as Files, is the default file manager of the GNOME desktop.
|
||||
+ Files, also known as Nautilus, is the default file manager of the GNOME desktop.
|
||||
It provides a simple and integrated way of managing your files and browsing your file system.
|
||||
</p>
|
||||
<p>
|
||||
|
@ -1,611 +0,0 @@
|
||||
From 98c79d46ab05bd86fc1309d9ae560edc19f62071 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Holy <oholy@redhat.com>
|
||||
Date: Fri, 30 Jul 2021 10:52:55 +0200
|
||||
Subject: [PATCH] compress-dialog: Add support for encrypted .zip
|
||||
|
||||
Currently, it is not possible to create encrypted archives over
|
||||
Nautilus. Let's add support for encrypted .zip files to not have
|
||||
to install a dedicated archive manager.
|
||||
|
||||
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/822
|
||||
---
|
||||
data/org.gnome.nautilus.gschema.xml | 1 +
|
||||
meson.build | 2 +-
|
||||
src/nautilus-compress-dialog-controller.c | 136 +++++++++++++++++++
|
||||
src/nautilus-compress-dialog-controller.h | 1 +
|
||||
src/nautilus-file-operations.c | 8 +-
|
||||
src/nautilus-file-operations.h | 1 +
|
||||
src/nautilus-file-undo-operations.c | 7 +-
|
||||
src/nautilus-file-undo-operations.h | 3 +-
|
||||
src/nautilus-files-view.c | 10 ++
|
||||
src/nautilus-global-preferences.h | 3 +-
|
||||
src/resources/css/nautilus.css | 9 ++
|
||||
src/resources/ui/nautilus-compress-dialog.ui | 57 ++++++++
|
||||
12 files changed, 233 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/data/org.gnome.nautilus.gschema.xml b/data/org.gnome.nautilus.gschema.xml
|
||||
index 3f89466de..7585be8cd 100644
|
||||
--- a/data/org.gnome.nautilus.gschema.xml
|
||||
+++ b/data/org.gnome.nautilus.gschema.xml
|
||||
@@ -65,6 +65,7 @@
|
||||
<value value="0" nick="zip"/>
|
||||
<value value="1" nick="tar.xz"/>
|
||||
<value value="2" nick="7z"/>
|
||||
+ <value value="3" nick="encrypted_zip"/>
|
||||
</enum>
|
||||
|
||||
<schema path="/org/gnome/nautilus/" id="org.gnome.nautilus" gettext-domain="nautilus">
|
||||
diff --git a/meson.build b/meson.build
|
||||
index d5316475d..446b25614 100644
|
||||
--- a/meson.build
|
||||
+++ b/meson.build
|
||||
@@ -117,7 +117,7 @@ gio = dependency('gio-2.0', version: glib_ver)
|
||||
gio_unix = dependency('gio-unix-2.0', version: glib_ver)
|
||||
glib = dependency('glib-2.0', version: glib_ver)
|
||||
gmodule = dependency('gmodule-no-export-2.0', version: glib_ver)
|
||||
-gnome_autoar = dependency('gnome-autoar-0', version: '>= 0.3.0')
|
||||
+gnome_autoar = dependency('gnome-autoar-0', version: '>= 0.4.0')
|
||||
gnome_desktop = dependency('gnome-desktop-3.0', version: '>= 3.0.0')
|
||||
gtk = dependency('gtk+-3.0', version: '>= 3.22.27')
|
||||
libhandy = dependency('libhandy-1', version: '>= 1.1.90')
|
||||
diff --git a/src/nautilus-compress-dialog-controller.c b/src/nautilus-compress-dialog-controller.c
|
||||
index 154573c0f..e1ba5a803 100644
|
||||
--- a/src/nautilus-compress-dialog-controller.c
|
||||
+++ b/src/nautilus-compress-dialog-controller.c
|
||||
@@ -32,17 +32,24 @@ struct _NautilusCompressDialogController
|
||||
NautilusFileNameWidgetController parent_instance;
|
||||
|
||||
GtkWidget *compress_dialog;
|
||||
+ GtkWidget *activate_button;
|
||||
+ GtkWidget *error_label;
|
||||
GtkWidget *name_entry;
|
||||
GtkWidget *extension_stack;
|
||||
GtkWidget *zip_label;
|
||||
+ GtkWidget *encrypted_zip_label;
|
||||
GtkWidget *tar_xz_label;
|
||||
GtkWidget *seven_zip_label;
|
||||
GtkWidget *extension_popover;
|
||||
GtkWidget *zip_checkmark;
|
||||
+ GtkWidget *encrypted_zip_checkmark;
|
||||
GtkWidget *tar_xz_checkmark;
|
||||
GtkWidget *seven_zip_checkmark;
|
||||
+ GtkWidget *passphrase_label;
|
||||
+ GtkWidget *passphrase_entry;
|
||||
|
||||
const char *extension;
|
||||
+ gchar *passphrase;
|
||||
|
||||
gulong response_handler_id;
|
||||
};
|
||||
@@ -142,6 +149,7 @@ update_selected_format (NautilusCompressDialogController *self,
|
||||
const char *extension;
|
||||
GtkWidget *active_label;
|
||||
GtkWidget *active_checkmark;
|
||||
+ gboolean show_passphrase = FALSE;
|
||||
|
||||
switch (format)
|
||||
{
|
||||
@@ -153,6 +161,15 @@ update_selected_format (NautilusCompressDialogController *self,
|
||||
}
|
||||
break;
|
||||
|
||||
+ case NAUTILUS_COMPRESSION_ENCRYPTED_ZIP:
|
||||
+ {
|
||||
+ extension = ".zip";
|
||||
+ active_label = self->encrypted_zip_label;
|
||||
+ active_checkmark = self->encrypted_zip_checkmark;
|
||||
+ show_passphrase = TRUE;
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
case NAUTILUS_COMPRESSION_TAR_XZ:
|
||||
{
|
||||
extension = ".tar.xz";
|
||||
@@ -178,12 +195,26 @@ update_selected_format (NautilusCompressDialogController *self,
|
||||
|
||||
self->extension = extension;
|
||||
|
||||
+ gtk_widget_set_visible (self->passphrase_label, show_passphrase);
|
||||
+ gtk_widget_set_visible (self->passphrase_entry, show_passphrase);
|
||||
+ if (!show_passphrase)
|
||||
+ {
|
||||
+ gtk_entry_set_text (GTK_ENTRY (self->passphrase_entry), "");
|
||||
+ gtk_entry_set_visibility (GTK_ENTRY (self->passphrase_entry), FALSE);
|
||||
+ gtk_entry_set_icon_from_icon_name (GTK_ENTRY (self->passphrase_entry),
|
||||
+ GTK_ENTRY_ICON_SECONDARY,
|
||||
+ "view-conceal");
|
||||
+ }
|
||||
+
|
||||
gtk_stack_set_visible_child (GTK_STACK (self->extension_stack),
|
||||
active_label);
|
||||
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (self->zip_checkmark),
|
||||
NULL,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
+ gtk_image_set_from_icon_name (GTK_IMAGE (self->encrypted_zip_checkmark),
|
||||
+ NULL,
|
||||
+ GTK_ICON_SIZE_BUTTON);
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (self->tar_xz_checkmark),
|
||||
NULL,
|
||||
GTK_ICON_SIZE_BUTTON);
|
||||
@@ -200,6 +231,7 @@ update_selected_format (NautilusCompressDialogController *self,
|
||||
/* Since the extension changes when the button is toggled, force a
|
||||
* verification of the new file name by simulating an entry change
|
||||
*/
|
||||
+ gtk_widget_set_sensitive (self->activate_button, FALSE);
|
||||
g_signal_emit_by_name (self->name_entry, "changed");
|
||||
}
|
||||
|
||||
@@ -216,6 +248,19 @@ zip_row_on_activated (HdyActionRow *row,
|
||||
NAUTILUS_COMPRESSION_ZIP);
|
||||
}
|
||||
|
||||
+static void
|
||||
+encrypted_zip_row_on_activated (HdyActionRow *row,
|
||||
+ gpointer user_data)
|
||||
+{
|
||||
+ NautilusCompressDialogController *controller;
|
||||
+
|
||||
+ controller = NAUTILUS_COMPRESS_DIALOG_CONTROLLER (user_data);
|
||||
+
|
||||
+ gtk_popover_popdown (GTK_POPOVER (controller->extension_popover));
|
||||
+ update_selected_format (controller,
|
||||
+ NAUTILUS_COMPRESSION_ENCRYPTED_ZIP);
|
||||
+}
|
||||
+
|
||||
static void
|
||||
tar_xz_row_on_activated (HdyActionRow *row,
|
||||
gpointer user_data)
|
||||
@@ -242,6 +287,67 @@ seven_zip_row_on_activated (HdyActionRow *row,
|
||||
NAUTILUS_COMPRESSION_7ZIP);
|
||||
}
|
||||
|
||||
+static void
|
||||
+passphrase_entry_on_changed (GtkEditable *editable,
|
||||
+ gpointer user_data)
|
||||
+{
|
||||
+ NautilusCompressDialogController *self;
|
||||
+ const gchar *error_message;
|
||||
+
|
||||
+ self = NAUTILUS_COMPRESS_DIALOG_CONTROLLER (user_data);
|
||||
+
|
||||
+ g_free (self->passphrase);
|
||||
+ self->passphrase = g_strdup (gtk_entry_get_text (GTK_ENTRY (self->passphrase_entry)));
|
||||
+
|
||||
+ /* Simulate a change of the name_entry to ensure the correct sensitivity of
|
||||
+ * the activate_button, but only if the name_entry is valid in order to
|
||||
+ * avoid changes of the error_revealer.
|
||||
+ */
|
||||
+ error_message = gtk_label_get_text (GTK_LABEL (self->error_label));
|
||||
+ if (error_message[0] == '\0')
|
||||
+ {
|
||||
+ gtk_widget_set_sensitive (self->activate_button, FALSE);
|
||||
+ g_signal_emit_by_name (self->name_entry, "changed");
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+passphrase_entry_on_icon_press (GtkEntry *entry,
|
||||
+ GtkEntryIconPosition icon_pos,
|
||||
+ GdkEvent *event,
|
||||
+ gpointer user_data)
|
||||
+{
|
||||
+ NautilusCompressDialogController *self;
|
||||
+ gboolean visibility;
|
||||
+
|
||||
+ self = NAUTILUS_COMPRESS_DIALOG_CONTROLLER (user_data);
|
||||
+ visibility = gtk_entry_get_visibility (GTK_ENTRY (self->passphrase_entry));
|
||||
+
|
||||
+ gtk_entry_set_icon_from_icon_name (GTK_ENTRY (self->passphrase_entry),
|
||||
+ GTK_ENTRY_ICON_SECONDARY,
|
||||
+ visibility ? "view-conceal" : "view-reveal");
|
||||
+ gtk_entry_set_visibility (GTK_ENTRY (self->passphrase_entry), !visibility);
|
||||
+}
|
||||
+
|
||||
+static void
|
||||
+activate_button_on_sensitive_notify (GObject *gobject,
|
||||
+ GParamSpec *pspec,
|
||||
+ gpointer user_data)
|
||||
+{
|
||||
+ NautilusCompressDialogController *self;
|
||||
+ NautilusCompressionFormat format;
|
||||
+
|
||||
+ self = NAUTILUS_COMPRESS_DIALOG_CONTROLLER (user_data);
|
||||
+ format = g_settings_get_enum (nautilus_compression_preferences,
|
||||
+ NAUTILUS_PREFERENCES_DEFAULT_COMPRESSION_FORMAT);
|
||||
+ if (format == NAUTILUS_COMPRESSION_ENCRYPTED_ZIP &&
|
||||
+ (self->passphrase == NULL || self->passphrase[0] == '\0'))
|
||||
+ {
|
||||
+ /* Reset sensitivity of the activate_button if password is not set. */
|
||||
+ gtk_widget_set_sensitive (self->activate_button, FALSE);
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
NautilusCompressDialogController *
|
||||
nautilus_compress_dialog_controller_new (GtkWindow *parent_window,
|
||||
NautilusDirectory *destination_directory,
|
||||
@@ -256,12 +362,16 @@ nautilus_compress_dialog_controller_new (GtkWindow *parent_window,
|
||||
GtkWidget *activate_button;
|
||||
GtkWidget *extension_stack;
|
||||
GtkWidget *zip_label;
|
||||
+ GtkWidget *encrypted_zip_label;
|
||||
GtkWidget *tar_xz_label;
|
||||
GtkWidget *seven_zip_label;
|
||||
GtkWidget *extension_popover;
|
||||
GtkWidget *zip_checkmark;
|
||||
+ GtkWidget *encrypted_zip_checkmark;
|
||||
GtkWidget *tar_xz_checkmark;
|
||||
GtkWidget *seven_zip_checkmark;
|
||||
+ GtkWidget *passphrase_label;
|
||||
+ GtkWidget *passphrase_entry;
|
||||
NautilusCompressionFormat format;
|
||||
|
||||
builder = gtk_builder_new_from_resource ("/org/gnome/nautilus/ui/nautilus-compress-dialog.ui");
|
||||
@@ -272,12 +382,16 @@ nautilus_compress_dialog_controller_new (GtkWindow *parent_window,
|
||||
activate_button = GTK_WIDGET (gtk_builder_get_object (builder, "activate_button"));
|
||||
extension_stack = GTK_WIDGET (gtk_builder_get_object (builder, "extension_stack"));
|
||||
zip_label = GTK_WIDGET (gtk_builder_get_object (builder, "zip_label"));
|
||||
+ encrypted_zip_label = GTK_WIDGET (gtk_builder_get_object (builder, "encrypted_zip_label"));
|
||||
tar_xz_label = GTK_WIDGET (gtk_builder_get_object (builder, "tar_xz_label"));
|
||||
seven_zip_label = GTK_WIDGET (gtk_builder_get_object (builder, "seven_zip_label"));
|
||||
extension_popover = GTK_WIDGET (gtk_builder_get_object (builder, "extension_popover"));
|
||||
zip_checkmark = GTK_WIDGET (gtk_builder_get_object (builder, "zip_checkmark"));
|
||||
+ encrypted_zip_checkmark = GTK_WIDGET (gtk_builder_get_object (builder, "encrypted_zip_checkmark"));
|
||||
tar_xz_checkmark = GTK_WIDGET (gtk_builder_get_object (builder, "tar_xz_checkmark"));
|
||||
seven_zip_checkmark = GTK_WIDGET (gtk_builder_get_object (builder, "seven_zip_checkmark"));
|
||||
+ passphrase_label = GTK_WIDGET (gtk_builder_get_object (builder, "passphrase_label"));
|
||||
+ passphrase_entry = GTK_WIDGET (gtk_builder_get_object (builder, "passphrase_entry"));
|
||||
|
||||
gtk_window_set_transient_for (GTK_WINDOW (compress_dialog),
|
||||
parent_window);
|
||||
@@ -290,16 +404,22 @@ nautilus_compress_dialog_controller_new (GtkWindow *parent_window,
|
||||
"containing-directory", destination_directory, NULL);
|
||||
|
||||
self->compress_dialog = compress_dialog;
|
||||
+ self->activate_button = activate_button;
|
||||
+ self->error_label = error_label;
|
||||
self->extension_stack = extension_stack;
|
||||
self->zip_label = zip_label;
|
||||
+ self->encrypted_zip_label = encrypted_zip_label;
|
||||
self->tar_xz_label = tar_xz_label;
|
||||
self->seven_zip_label = seven_zip_label;
|
||||
self->name_entry = name_entry;
|
||||
self->extension_popover = extension_popover;
|
||||
self->zip_checkmark = zip_checkmark;
|
||||
+ self->encrypted_zip_checkmark = encrypted_zip_checkmark;
|
||||
self->tar_xz_checkmark = tar_xz_checkmark;
|
||||
self->seven_zip_checkmark = seven_zip_checkmark;
|
||||
self->name_entry = name_entry;
|
||||
+ self->passphrase_label = passphrase_label;
|
||||
+ self->passphrase_entry = passphrase_entry;
|
||||
|
||||
self->response_handler_id = g_signal_connect (compress_dialog,
|
||||
"response",
|
||||
@@ -309,10 +429,18 @@ nautilus_compress_dialog_controller_new (GtkWindow *parent_window,
|
||||
gtk_builder_add_callback_symbols (builder,
|
||||
"zip_row_on_activated",
|
||||
G_CALLBACK (zip_row_on_activated),
|
||||
+ "encrypted_zip_row_on_activated",
|
||||
+ G_CALLBACK (encrypted_zip_row_on_activated),
|
||||
"tar_xz_row_on_activated",
|
||||
G_CALLBACK (tar_xz_row_on_activated),
|
||||
"seven_zip_row_on_activated",
|
||||
G_CALLBACK (seven_zip_row_on_activated),
|
||||
+ "passphrase_entry_on_changed",
|
||||
+ G_CALLBACK (passphrase_entry_on_changed),
|
||||
+ "passphrase_entry_on_icon_press",
|
||||
+ G_CALLBACK (passphrase_entry_on_icon_press),
|
||||
+ "activate_button_on_sensitive_notify",
|
||||
+ G_CALLBACK (activate_button_on_sensitive_notify),
|
||||
NULL);
|
||||
gtk_builder_connect_signals (builder, self);
|
||||
|
||||
@@ -350,6 +478,8 @@ nautilus_compress_dialog_controller_finalize (GObject *object)
|
||||
self->compress_dialog = NULL;
|
||||
}
|
||||
|
||||
+ g_free (self->passphrase);
|
||||
+
|
||||
G_OBJECT_CLASS (nautilus_compress_dialog_controller_parent_class)->finalize (object);
|
||||
}
|
||||
|
||||
@@ -364,3 +494,9 @@ nautilus_compress_dialog_controller_class_init (NautilusCompressDialogController
|
||||
parent_class->get_new_name = nautilus_compress_dialog_controller_get_new_name;
|
||||
parent_class->name_is_valid = nautilus_compress_dialog_controller_name_is_valid;
|
||||
}
|
||||
+
|
||||
+const gchar *
|
||||
+nautilus_compress_dialog_controller_get_passphrase (NautilusCompressDialogController *self)
|
||||
+{
|
||||
+ return self->passphrase;
|
||||
+}
|
||||
diff --git a/src/nautilus-compress-dialog-controller.h b/src/nautilus-compress-dialog-controller.h
|
||||
index 2421b8115..6c96d68fa 100644
|
||||
--- a/src/nautilus-compress-dialog-controller.h
|
||||
+++ b/src/nautilus-compress-dialog-controller.h
|
||||
@@ -31,3 +31,4 @@ G_DECLARE_FINAL_TYPE (NautilusCompressDialogController, nautilus_compress_dialog
|
||||
NautilusCompressDialogController * nautilus_compress_dialog_controller_new (GtkWindow *parent_window,
|
||||
NautilusDirectory *destination_directory,
|
||||
gchar *initial_name);
|
||||
+const gchar * nautilus_compress_dialog_controller_get_passphrase (NautilusCompressDialogController *controller);
|
||||
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
|
||||
index 59beecd7e..f909173f9 100644
|
||||
--- a/src/nautilus-file-operations.c
|
||||
+++ b/src/nautilus-file-operations.c
|
||||
@@ -222,6 +222,7 @@ typedef struct
|
||||
|
||||
AutoarFormat format;
|
||||
AutoarFilter filter;
|
||||
+ gchar *passphrase;
|
||||
|
||||
guint64 total_size;
|
||||
guint total_files;
|
||||
@@ -8753,6 +8754,7 @@ compress_task_done (GObject *source_object,
|
||||
|
||||
g_object_unref (compress_job->output_file);
|
||||
g_list_free_full (compress_job->source_files, g_object_unref);
|
||||
+ g_free (compress_job->passphrase);
|
||||
|
||||
finalize_common ((CommonJob *) compress_job);
|
||||
|
||||
@@ -9027,6 +9029,7 @@ compress_task_thread_func (GTask *task,
|
||||
compress_job->format,
|
||||
compress_job->filter,
|
||||
FALSE);
|
||||
+ autoar_compressor_set_passphrase (compressor, compress_job->passphrase);
|
||||
|
||||
autoar_compressor_set_output_is_dest (compressor, TRUE);
|
||||
|
||||
@@ -9057,6 +9060,7 @@ nautilus_file_operations_compress (GList *files,
|
||||
GFile *output,
|
||||
AutoarFormat format,
|
||||
AutoarFilter filter,
|
||||
+ const gchar *passphrase,
|
||||
GtkWindow *parent_window,
|
||||
NautilusFileOperationsDBusData *dbus_data,
|
||||
NautilusCreateCallback done_callback,
|
||||
@@ -9072,6 +9076,7 @@ nautilus_file_operations_compress (GList *files,
|
||||
compress_job->output_file = g_object_ref (output);
|
||||
compress_job->format = format;
|
||||
compress_job->filter = filter;
|
||||
+ compress_job->passphrase = g_strdup (passphrase);
|
||||
compress_job->done_callback = done_callback;
|
||||
compress_job->done_callback_data = done_callback_data;
|
||||
|
||||
@@ -9082,7 +9087,8 @@ nautilus_file_operations_compress (GList *files,
|
||||
compress_job->common.undo_info = nautilus_file_undo_info_compress_new (files,
|
||||
output,
|
||||
format,
|
||||
- filter);
|
||||
+ filter,
|
||||
+ passphrase);
|
||||
}
|
||||
|
||||
task = g_task_new (NULL, compress_job->common.cancellable,
|
||||
diff --git a/src/nautilus-file-operations.h b/src/nautilus-file-operations.h
|
||||
index 8236e0e06..14d664f80 100644
|
||||
--- a/src/nautilus-file-operations.h
|
||||
+++ b/src/nautilus-file-operations.h
|
||||
@@ -159,6 +159,7 @@ void nautilus_file_operations_compress (GList *files,
|
||||
GFile *output,
|
||||
AutoarFormat format,
|
||||
AutoarFilter filter,
|
||||
+ const gchar *passphrase,
|
||||
GtkWindow *parent_window,
|
||||
NautilusFileOperationsDBusData *dbus_data,
|
||||
NautilusCreateCallback done_callback,
|
||||
diff --git a/src/nautilus-file-undo-operations.c b/src/nautilus-file-undo-operations.c
|
||||
index a6a3b2025..64f9ce76c 100644
|
||||
--- a/src/nautilus-file-undo-operations.c
|
||||
+++ b/src/nautilus-file-undo-operations.c
|
||||
@@ -2495,6 +2495,7 @@ struct _NautilusFileUndoInfoCompress
|
||||
GFile *output;
|
||||
AutoarFormat format;
|
||||
AutoarFilter filter;
|
||||
+ gchar *passphrase;
|
||||
};
|
||||
|
||||
G_DEFINE_TYPE (NautilusFileUndoInfoCompress, nautilus_file_undo_info_compress, NAUTILUS_TYPE_FILE_UNDO_INFO)
|
||||
@@ -2562,6 +2563,7 @@ compress_redo_func (NautilusFileUndoInfo *info,
|
||||
self->output,
|
||||
self->format,
|
||||
self->filter,
|
||||
+ self->passphrase,
|
||||
parent_window,
|
||||
dbus_data,
|
||||
compress_callback,
|
||||
@@ -2597,6 +2599,7 @@ nautilus_file_undo_info_compress_finalize (GObject *obj)
|
||||
|
||||
g_list_free_full (self->sources, g_object_unref);
|
||||
g_clear_object (&self->output);
|
||||
+ g_free (self->passphrase);
|
||||
|
||||
G_OBJECT_CLASS (nautilus_file_undo_info_compress_parent_class)->finalize (obj);
|
||||
}
|
||||
@@ -2618,7 +2621,8 @@ NautilusFileUndoInfo *
|
||||
nautilus_file_undo_info_compress_new (GList *sources,
|
||||
GFile *output,
|
||||
AutoarFormat format,
|
||||
- AutoarFilter filter)
|
||||
+ AutoarFilter filter,
|
||||
+ const gchar *passphrase)
|
||||
{
|
||||
NautilusFileUndoInfoCompress *self;
|
||||
|
||||
@@ -2631,6 +2635,7 @@ nautilus_file_undo_info_compress_new (GList *sources,
|
||||
self->output = g_object_ref (output);
|
||||
self->format = format;
|
||||
self->filter = filter;
|
||||
+ self->passphrase = g_strdup (passphrase);
|
||||
|
||||
return NAUTILUS_FILE_UNDO_INFO (self);
|
||||
}
|
||||
diff --git a/src/nautilus-file-undo-operations.h b/src/nautilus-file-undo-operations.h
|
||||
index f96f2fe69..09ae17cef 100644
|
||||
--- a/src/nautilus-file-undo-operations.h
|
||||
+++ b/src/nautilus-file-undo-operations.h
|
||||
@@ -226,4 +226,5 @@ G_DECLARE_FINAL_TYPE (NautilusFileUndoInfoCompress, nautilus_file_undo_info_comp
|
||||
NautilusFileUndoInfo * nautilus_file_undo_info_compress_new (GList *sources,
|
||||
GFile *output,
|
||||
AutoarFormat format,
|
||||
- AutoarFilter filter);
|
||||
+ AutoarFilter filter,
|
||||
+ const gchar *passphrase);
|
||||
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
|
||||
index b4a91226b..47aed3cc1 100644
|
||||
--- a/src/nautilus-files-view.c
|
||||
+++ b/src/nautilus-files-view.c
|
||||
@@ -2235,6 +2235,7 @@ compress_dialog_controller_on_name_accepted (NautilusFileNameWidgetController *c
|
||||
NautilusFilesViewPrivate *priv;
|
||||
AutoarFormat format;
|
||||
AutoarFilter filter;
|
||||
+ const gchar *passphrase = NULL;
|
||||
|
||||
view = NAUTILUS_FILES_VIEW (callback_data->view);
|
||||
priv = nautilus_files_view_get_instance_private (view);
|
||||
@@ -2280,6 +2281,14 @@ compress_dialog_controller_on_name_accepted (NautilusFileNameWidgetController *c
|
||||
}
|
||||
break;
|
||||
|
||||
+ case NAUTILUS_COMPRESSION_ENCRYPTED_ZIP:
|
||||
+ {
|
||||
+ format = AUTOAR_FORMAT_ZIP;
|
||||
+ filter = AUTOAR_FILTER_NONE;
|
||||
+ passphrase = nautilus_compress_dialog_controller_get_passphrase (priv->compress_controller);
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
case NAUTILUS_COMPRESSION_TAR_XZ:
|
||||
{
|
||||
format = AUTOAR_FORMAT_TAR;
|
||||
@@ -2301,6 +2310,7 @@ compress_dialog_controller_on_name_accepted (NautilusFileNameWidgetController *c
|
||||
nautilus_file_operations_compress (source_files, output,
|
||||
format,
|
||||
filter,
|
||||
+ passphrase,
|
||||
nautilus_files_view_get_containing_window (view),
|
||||
NULL,
|
||||
compress_done,
|
||||
diff --git a/src/nautilus-global-preferences.h b/src/nautilus-global-preferences.h
|
||||
index 8c482f7ce..2e8753b3c 100644
|
||||
--- a/src/nautilus-global-preferences.h
|
||||
+++ b/src/nautilus-global-preferences.h
|
||||
@@ -77,7 +77,8 @@ typedef enum
|
||||
{
|
||||
NAUTILUS_COMPRESSION_ZIP = 0,
|
||||
NAUTILUS_COMPRESSION_TAR_XZ,
|
||||
- NAUTILUS_COMPRESSION_7ZIP
|
||||
+ NAUTILUS_COMPRESSION_7ZIP,
|
||||
+ NAUTILUS_COMPRESSION_ENCRYPTED_ZIP
|
||||
} NautilusCompressionFormat;
|
||||
|
||||
/* Icon View */
|
||||
diff --git a/src/resources/css/nautilus.css b/src/resources/css/nautilus.css
|
||||
index 2e46b7abe..ee25a36a8 100644
|
||||
--- a/src/resources/css/nautilus.css
|
||||
+++ b/src/resources/css/nautilus.css
|
||||
@@ -3,3 +3,12 @@
|
||||
padding-left: 5px;
|
||||
padding-right: 5px;
|
||||
}
|
||||
+
|
||||
+label.encrypted_zip,
|
||||
+row.encrypted_zip label.title {
|
||||
+ background-image: -gtk-icontheme('system-lock-screen-symbolic');
|
||||
+ background-position: right center;
|
||||
+ background-repeat: no-repeat;
|
||||
+ background-size: 16px 16px;
|
||||
+ padding-right: 24px;
|
||||
+}
|
||||
diff --git a/src/resources/ui/nautilus-compress-dialog.ui b/src/resources/ui/nautilus-compress-dialog.ui
|
||||
index b36539294..a57765eed 100644
|
||||
--- a/src/resources/ui/nautilus-compress-dialog.ui
|
||||
+++ b/src/resources/ui/nautilus-compress-dialog.ui
|
||||
@@ -28,6 +28,26 @@
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
+ <child>
|
||||
+ <object class="HdyActionRow" id="encrypted_zip_row">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="activatable">True</property>
|
||||
+ <property name="title" translatable="no">.zip</property>
|
||||
+ <property name="subtitle" translatable="yes">Password protected .zip, must be installed on Windows and Mac.</property>
|
||||
+ <signal name="activated" handler="encrypted_zip_row_on_activated"/>
|
||||
+ <style>
|
||||
+ <class name="encrypted_zip"/>
|
||||
+ </style>
|
||||
+ <child>
|
||||
+ <object class="GtkImage" id="encrypted_zip_checkmark">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="width-request">16</property>
|
||||
+ <property name="margin-start">12</property>
|
||||
+ <property name="margin-end">12</property>
|
||||
+ </object>
|
||||
+ </child>
|
||||
+ </object>
|
||||
+ </child>
|
||||
<child>
|
||||
<object class="HdyActionRow">
|
||||
<property name="visible">True</property>
|
||||
@@ -129,6 +149,15 @@
|
||||
<property name="xalign">0</property>
|
||||
</object>
|
||||
</child>
|
||||
+ <child>
|
||||
+ <object class="GtkLabel" id="encrypted_zip_label">
|
||||
+ <property name="label" translatable="no">.zip</property>
|
||||
+ <property name="xalign">0</property>
|
||||
+ <style>
|
||||
+ <class name="encrypted_zip"/>
|
||||
+ </style>
|
||||
+ </object>
|
||||
+ </child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="tar_xz_label">
|
||||
<property name="label" translatable="no">.tar.xz</property>
|
||||
@@ -179,6 +208,33 @@
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
+ <child>
|
||||
+ <object class="GtkLabel" id="passphrase_label">
|
||||
+ <property name="label" translatable="yes">Password</property>
|
||||
+ <property name="margin-top">6</property>
|
||||
+ <property name="xalign">0</property>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="expand">False</property>
|
||||
+ <property name="fill">True</property>
|
||||
+ <property name="position">4</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="GtkEntry" id="passphrase_entry">
|
||||
+ <property name="placeholder-text" translatable="yes">Enter a password here.</property>
|
||||
+ <property name="input-purpose">password</property>
|
||||
+ <property name="visibility">False</property>
|
||||
+ <property name="secondary-icon-name">view-conceal</property>
|
||||
+ <signal name="changed" handler="passphrase_entry_on_changed"/>
|
||||
+ <signal name="icon-press" handler="passphrase_entry_on_icon_press"/>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="expand">False</property>
|
||||
+ <property name="fill">True</property>
|
||||
+ <property name="position">5</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="action">
|
||||
@@ -197,6 +253,7 @@
|
||||
<property name="can_default">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="sensitive">False</property>
|
||||
+ <signal name="notify::sensitive" handler="activate_button_on_sensitive_notify"/>
|
||||
</object>
|
||||
</child>
|
||||
<action-widgets>
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,173 +0,0 @@
|
||||
From f3b1a749669c241ae3802e72a22a4eb7d1a44eed Mon Sep 17 00:00:00 2001
|
||||
From: Clyde Laforge <clyde.laforge@protonmail.ch>
|
||||
Date: Mon, 16 Aug 2021 14:41:39 +0200
|
||||
Subject: [PATCH] compress-dialog: Set keyboard focus on the row with the
|
||||
selected archive format
|
||||
|
||||
Currently the keyboard focus for the type of archive choice is always on
|
||||
the first element.
|
||||
|
||||
This patch allows the focus to be on the currently selected item instead.
|
||||
|
||||
Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1944
|
||||
---
|
||||
src/nautilus-compress-dialog-controller.c | 62 ++++++++++++++++++++
|
||||
src/resources/ui/nautilus-compress-dialog.ui | 7 ++-
|
||||
2 files changed, 66 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/nautilus-compress-dialog-controller.c b/src/nautilus-compress-dialog-controller.c
|
||||
index e1ba5a803..3f7711ccb 100644
|
||||
--- a/src/nautilus-compress-dialog-controller.c
|
||||
+++ b/src/nautilus-compress-dialog-controller.c
|
||||
@@ -36,9 +36,13 @@ struct _NautilusCompressDialogController
|
||||
GtkWidget *error_label;
|
||||
GtkWidget *name_entry;
|
||||
GtkWidget *extension_stack;
|
||||
+ GtkWidget *zip_row;
|
||||
GtkWidget *zip_label;
|
||||
+ GtkWidget *encrypted_zip_row;
|
||||
GtkWidget *encrypted_zip_label;
|
||||
+ GtkWidget *tar_xz_row;
|
||||
GtkWidget *tar_xz_label;
|
||||
+ GtkWidget *seven_zip_row;
|
||||
GtkWidget *seven_zip_label;
|
||||
GtkWidget *extension_popover;
|
||||
GtkWidget *zip_checkmark;
|
||||
@@ -348,6 +352,50 @@ activate_button_on_sensitive_notify (GObject *gobject,
|
||||
}
|
||||
}
|
||||
|
||||
+static void
|
||||
+popover_on_show (GtkWidget *widget,
|
||||
+ gpointer user_data)
|
||||
+{
|
||||
+ NautilusCompressDialogController *self;
|
||||
+ NautilusCompressionFormat format;
|
||||
+
|
||||
+ self = NAUTILUS_COMPRESS_DIALOG_CONTROLLER (user_data);
|
||||
+ format = g_settings_get_enum (nautilus_compression_preferences,
|
||||
+ NAUTILUS_PREFERENCES_DEFAULT_COMPRESSION_FORMAT);
|
||||
+ switch (format)
|
||||
+ {
|
||||
+ case NAUTILUS_COMPRESSION_ZIP:
|
||||
+ {
|
||||
+ gtk_widget_grab_focus (self->zip_row);
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ case NAUTILUS_COMPRESSION_ENCRYPTED_ZIP:
|
||||
+ {
|
||||
+ gtk_widget_grab_focus (self->encrypted_zip_row);
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ case NAUTILUS_COMPRESSION_TAR_XZ:
|
||||
+ {
|
||||
+ gtk_widget_grab_focus (self->tar_xz_row);
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ case NAUTILUS_COMPRESSION_7ZIP:
|
||||
+ {
|
||||
+ gtk_widget_grab_focus (self->seven_zip_row);
|
||||
+ }
|
||||
+ break;
|
||||
+
|
||||
+ default:
|
||||
+ {
|
||||
+ g_assert_not_reached ();
|
||||
+ }
|
||||
+ break;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
NautilusCompressDialogController *
|
||||
nautilus_compress_dialog_controller_new (GtkWindow *parent_window,
|
||||
NautilusDirectory *destination_directory,
|
||||
@@ -361,9 +409,13 @@ nautilus_compress_dialog_controller_new (GtkWindow *parent_window,
|
||||
GtkWidget *name_entry;
|
||||
GtkWidget *activate_button;
|
||||
GtkWidget *extension_stack;
|
||||
+ GtkWidget *zip_row;
|
||||
GtkWidget *zip_label;
|
||||
+ GtkWidget *encrypted_zip_row;
|
||||
GtkWidget *encrypted_zip_label;
|
||||
+ GtkWidget *tar_xz_row;
|
||||
GtkWidget *tar_xz_label;
|
||||
+ GtkWidget *seven_zip_row;
|
||||
GtkWidget *seven_zip_label;
|
||||
GtkWidget *extension_popover;
|
||||
GtkWidget *zip_checkmark;
|
||||
@@ -392,6 +444,10 @@ nautilus_compress_dialog_controller_new (GtkWindow *parent_window,
|
||||
seven_zip_checkmark = GTK_WIDGET (gtk_builder_get_object (builder, "seven_zip_checkmark"));
|
||||
passphrase_label = GTK_WIDGET (gtk_builder_get_object (builder, "passphrase_label"));
|
||||
passphrase_entry = GTK_WIDGET (gtk_builder_get_object (builder, "passphrase_entry"));
|
||||
+ zip_row = GTK_WIDGET (gtk_builder_get_object (builder, "zip_row"));
|
||||
+ encrypted_zip_row = GTK_WIDGET (gtk_builder_get_object (builder, "encrypted_zip_row"));
|
||||
+ tar_xz_row = GTK_WIDGET (gtk_builder_get_object (builder, "tar_xz_row"));
|
||||
+ seven_zip_row = GTK_WIDGET (gtk_builder_get_object (builder, "seven_zip_row"));
|
||||
|
||||
gtk_window_set_transient_for (GTK_WINDOW (compress_dialog),
|
||||
parent_window);
|
||||
@@ -420,6 +476,10 @@ nautilus_compress_dialog_controller_new (GtkWindow *parent_window,
|
||||
self->name_entry = name_entry;
|
||||
self->passphrase_label = passphrase_label;
|
||||
self->passphrase_entry = passphrase_entry;
|
||||
+ self->zip_row = zip_row;
|
||||
+ self->encrypted_zip_row = encrypted_zip_row;
|
||||
+ self->tar_xz_row = tar_xz_row;
|
||||
+ self->seven_zip_row = seven_zip_row;
|
||||
|
||||
self->response_handler_id = g_signal_connect (compress_dialog,
|
||||
"response",
|
||||
@@ -441,6 +501,8 @@ nautilus_compress_dialog_controller_new (GtkWindow *parent_window,
|
||||
G_CALLBACK (passphrase_entry_on_icon_press),
|
||||
"activate_button_on_sensitive_notify",
|
||||
G_CALLBACK (activate_button_on_sensitive_notify),
|
||||
+ "popover_on_show",
|
||||
+ G_CALLBACK (popover_on_show),
|
||||
NULL);
|
||||
gtk_builder_connect_signals (builder, self);
|
||||
|
||||
diff --git a/src/resources/ui/nautilus-compress-dialog.ui b/src/resources/ui/nautilus-compress-dialog.ui
|
||||
index a57765eed..a6bf9c1fb 100644
|
||||
--- a/src/resources/ui/nautilus-compress-dialog.ui
|
||||
+++ b/src/resources/ui/nautilus-compress-dialog.ui
|
||||
@@ -2,6 +2,7 @@
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.14"/>
|
||||
<object class="GtkPopover" id="extension_popover">
|
||||
+ <signal name="show" handler="popover_on_show"/>
|
||||
<property name="position">bottom</property>
|
||||
<property name="constrain-to">none</property>
|
||||
<child>
|
||||
@@ -12,7 +13,7 @@
|
||||
<property name="margin-start">12</property>
|
||||
<property name="margin-end">12</property>
|
||||
<child>
|
||||
- <object class="HdyActionRow">
|
||||
+ <object class="HdyActionRow" id="zip_row">
|
||||
<property name="visible">True</property>
|
||||
<property name="activatable">True</property>
|
||||
<property name="title" translatable="no">.zip</property>
|
||||
@@ -49,7 +50,7 @@
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
- <object class="HdyActionRow">
|
||||
+ <object class="HdyActionRow" id="tar_xz_row">
|
||||
<property name="visible">True</property>
|
||||
<property name="activatable">True</property>
|
||||
<property name="title" translatable="no">.tar.xz</property>
|
||||
@@ -66,7 +67,7 @@
|
||||
</object>
|
||||
</child>
|
||||
<child>
|
||||
- <object class="HdyActionRow">
|
||||
+ <object class="HdyActionRow" id="seven_zip_row">
|
||||
<property name="visible">True</property>
|
||||
<property name="activatable">True</property>
|
||||
<property name="title" translatable="no">.7z</property>
|
||||
--
|
||||
2.33.1
|
||||
|
@ -1,564 +0,0 @@
|
||||
From e71b54bafcbfffcb352600ebff4be8776de171f9 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Holy <oholy@redhat.com>
|
||||
Date: Fri, 30 Jul 2021 11:01:42 +0200
|
||||
Subject: [PATCH] compress-dialog: Update dialog design
|
||||
|
||||
Let's update the Compress dialog design as per the mockup for the
|
||||
encrypted archives support. The most visible change is `GtkPopover`
|
||||
with `HdyActionRow` rows for the format selection instead of the
|
||||
`GtkRadioButton` buttons.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/nautilus/-/issues/822
|
||||
---
|
||||
src/nautilus-compress-dialog-controller.c | 132 ++++++-----
|
||||
src/resources/ui/nautilus-compress-dialog.ui | 229 ++++++++++---------
|
||||
2 files changed, 199 insertions(+), 162 deletions(-)
|
||||
|
||||
diff --git a/src/nautilus-compress-dialog-controller.c b/src/nautilus-compress-dialog-controller.c
|
||||
index d8aa792ee..154573c0f 100644
|
||||
--- a/src/nautilus-compress-dialog-controller.c
|
||||
+++ b/src/nautilus-compress-dialog-controller.c
|
||||
@@ -19,6 +19,7 @@
|
||||
|
||||
#include <glib/gi18n.h>
|
||||
#include <gnome-autoar/gnome-autoar.h>
|
||||
+#include <libhandy-1/handy.h>
|
||||
|
||||
#include <eel/eel-vfs-extensions.h>
|
||||
|
||||
@@ -31,11 +32,15 @@ struct _NautilusCompressDialogController
|
||||
NautilusFileNameWidgetController parent_instance;
|
||||
|
||||
GtkWidget *compress_dialog;
|
||||
- GtkWidget *description_stack;
|
||||
GtkWidget *name_entry;
|
||||
- GtkWidget *zip_radio_button;
|
||||
- GtkWidget *tar_xz_radio_button;
|
||||
- GtkWidget *seven_zip_radio_button;
|
||||
+ GtkWidget *extension_stack;
|
||||
+ GtkWidget *zip_label;
|
||||
+ GtkWidget *tar_xz_label;
|
||||
+ GtkWidget *seven_zip_label;
|
||||
+ GtkWidget *extension_popover;
|
||||
+ GtkWidget *zip_checkmark;
|
||||
+ GtkWidget *tar_xz_checkmark;
|
||||
+ GtkWidget *seven_zip_checkmark;
|
||||
|
||||
const char *extension;
|
||||
|
||||
@@ -135,32 +140,32 @@ update_selected_format (NautilusCompressDialogController *self,
|
||||
NautilusCompressionFormat format)
|
||||
{
|
||||
const char *extension;
|
||||
- const char *description_label_name;
|
||||
- GtkWidget *active_button;
|
||||
+ GtkWidget *active_label;
|
||||
+ GtkWidget *active_checkmark;
|
||||
|
||||
switch (format)
|
||||
{
|
||||
case NAUTILUS_COMPRESSION_ZIP:
|
||||
{
|
||||
extension = ".zip";
|
||||
- description_label_name = "zip-description-label";
|
||||
- active_button = self->zip_radio_button;
|
||||
+ active_label = self->zip_label;
|
||||
+ active_checkmark = self->zip_checkmark;
|
||||
}
|
||||
break;
|
||||
|
||||
case NAUTILUS_COMPRESSION_TAR_XZ:
|
||||
{
|
||||
extension = ".tar.xz";
|
||||
- description_label_name = "tar-xz-description-label";
|
||||
- active_button = self->tar_xz_radio_button;
|
||||
+ active_label = self->tar_xz_label;
|
||||
+ active_checkmark = self->tar_xz_checkmark;
|
||||
}
|
||||
break;
|
||||
|
||||
case NAUTILUS_COMPRESSION_7ZIP:
|
||||
{
|
||||
extension = ".7z";
|
||||
- description_label_name = "seven-zip-description-label";
|
||||
- active_button = self->seven_zip_radio_button;
|
||||
+ active_label = self->seven_zip_label;
|
||||
+ active_checkmark = self->seven_zip_checkmark;
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -173,11 +178,21 @@ update_selected_format (NautilusCompressDialogController *self,
|
||||
|
||||
self->extension = extension;
|
||||
|
||||
- gtk_stack_set_visible_child_name (GTK_STACK (self->description_stack),
|
||||
- description_label_name);
|
||||
-
|
||||
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (active_button),
|
||||
- TRUE);
|
||||
+ gtk_stack_set_visible_child (GTK_STACK (self->extension_stack),
|
||||
+ active_label);
|
||||
+
|
||||
+ gtk_image_set_from_icon_name (GTK_IMAGE (self->zip_checkmark),
|
||||
+ NULL,
|
||||
+ GTK_ICON_SIZE_BUTTON);
|
||||
+ gtk_image_set_from_icon_name (GTK_IMAGE (self->tar_xz_checkmark),
|
||||
+ NULL,
|
||||
+ GTK_ICON_SIZE_BUTTON);
|
||||
+ gtk_image_set_from_icon_name (GTK_IMAGE (self->seven_zip_checkmark),
|
||||
+ NULL,
|
||||
+ GTK_ICON_SIZE_BUTTON);
|
||||
+ gtk_image_set_from_icon_name (GTK_IMAGE (active_checkmark),
|
||||
+ "object-select-symbolic",
|
||||
+ GTK_ICON_SIZE_BUTTON);
|
||||
|
||||
g_settings_set_enum (nautilus_compression_preferences,
|
||||
NAUTILUS_PREFERENCES_DEFAULT_COMPRESSION_FORMAT,
|
||||
@@ -189,52 +204,40 @@ update_selected_format (NautilusCompressDialogController *self,
|
||||
}
|
||||
|
||||
static void
|
||||
-zip_radio_button_on_toggled (GtkToggleButton *toggle_button,
|
||||
- gpointer user_data)
|
||||
+zip_row_on_activated (HdyActionRow *row,
|
||||
+ gpointer user_data)
|
||||
{
|
||||
NautilusCompressDialogController *controller;
|
||||
|
||||
controller = NAUTILUS_COMPRESS_DIALOG_CONTROLLER (user_data);
|
||||
|
||||
- if (!gtk_toggle_button_get_active (toggle_button))
|
||||
- {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
+ gtk_popover_popdown (GTK_POPOVER (controller->extension_popover));
|
||||
update_selected_format (controller,
|
||||
NAUTILUS_COMPRESSION_ZIP);
|
||||
}
|
||||
|
||||
static void
|
||||
-tar_xz_radio_button_on_toggled (GtkToggleButton *toggle_button,
|
||||
- gpointer user_data)
|
||||
+tar_xz_row_on_activated (HdyActionRow *row,
|
||||
+ gpointer user_data)
|
||||
{
|
||||
NautilusCompressDialogController *controller;
|
||||
|
||||
controller = NAUTILUS_COMPRESS_DIALOG_CONTROLLER (user_data);
|
||||
|
||||
- if (!gtk_toggle_button_get_active (toggle_button))
|
||||
- {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
+ gtk_popover_popdown (GTK_POPOVER (controller->extension_popover));
|
||||
update_selected_format (controller,
|
||||
NAUTILUS_COMPRESSION_TAR_XZ);
|
||||
}
|
||||
|
||||
static void
|
||||
-seven_zip_radio_button_on_toggled (GtkToggleButton *toggle_button,
|
||||
- gpointer user_data)
|
||||
+seven_zip_row_on_activated (HdyActionRow *row,
|
||||
+ gpointer user_data)
|
||||
{
|
||||
NautilusCompressDialogController *controller;
|
||||
|
||||
controller = NAUTILUS_COMPRESS_DIALOG_CONTROLLER (user_data);
|
||||
|
||||
- if (!gtk_toggle_button_get_active (toggle_button))
|
||||
- {
|
||||
- return;
|
||||
- }
|
||||
-
|
||||
+ gtk_popover_popdown (GTK_POPOVER (controller->extension_popover));
|
||||
update_selected_format (controller,
|
||||
NAUTILUS_COMPRESSION_7ZIP);
|
||||
}
|
||||
@@ -251,10 +254,14 @@ nautilus_compress_dialog_controller_new (GtkWindow *parent_window,
|
||||
GtkWidget *error_label;
|
||||
GtkWidget *name_entry;
|
||||
GtkWidget *activate_button;
|
||||
- GtkWidget *description_stack;
|
||||
- GtkWidget *zip_radio_button;
|
||||
- GtkWidget *tar_xz_radio_button;
|
||||
- GtkWidget *seven_zip_radio_button;
|
||||
+ GtkWidget *extension_stack;
|
||||
+ GtkWidget *zip_label;
|
||||
+ GtkWidget *tar_xz_label;
|
||||
+ GtkWidget *seven_zip_label;
|
||||
+ GtkWidget *extension_popover;
|
||||
+ GtkWidget *zip_checkmark;
|
||||
+ GtkWidget *tar_xz_checkmark;
|
||||
+ GtkWidget *seven_zip_checkmark;
|
||||
NautilusCompressionFormat format;
|
||||
|
||||
builder = gtk_builder_new_from_resource ("/org/gnome/nautilus/ui/nautilus-compress-dialog.ui");
|
||||
@@ -263,10 +270,14 @@ nautilus_compress_dialog_controller_new (GtkWindow *parent_window,
|
||||
error_label = GTK_WIDGET (gtk_builder_get_object (builder, "error_label"));
|
||||
name_entry = GTK_WIDGET (gtk_builder_get_object (builder, "name_entry"));
|
||||
activate_button = GTK_WIDGET (gtk_builder_get_object (builder, "activate_button"));
|
||||
- zip_radio_button = GTK_WIDGET (gtk_builder_get_object (builder, "zip_radio_button"));
|
||||
- tar_xz_radio_button = GTK_WIDGET (gtk_builder_get_object (builder, "tar_xz_radio_button"));
|
||||
- seven_zip_radio_button = GTK_WIDGET (gtk_builder_get_object (builder, "seven_zip_radio_button"));
|
||||
- description_stack = GTK_WIDGET (gtk_builder_get_object (builder, "description_stack"));
|
||||
+ extension_stack = GTK_WIDGET (gtk_builder_get_object (builder, "extension_stack"));
|
||||
+ zip_label = GTK_WIDGET (gtk_builder_get_object (builder, "zip_label"));
|
||||
+ tar_xz_label = GTK_WIDGET (gtk_builder_get_object (builder, "tar_xz_label"));
|
||||
+ seven_zip_label = GTK_WIDGET (gtk_builder_get_object (builder, "seven_zip_label"));
|
||||
+ extension_popover = GTK_WIDGET (gtk_builder_get_object (builder, "extension_popover"));
|
||||
+ zip_checkmark = GTK_WIDGET (gtk_builder_get_object (builder, "zip_checkmark"));
|
||||
+ tar_xz_checkmark = GTK_WIDGET (gtk_builder_get_object (builder, "tar_xz_checkmark"));
|
||||
+ seven_zip_checkmark = GTK_WIDGET (gtk_builder_get_object (builder, "seven_zip_checkmark"));
|
||||
|
||||
gtk_window_set_transient_for (GTK_WINDOW (compress_dialog),
|
||||
parent_window);
|
||||
@@ -279,10 +290,15 @@ nautilus_compress_dialog_controller_new (GtkWindow *parent_window,
|
||||
"containing-directory", destination_directory, NULL);
|
||||
|
||||
self->compress_dialog = compress_dialog;
|
||||
- self->zip_radio_button = zip_radio_button;
|
||||
- self->tar_xz_radio_button = tar_xz_radio_button;
|
||||
- self->seven_zip_radio_button = seven_zip_radio_button;
|
||||
- self->description_stack = description_stack;
|
||||
+ self->extension_stack = extension_stack;
|
||||
+ self->zip_label = zip_label;
|
||||
+ self->tar_xz_label = tar_xz_label;
|
||||
+ self->seven_zip_label = seven_zip_label;
|
||||
+ self->name_entry = name_entry;
|
||||
+ self->extension_popover = extension_popover;
|
||||
+ self->zip_checkmark = zip_checkmark;
|
||||
+ self->tar_xz_checkmark = tar_xz_checkmark;
|
||||
+ self->seven_zip_checkmark = seven_zip_checkmark;
|
||||
self->name_entry = name_entry;
|
||||
|
||||
self->response_handler_id = g_signal_connect (compress_dialog,
|
||||
@@ -291,20 +307,18 @@ nautilus_compress_dialog_controller_new (GtkWindow *parent_window,
|
||||
self);
|
||||
|
||||
gtk_builder_add_callback_symbols (builder,
|
||||
- "zip_radio_button_on_toggled",
|
||||
- G_CALLBACK (zip_radio_button_on_toggled),
|
||||
- "tar_xz_radio_button_on_toggled",
|
||||
- G_CALLBACK (tar_xz_radio_button_on_toggled),
|
||||
- "seven_zip_radio_button_on_toggled",
|
||||
- G_CALLBACK (seven_zip_radio_button_on_toggled),
|
||||
+ "zip_row_on_activated",
|
||||
+ G_CALLBACK (zip_row_on_activated),
|
||||
+ "tar_xz_row_on_activated",
|
||||
+ G_CALLBACK (tar_xz_row_on_activated),
|
||||
+ "seven_zip_row_on_activated",
|
||||
+ G_CALLBACK (seven_zip_row_on_activated),
|
||||
NULL);
|
||||
gtk_builder_connect_signals (builder, self);
|
||||
|
||||
format = g_settings_get_enum (nautilus_compression_preferences,
|
||||
NAUTILUS_PREFERENCES_DEFAULT_COMPRESSION_FORMAT);
|
||||
|
||||
- update_selected_format (self, format);
|
||||
-
|
||||
if (initial_name != NULL)
|
||||
{
|
||||
gtk_entry_set_text (GTK_ENTRY (name_entry), initial_name);
|
||||
@@ -312,6 +326,8 @@ nautilus_compress_dialog_controller_new (GtkWindow *parent_window,
|
||||
|
||||
gtk_widget_show_all (compress_dialog);
|
||||
|
||||
+ update_selected_format (self, format);
|
||||
+
|
||||
return self;
|
||||
}
|
||||
|
||||
diff --git a/src/resources/ui/nautilus-compress-dialog.ui b/src/resources/ui/nautilus-compress-dialog.ui
|
||||
index 526e9eed2..b36539294 100644
|
||||
--- a/src/resources/ui/nautilus-compress-dialog.ui
|
||||
+++ b/src/resources/ui/nautilus-compress-dialog.ui
|
||||
@@ -1,6 +1,70 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.14"/>
|
||||
+ <object class="GtkPopover" id="extension_popover">
|
||||
+ <property name="position">bottom</property>
|
||||
+ <property name="constrain-to">none</property>
|
||||
+ <child>
|
||||
+ <object class="HdyPreferencesGroup">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="margin-top">12</property>
|
||||
+ <property name="margin-bottom">12</property>
|
||||
+ <property name="margin-start">12</property>
|
||||
+ <property name="margin-end">12</property>
|
||||
+ <child>
|
||||
+ <object class="HdyActionRow">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="activatable">True</property>
|
||||
+ <property name="title" translatable="no">.zip</property>
|
||||
+ <property name="subtitle" translatable="yes">Compatible with all operating systems.</property>
|
||||
+ <signal name="activated" handler="zip_row_on_activated"/>
|
||||
+ <child>
|
||||
+ <object class="GtkImage" id="zip_checkmark">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="width-request">16</property>
|
||||
+ <property name="margin-start">12</property>
|
||||
+ <property name="margin-end">12</property>
|
||||
+ </object>
|
||||
+ </child>
|
||||
+ </object>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="HdyActionRow">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="activatable">True</property>
|
||||
+ <property name="title" translatable="no">.tar.xz</property>
|
||||
+ <property name="subtitle" translatable="yes">Smaller archives but Linux and Mac only.</property>
|
||||
+ <signal name="activated" handler="tar_xz_row_on_activated"/>
|
||||
+ <child>
|
||||
+ <object class="GtkImage" id="tar_xz_checkmark">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="width-request">16</property>
|
||||
+ <property name="margin-start">12</property>
|
||||
+ <property name="margin-end">12</property>
|
||||
+ </object>
|
||||
+ </child>
|
||||
+ </object>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="HdyActionRow">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="activatable">True</property>
|
||||
+ <property name="title" translatable="no">.7z</property>
|
||||
+ <property name="subtitle" translatable="yes">Smaller archives but must be installed on Windows and Mac.</property>
|
||||
+ <signal name="activated" handler="seven_zip_row_on_activated"/>
|
||||
+ <child>
|
||||
+ <object class="GtkImage" id="seven_zip_checkmark">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="width-request">16</property>
|
||||
+ <property name="margin-start">12</property>
|
||||
+ <property name="margin-end">12</property>
|
||||
+ </object>
|
||||
+ </child>
|
||||
+ </object>
|
||||
+ </child>
|
||||
+ </object>
|
||||
+ </child>
|
||||
+ </object>
|
||||
<object class="GtkDialog" id="compress_dialog">
|
||||
<property name="title" translatable="yes">Create Archive</property>
|
||||
<property name="resizable">False</property>
|
||||
@@ -9,19 +73,26 @@
|
||||
<property name="destroy_with_parent">True</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<property name="use-header-bar">1</property>
|
||||
+ <property name="default-width">500</property>
|
||||
+ <property name="default-height">210</property>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox" id="vbox">
|
||||
<property name="orientation">vertical</property>
|
||||
- <property name="margin_top">18</property>
|
||||
- <property name="margin_bottom">12</property>
|
||||
- <property name="margin_start">18</property>
|
||||
- <property name="margin_end">18</property>
|
||||
+ <property name="margin-top">30</property>
|
||||
+ <property name="margin-bottom">30</property>
|
||||
+ <property name="margin-start">30</property>
|
||||
+ <property name="margin-end">30</property>
|
||||
+ <property name="width-request">390</property>
|
||||
+ <property name="halign">center</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="name_label">
|
||||
<property name="label" translatable="yes">Archive name</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
+ <attributes>
|
||||
+ <attribute name="weight" value="bold"/>
|
||||
+ </attributes>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
@@ -30,132 +101,82 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
- <object class="GtkEntry" id="name_entry">
|
||||
- <property name="visible">True</property>
|
||||
- <property name="can_focus">True</property>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="expand">False</property>
|
||||
- <property name="fill">True</property>
|
||||
- <property name="position">2</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkRevealer" id="error_revealer">
|
||||
- <child>
|
||||
- <object class="GtkLabel" id="error_label">
|
||||
- <property name="margin_top">4</property>
|
||||
- <property name="margin_bottom">4</property>
|
||||
- <property name="visible">True</property>
|
||||
- <property name="xalign">0</property>
|
||||
- </object>
|
||||
- </child>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="expand">False</property>
|
||||
- <property name="fill">True</property>
|
||||
- <property name="position">3</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkBox" id="hbox">
|
||||
+ <object class="GtkBox">
|
||||
<property name="orientation">horizontal</property>
|
||||
- <property name="homogeneous">True</property>
|
||||
- <property name="spacing">0</property>
|
||||
- <child>
|
||||
- <object class="GtkRadioButton" id="zip_radio_button">
|
||||
- <property name="label" translatable="no">.zip</property>
|
||||
- <property name="draw_indicator">True</property>
|
||||
- <signal name="toggled" handler="zip_radio_button_on_toggled"/>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="expand">True</property>
|
||||
- <property name="fill">True</property>
|
||||
- <property name="position">0</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
+ <property name="spacing">12</property>
|
||||
<child>
|
||||
- <object class="GtkRadioButton" id="tar_xz_radio_button">
|
||||
- <property name="label" translatable="no">.tar.xz</property>
|
||||
- <property name="group">zip_radio_button</property>
|
||||
- <property name="draw_indicator">True</property>
|
||||
- <signal name="toggled" handler="tar_xz_radio_button_on_toggled"/>
|
||||
+ <object class="GtkEntry" id="name_entry">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">True</property>
|
||||
+ <property name="width-chars">30</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
- <property name="fill">True</property>
|
||||
- <property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
- <object class="GtkRadioButton" id="seven_zip_radio_button">
|
||||
- <property name="label" translatable="no">.7z</property>
|
||||
- <property name="group">zip_radio_button</property>
|
||||
- <property name="draw_indicator">True</property>
|
||||
- <signal name="toggled" handler="seven_zip_radio_button_on_toggled"/>
|
||||
+ <object class="GtkMenuButton" id="extension_button">
|
||||
+ <property name="popover">extension_popover</property>
|
||||
+ <child>
|
||||
+ <object class="GtkBox">
|
||||
+ <property name="orientation">horizontal</property>
|
||||
+ <property name="spacing">6</property>
|
||||
+ <child>
|
||||
+ <object class="GtkStack" id="extension_stack">
|
||||
+ <child>
|
||||
+ <object class="GtkLabel" id="zip_label">
|
||||
+ <property name="label" translatable="no">.zip</property>
|
||||
+ <property name="xalign">0</property>
|
||||
+ </object>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="GtkLabel" id="tar_xz_label">
|
||||
+ <property name="label" translatable="no">.tar.xz</property>
|
||||
+ <property name="xalign">0</property>
|
||||
+ </object>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="GtkLabel" id="seven_zip_label">
|
||||
+ <property name="label" translatable="no">.7z</property>
|
||||
+ <property name="xalign">0</property>
|
||||
+ </object>
|
||||
+ </child>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="expand">True</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="GtkImage">
|
||||
+ <property name="icon-name">pan-down-symbolic</property>
|
||||
+ </object>
|
||||
+ </child>
|
||||
+ </object>
|
||||
+ </child>
|
||||
</object>
|
||||
- <packing>
|
||||
- <property name="expand">True</property>
|
||||
- <property name="fill">True</property>
|
||||
- <property name="position">2</property>
|
||||
- </packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
- <property name="position">4</property>
|
||||
+ <property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
- <object class="GtkStack" id="description_stack">
|
||||
- <property name="visible">True</property>
|
||||
- <property name="can_focus">False</property>
|
||||
- <property name="homogeneous">True</property>
|
||||
- <child>
|
||||
- <object class="GtkLabel" id="zip_description_label">
|
||||
- <property name="visible">True</property>
|
||||
- <property name="label" translatable="yes">Compatible with all operating systems.</property>
|
||||
- <property name="xalign">0</property>
|
||||
- <style>
|
||||
- <class name="dim-label"/>
|
||||
- </style>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="name">zip-description-label</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkLabel" id="tar_xz_description_label">
|
||||
- <property name="visible">True</property>
|
||||
- <property name="label" translatable="yes">Smaller archives but Linux and Mac only.</property>
|
||||
- <property name="xalign">0</property>
|
||||
- <style>
|
||||
- <class name="dim-label"/>
|
||||
- </style>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="name">tar-xz-description-label</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
+ <object class="GtkRevealer" id="error_revealer">
|
||||
<child>
|
||||
- <object class="GtkLabel" id="seven_zip_description_label">
|
||||
+ <object class="GtkLabel" id="error_label">
|
||||
+ <property name="margin_top">4</property>
|
||||
+ <property name="margin_bottom">4</property>
|
||||
<property name="visible">True</property>
|
||||
- <property name="label" translatable="yes">Smaller archives but must be installed on Windows and Mac.</property>
|
||||
<property name="xalign">0</property>
|
||||
- <style>
|
||||
- <class name="dim-label"/>
|
||||
- </style>
|
||||
</object>
|
||||
- <packing>
|
||||
- <property name="name">seven-zip-description-label</property>
|
||||
- </packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
- <property name="position">5</property>
|
||||
+ <property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
--
|
||||
2.31.1
|
||||
|
@ -1,52 +0,0 @@
|
||||
From 203d24f1e57991340b2870b0b956922144f0152a Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ant=C3=B3nio=20Fernandes?= <antoniojpfernandes@gmail.com>
|
||||
Date: Mon, 8 Nov 2021 18:48:47 +0000
|
||||
Subject: [PATCH] compress-dialog-controller: Fit popover fit on X11
|
||||
|
||||
Under X11, GTK3 cannot draw a GtkPopover outside of the main window area.
|
||||
|
||||
This means the popover for compress formats is clipped under X11.
|
||||
|
||||
As a workaround, make the window twice as tal when the popover is shown.
|
||||
|
||||
Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/2018
|
||||
---
|
||||
src/nautilus-compress-dialog-controller.c | 15 +++++++++++++++
|
||||
1 file changed, 15 insertions(+)
|
||||
|
||||
diff --git a/src/nautilus-compress-dialog-controller.c b/src/nautilus-compress-dialog-controller.c
|
||||
index 3f7711ccb..de83b3717 100644
|
||||
--- a/src/nautilus-compress-dialog-controller.c
|
||||
+++ b/src/nautilus-compress-dialog-controller.c
|
||||
@@ -21,6 +21,10 @@
|
||||
#include <gnome-autoar/gnome-autoar.h>
|
||||
#include <libhandy-1/handy.h>
|
||||
|
||||
+#ifdef GDK_WINDOWING_X11
|
||||
+#include <gdk/gdkx.h>
|
||||
+#endif
|
||||
+
|
||||
#include <eel/eel-vfs-extensions.h>
|
||||
|
||||
#include "nautilus-compress-dialog-controller.h"
|
||||
@@ -394,6 +398,17 @@ popover_on_show (GtkWidget *widget,
|
||||
}
|
||||
break;
|
||||
}
|
||||
+
|
||||
+#ifdef GDK_WINDOWING_X11
|
||||
+ if (GDK_IS_X11_DISPLAY (gdk_display_get_default ()))
|
||||
+ {
|
||||
+ int w, h;
|
||||
+
|
||||
+ /* Workaround for https://gitlab.gnome.org/GNOME/nautilus/-/issues/2018 */
|
||||
+ gtk_window_get_default_size (GTK_WINDOW (self->compress_dialog), &w, &h);
|
||||
+ gtk_window_resize (GTK_WINDOW (self->compress_dialog), w, h * 2);
|
||||
+ }
|
||||
+#endif
|
||||
}
|
||||
|
||||
NautilusCompressDialogController *
|
||||
--
|
||||
2.33.1
|
||||
|
@ -0,0 +1,44 @@
|
||||
From 51b543cd5106a8b929b336bc6779eddd4d2ac780 Mon Sep 17 00:00:00 2001
|
||||
From: Philip Withnall <withnall@endlessm.com>
|
||||
Date: Thu, 11 Apr 2019 12:36:21 +0100
|
||||
Subject: [PATCH] data: Fix caption capitalisation in appdata file
|
||||
|
||||
Make the capitalisation of the image captions match the translatable
|
||||
titles of the dialogues in the images, so that translations can be
|
||||
reused.
|
||||
|
||||
Signed-off-by: Philip Withnall <withnall@endlessm.com>
|
||||
---
|
||||
data/org.gnome.Nautilus.appdata.xml.in.in | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/data/org.gnome.Nautilus.appdata.xml.in.in b/data/org.gnome.Nautilus.appdata.xml.in.in
|
||||
index cb20fa05f..cfc27e533 100644
|
||||
--- a/data/org.gnome.Nautilus.appdata.xml.in.in
|
||||
+++ b/data/org.gnome.Nautilus.appdata.xml.in.in
|
||||
@@ -28,11 +28,11 @@
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
<image>https://static.gnome.org/appdata/nautilus/nautilus-201901141.png</image>
|
||||
- <caption>Tile view</caption>
|
||||
+ <caption>Tile View</caption>
|
||||
</screenshot>
|
||||
<screenshot>
|
||||
<image>https://static.gnome.org/appdata/nautilus/nautilus-201901142.png</image>
|
||||
- <caption>List view</caption>
|
||||
+ <caption>List View</caption>
|
||||
</screenshot>
|
||||
<screenshot>
|
||||
<image>https://static.gnome.org/appdata/nautilus/nautilus-201901143.png</image>
|
||||
@@ -40,7 +40,7 @@
|
||||
</screenshot>
|
||||
<screenshot>
|
||||
<image>https://static.gnome.org/appdata/nautilus/nautilus-201901144.png</image>
|
||||
- <caption>Other locations</caption>
|
||||
+ <caption>Other Locations</caption>
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
<categories>
|
||||
--
|
||||
2.21.0
|
||||
|
@ -0,0 +1,61 @@
|
||||
From 6dd492663cbd3652ebc03d06898f74bacbf87683 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Holy <oholy@redhat.com>
|
||||
Date: Wed, 3 Jul 2019 11:43:31 +0200
|
||||
Subject: [PATCH] docs: Add nautilus-autorun-software man page
|
||||
|
||||
nautilus-autorun-software is the default "x-content/unix-software"
|
||||
handler for GNOME desktop. So it is not just internal tool and thus
|
||||
it should have a man page. Let's add a simple man page for it.
|
||||
|
||||
It resolves the following downstream bug:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1725766
|
||||
---
|
||||
docs/meson.build | 1 +
|
||||
docs/nautilus-autorun-software.1 | 26 ++++++++++++++++++++++++++
|
||||
2 files changed, 27 insertions(+)
|
||||
create mode 100644 docs/nautilus-autorun-software.1
|
||||
|
||||
diff --git a/docs/meson.build b/docs/meson.build
|
||||
index b039cb631..a54574f3c 100644
|
||||
--- a/docs/meson.build
|
||||
+++ b/docs/meson.build
|
||||
@@ -1,3 +1,4 @@
|
||||
install_man('nautilus.1')
|
||||
+install_man('nautilus-autorun-software.1')
|
||||
|
||||
subdir('reference')
|
||||
diff --git a/docs/nautilus-autorun-software.1 b/docs/nautilus-autorun-software.1
|
||||
new file mode 100644
|
||||
index 000000000..9ecbd4adb
|
||||
--- /dev/null
|
||||
+++ b/docs/nautilus-autorun-software.1
|
||||
@@ -0,0 +1,26 @@
|
||||
+.TH nautilus-autorun-software 1 "3 July 2019"
|
||||
+
|
||||
+.SH NAME
|
||||
+Run Software \- helper tool
|
||||
+
|
||||
+.SH SYNOPSIS
|
||||
+.B nautilus-autorun-software
|
||||
+.RI "" "mount-uri"
|
||||
+.br
|
||||
+
|
||||
+.SH DESCRIPTION
|
||||
+.B nautilus-autorun-software
|
||||
+is a helper tool for the GNOME desktop to start software from media with
|
||||
+Autostart files.
|
||||
+.br
|
||||
+
|
||||
+It is the default "x-content/unix-software" handler for the GNOME desktop.
|
||||
+.br
|
||||
+
|
||||
+.SH SEE ALSO
|
||||
+Autostart files are described at
|
||||
+https://specifications.freedesktop.org/autostart-spec/autostart-spec-latest.html
|
||||
+
|
||||
+.SH BUGS
|
||||
+Bug reports can be found and filed at
|
||||
+https://gitlab.gnome.org/GNOME/nautilus/issues
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,76 +0,0 @@
|
||||
From 755cfdce38312dfc6572839a6fdbb1b39e1b4fe6 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Holy <oholy@redhat.com>
|
||||
Date: Wed, 7 Dec 2022 08:51:51 +0100
|
||||
Subject: [PATCH] file: Generate thumbnails when the preview icon is available
|
||||
|
||||
Currently, thumbnails are not shown for MTP/GPhoto2 locations. The
|
||||
backends return `G_FILESYSTEM_PREVIEW_TYPE_NEVER` in order to prevent
|
||||
thumbnailers to make them unresponsive. However, the backends provide
|
||||
preview icons for some file types and the `GnomeDesktopThumbnailFactory`
|
||||
is smart enough not to invoke thumbnailers if the icon is available
|
||||
(see https://bugzilla.gnome.org/show_bug.cgi?id=738503). Let's allow
|
||||
the thumbnail generation from the preview icons if they are available.
|
||||
This should not affect backend responsiveness much.
|
||||
|
||||
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1921
|
||||
---
|
||||
src/nautilus-file-private.h | 3 ++-
|
||||
src/nautilus-file.c | 14 ++++++++++++++
|
||||
2 files changed, 16 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/nautilus-file-private.h b/src/nautilus-file-private.h
|
||||
index d5d26c8b3..e9d49530c 100644
|
||||
--- a/src/nautilus-file-private.h
|
||||
+++ b/src/nautilus-file-private.h
|
||||
@@ -27,7 +27,7 @@
|
||||
#include <eel/eel-glib-extensions.h>
|
||||
|
||||
#define NAUTILUS_FILE_DEFAULT_ATTRIBUTES \
|
||||
- "standard::*,access::*,mountable::*,time::*,unix::*,owner::*,selinux::*,thumbnail::*,id::filesystem,trash::orig-path,trash::deletion-date,metadata::*,recent::*"
|
||||
+ "standard::*,access::*,mountable::*,time::*,unix::*,owner::*,selinux::*,thumbnail::*,id::filesystem,trash::orig-path,trash::deletion-date,metadata::*,recent::*,preview::icon"
|
||||
|
||||
/* These are in the typical sort order. Known things come first, then
|
||||
* things where we can't know, finally things where we don't yet know.
|
||||
@@ -185,6 +185,7 @@ struct NautilusFileDetails
|
||||
eel_boolean_bit start_stop_type : 3; /* GDriveStartStopType */
|
||||
eel_boolean_bit can_poll_for_media : 1;
|
||||
eel_boolean_bit is_media_check_automatic : 1;
|
||||
+ eel_boolean_bit has_preview_icon : 1;
|
||||
|
||||
eel_boolean_bit filesystem_readonly : 1;
|
||||
eel_boolean_bit filesystem_use_preview : 2; /* GFilesystemPreviewType */
|
||||
diff --git a/src/nautilus-file.c b/src/nautilus-file.c
|
||||
index 2999f2fa5..d9d988ccd 100644
|
||||
--- a/src/nautilus-file.c
|
||||
+++ b/src/nautilus-file.c
|
||||
@@ -2914,6 +2914,11 @@ update_info_internal (NautilusFile *file,
|
||||
file->details->trash_orig_path = g_strdup (trash_orig_path);
|
||||
}
|
||||
|
||||
+ if (g_file_info_has_attribute (info, G_FILE_ATTRIBUTE_PREVIEW_ICON))
|
||||
+ {
|
||||
+ file->details->has_preview_icon = TRUE;
|
||||
+ }
|
||||
+
|
||||
changed |=
|
||||
nautilus_file_update_metadata_from_info (file, info);
|
||||
|
||||
@@ -4836,6 +4841,15 @@ nautilus_file_should_show_thumbnail (NautilusFile *file)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+ if (show_file_thumbs != NAUTILUS_SPEED_TRADEOFF_NEVER &&
|
||||
+ file->details->has_preview_icon)
|
||||
+ {
|
||||
+ /* The thumbnail should be generated if the preview icon is available
|
||||
+ * regardless of the filesystem type (i.e. for MTP/GPhoto2 backends).
|
||||
+ */
|
||||
+ return TRUE;
|
||||
+ }
|
||||
+
|
||||
return get_speed_tradeoff_preference_for_file (file, show_file_thumbs);
|
||||
}
|
||||
|
||||
--
|
||||
2.39.2
|
||||
|
@ -1,113 +0,0 @@
|
||||
From d4e00000d46e0407841424a478eab833cf59cc12 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Holy <oholy@redhat.com>
|
||||
Date: Fri, 24 Sep 2021 09:42:54 +0200
|
||||
Subject: [PATCH] file-operations: Do not offer skipping when extracting one
|
||||
file
|
||||
|
||||
In case of extraction failure, the "Skip" and "Cancel" actions are offered
|
||||
everytime, but skipping doesn't make sense when extracting one file only.
|
||||
Let's use the same approach as it is used also for other operations, which
|
||||
is based on total number of files and remaining files. Also the "Skip All"
|
||||
action will be offered as a side-effect of this change.
|
||||
---
|
||||
src/nautilus-file-operations.c | 38 ++++++++++++++++++++++------------
|
||||
1 file changed, 25 insertions(+), 13 deletions(-)
|
||||
|
||||
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
|
||||
index 14dcf64d0..c95748ccc 100644
|
||||
--- a/src/nautilus-file-operations.c
|
||||
+++ b/src/nautilus-file-operations.c
|
||||
@@ -210,6 +210,7 @@ typedef struct
|
||||
|
||||
guint64 archive_compressed_size;
|
||||
guint64 total_compressed_size;
|
||||
+ gint total_files;
|
||||
|
||||
NautilusExtractCallback done_callback;
|
||||
gpointer done_callback_data;
|
||||
@@ -8332,6 +8333,7 @@ extract_job_on_error (AutoarExtractor *extractor,
|
||||
GFile *source_file;
|
||||
GFile *destination;
|
||||
gint response_id;
|
||||
+ gint remaining_files;
|
||||
g_autofree gchar *basename = NULL;
|
||||
|
||||
source_file = autoar_extractor_get_source_file (extractor);
|
||||
@@ -8357,25 +8359,35 @@ extract_job_on_error (AutoarExtractor *extractor,
|
||||
g_object_unref (destination);
|
||||
}
|
||||
|
||||
+ if (extract_job->common.skip_all_error)
|
||||
+ {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
basename = get_basename (source_file);
|
||||
nautilus_progress_info_take_status (extract_job->common.progress,
|
||||
g_strdup_printf (_("Error extracting “%s”"),
|
||||
basename));
|
||||
|
||||
- response_id = run_warning ((CommonJob *) extract_job,
|
||||
- g_strdup_printf (_("There was an error while extracting “%s”."),
|
||||
- basename),
|
||||
- g_strdup (error->message),
|
||||
- NULL,
|
||||
- FALSE,
|
||||
- CANCEL,
|
||||
- SKIP,
|
||||
- NULL);
|
||||
+ remaining_files = g_list_length (g_list_find_custom (extract_job->source_files,
|
||||
+ source_file,
|
||||
+ (GCompareFunc) g_file_equal)) - 1;
|
||||
+ response_id = run_cancel_or_skip_warning ((CommonJob *) extract_job,
|
||||
+ g_strdup_printf (_("There was an error while extracting “%s”."),
|
||||
+ basename),
|
||||
+ g_strdup (error->message),
|
||||
+ NULL,
|
||||
+ extract_job->total_files,
|
||||
+ remaining_files);
|
||||
|
||||
if (response_id == 0 || response_id == GTK_RESPONSE_DELETE_EVENT)
|
||||
{
|
||||
abort_job ((CommonJob *) extract_job);
|
||||
}
|
||||
+ else if (response_id == 1)
|
||||
+ {
|
||||
+ extract_job->common.skip_all_error = TRUE;
|
||||
+ }
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -8607,7 +8619,6 @@ extract_task_thread_func (GTask *task,
|
||||
{
|
||||
ExtractJob *extract_job = task_data;
|
||||
GList *l;
|
||||
- gint total_files;
|
||||
g_autofree guint64 *archive_compressed_sizes = NULL;
|
||||
gint i;
|
||||
|
||||
@@ -8618,9 +8629,10 @@ extract_task_thread_func (GTask *task,
|
||||
nautilus_progress_info_set_details (extract_job->common.progress,
|
||||
_("Preparing to extract"));
|
||||
|
||||
- total_files = g_list_length (extract_job->source_files);
|
||||
+ extract_job->total_files = g_list_length (extract_job->source_files);
|
||||
|
||||
- archive_compressed_sizes = g_malloc0_n (total_files, sizeof (guint64));
|
||||
+ archive_compressed_sizes = g_malloc0_n (extract_job->total_files,
|
||||
+ sizeof (guint64));
|
||||
extract_job->total_compressed_size = 0;
|
||||
|
||||
for (l = extract_job->source_files, i = 0;
|
||||
@@ -8691,7 +8703,7 @@ extract_task_thread_func (GTask *task,
|
||||
|
||||
if (!job_aborted ((CommonJob *) extract_job))
|
||||
{
|
||||
- report_extract_final_progress (extract_job, total_files);
|
||||
+ report_extract_final_progress (extract_job, extract_job->total_files);
|
||||
}
|
||||
|
||||
if (extract_job->common.undo_info)
|
||||
--
|
||||
2.33.1
|
||||
|
@ -1,113 +0,0 @@
|
||||
From c3b8e0d6dee8ae8d86cbc47a0745b3e9b2b814e7 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Holy <oholy@redhat.com>
|
||||
Date: Fri, 24 Sep 2021 09:56:07 +0200
|
||||
Subject: [PATCH] file-operations: Fix progress when skipping during extraction
|
||||
|
||||
The progress is wrong when extracting multiple files and some of them
|
||||
are skipped. Let's try to fix this.
|
||||
---
|
||||
src/nautilus-file-operations.c | 35 ++++++++++++++++++++++++++--------
|
||||
1 file changed, 27 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
|
||||
index c95748ccc..5fc8af2f3 100644
|
||||
--- a/src/nautilus-file-operations.c
|
||||
+++ b/src/nautilus-file-operations.c
|
||||
@@ -205,6 +205,7 @@ typedef struct
|
||||
GFile *destination_directory;
|
||||
GList *output_files;
|
||||
gboolean destination_decided;
|
||||
+ gboolean extraction_failed;
|
||||
|
||||
gdouble base_progress;
|
||||
|
||||
@@ -8346,6 +8347,8 @@ extract_job_on_error (AutoarExtractor *extractor,
|
||||
return;
|
||||
}
|
||||
|
||||
+ extract_job->extraction_failed = TRUE;
|
||||
+
|
||||
/* It is safe to use extract_job->output_files->data only when the
|
||||
* extract_job->destination_decided variable was set, see comment in the
|
||||
* extract_job_on_decide_destination function.
|
||||
@@ -8571,8 +8574,7 @@ extract_job_on_scanned (AutoarExtractor *extractor,
|
||||
}
|
||||
|
||||
static void
|
||||
-report_extract_final_progress (ExtractJob *extract_job,
|
||||
- gint total_files)
|
||||
+report_extract_final_progress (ExtractJob *extract_job)
|
||||
{
|
||||
char *status;
|
||||
g_autofree gchar *basename_dest = NULL;
|
||||
@@ -8582,7 +8584,11 @@ report_extract_final_progress (ExtractJob *extract_job,
|
||||
extract_job->destination_directory);
|
||||
basename_dest = get_basename (extract_job->destination_directory);
|
||||
|
||||
- if (total_files == 1)
|
||||
+ /* The g_list_length function is used intentionally here instead of the
|
||||
+ * extract_job->total_files variable to avoid printing wrong basename in
|
||||
+ * the case of skipped files.
|
||||
+ */
|
||||
+ if (g_list_length (extract_job->source_files) == 1)
|
||||
{
|
||||
GFile *source_file;
|
||||
g_autofree gchar *basename = NULL;
|
||||
@@ -8597,8 +8603,8 @@ report_extract_final_progress (ExtractJob *extract_job,
|
||||
{
|
||||
status = g_strdup_printf (ngettext ("Extracted %'d file to “%s”",
|
||||
"Extracted %'d files to “%s”",
|
||||
- total_files),
|
||||
- total_files,
|
||||
+ extract_job->total_files),
|
||||
+ extract_job->total_files,
|
||||
basename_dest);
|
||||
}
|
||||
|
||||
@@ -8609,6 +8615,8 @@ report_extract_final_progress (ExtractJob *extract_job,
|
||||
g_strdup_printf (_("%s / %s"),
|
||||
formatted_size,
|
||||
formatted_size));
|
||||
+
|
||||
+ nautilus_progress_info_set_progress (extract_job->common.progress, 1, 1);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -8690,6 +8698,7 @@ extract_task_thread_func (GTask *task,
|
||||
|
||||
extract_job->archive_compressed_size = archive_compressed_sizes[i];
|
||||
extract_job->destination_decided = FALSE;
|
||||
+ extract_job->extraction_failed = FALSE;
|
||||
|
||||
autoar_extractor_start (extractor,
|
||||
extract_job->common.cancellable);
|
||||
@@ -8697,13 +8706,23 @@ extract_task_thread_func (GTask *task,
|
||||
g_signal_handlers_disconnect_by_data (extractor,
|
||||
extract_job);
|
||||
|
||||
- extract_job->base_progress += (gdouble) extract_job->archive_compressed_size /
|
||||
- (gdouble) extract_job->total_compressed_size;
|
||||
+ if (!extract_job->extraction_failed)
|
||||
+ {
|
||||
+ extract_job->base_progress += (gdouble) extract_job->archive_compressed_size /
|
||||
+ (gdouble) extract_job->total_compressed_size;
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ extract_job->total_files--;
|
||||
+ extract_job->base_progress *= extract_job->total_compressed_size;
|
||||
+ extract_job->total_compressed_size -= extract_job->archive_compressed_size;
|
||||
+ extract_job->base_progress /= extract_job->total_compressed_size;
|
||||
+ }
|
||||
}
|
||||
|
||||
if (!job_aborted ((CommonJob *) extract_job))
|
||||
{
|
||||
- report_extract_final_progress (extract_job, extract_job->total_files);
|
||||
+ report_extract_final_progress (extract_job);
|
||||
}
|
||||
|
||||
if (extract_job->common.undo_info)
|
||||
--
|
||||
2.33.1
|
||||
|
@ -0,0 +1,35 @@
|
||||
From ee035fe0b4257d335687c038bf8b41a64d452d7f Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Holy <oholy@redhat.com>
|
||||
Date: Mon, 18 Nov 2019 11:34:10 +0100
|
||||
Subject: [PATCH] file-operations: Honor umask when creating new files
|
||||
|
||||
File creation mask should be honored when creating new files from
|
||||
templates as it is when creating new folders, or dragging raw data. But
|
||||
it is not because G_FILE_COPY_NONE flag is specified when creating new
|
||||
files from templates. Let's use G_FILE_COPY_TARGET_DEFAULT_PERMS flag
|
||||
to ensure that file creation mask is honored in this case as well.
|
||||
|
||||
Just note that this behavior is not wanted when copying in general
|
||||
(although it is also honored by "cp" cmd in this case) as it might have
|
||||
some unexpected consequences as discussed on:
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=167102
|
||||
---
|
||||
src/nautilus-file-operations.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
|
||||
index acf65f3cf..a90706e2e 100644
|
||||
--- a/src/nautilus-file-operations.c
|
||||
+++ b/src/nautilus-file-operations.c
|
||||
@@ -7361,7 +7361,7 @@ retry:
|
||||
{
|
||||
res = g_file_copy (job->src,
|
||||
dest,
|
||||
- G_FILE_COPY_NONE,
|
||||
+ G_FILE_COPY_TARGET_DEFAULT_PERMS,
|
||||
common->cancellable,
|
||||
NULL, NULL,
|
||||
&error);
|
||||
--
|
||||
2.26.0
|
||||
|
@ -1,70 +0,0 @@
|
||||
From d09b34cde210c4f817d2442cc9378b1ddf73aee9 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Holy <oholy@redhat.com>
|
||||
Date: Fri, 24 Sep 2021 08:40:23 +0200
|
||||
Subject: [PATCH] file-operations: Remove leftover files after extraction
|
||||
failure
|
||||
|
||||
Empty, or corrupted files are left in the output directory in the case
|
||||
of extraction failure, e.g. when wrong password is supplied. This is
|
||||
in most cases undesired. Let's recursively delete all the leftover
|
||||
files in the case of extraction failure.
|
||||
|
||||
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1954
|
||||
---
|
||||
src/nautilus-file-operations.c | 17 +++++++++++++++++
|
||||
1 file changed, 17 insertions(+)
|
||||
|
||||
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
|
||||
index 7927bd504..13da2cb39 100644
|
||||
--- a/src/nautilus-file-operations.c
|
||||
+++ b/src/nautilus-file-operations.c
|
||||
@@ -204,6 +204,7 @@ typedef struct
|
||||
GList *source_files;
|
||||
GFile *destination_directory;
|
||||
GList *output_files;
|
||||
+ gboolean destination_decided;
|
||||
|
||||
gdouble base_progress;
|
||||
|
||||
@@ -8202,8 +8203,14 @@ extract_job_on_decide_destination (AutoarExtractor *extractor,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
+ /* The extract_job->destination_decided variable signalizes whether the
|
||||
+ * extract_job->output_files list already contains the final location as
|
||||
+ * its first link. There is no way to get this over the AutoarExtractor
|
||||
+ * API currently.
|
||||
+ */
|
||||
extract_job->output_files = g_list_prepend (extract_job->output_files,
|
||||
decided_destination);
|
||||
+ extract_job->destination_decided = TRUE;
|
||||
|
||||
return g_object_ref (decided_destination);
|
||||
}
|
||||
@@ -8336,6 +8343,15 @@ extract_job_on_error (AutoarExtractor *extractor,
|
||||
return;
|
||||
}
|
||||
|
||||
+ /* It is safe to use extract_job->output_files->data only when the
|
||||
+ * extract_job->destination_decided variable was set, see comment in the
|
||||
+ * extract_job_on_decide_destination function.
|
||||
+ */
|
||||
+ if (extract_job->destination_decided)
|
||||
+ {
|
||||
+ delete_file_recursively (extract_job->output_files->data, NULL, NULL, NULL);
|
||||
+ }
|
||||
+
|
||||
basename = get_basename (source_file);
|
||||
nautilus_progress_info_take_status (extract_job->common.progress,
|
||||
g_strdup_printf (_("Error extracting “%s”"),
|
||||
@@ -8657,6 +8673,7 @@ extract_task_thread_func (GTask *task,
|
||||
extract_job);
|
||||
|
||||
extract_job->archive_compressed_size = archive_compressed_sizes[i];
|
||||
+ extract_job->destination_decided = FALSE;
|
||||
|
||||
autoar_extractor_start (extractor,
|
||||
extract_job->common.cancellable);
|
||||
--
|
||||
2.33.1
|
||||
|
@ -1,74 +0,0 @@
|
||||
From bdd317d999458fc35b23ee9c6141a9d0c9ec66f7 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Holy <oholy@redhat.com>
|
||||
Date: Fri, 24 Sep 2021 08:45:27 +0200
|
||||
Subject: [PATCH] file-operations: Simplify output files handling when
|
||||
extracting
|
||||
|
||||
Currently, output files are checked for existence. But the files are
|
||||
explicitely deleted in the case of extraction failure, so this extra
|
||||
check is no more needed. Let's drop the redundant check and just update
|
||||
the list when deleting the files.
|
||||
---
|
||||
src/nautilus-file-operations.c | 25 ++++++-------------------
|
||||
1 file changed, 6 insertions(+), 19 deletions(-)
|
||||
|
||||
diff --git a/src/nautilus-file-operations.c b/src/nautilus-file-operations.c
|
||||
index 13da2cb39..14dcf64d0 100644
|
||||
--- a/src/nautilus-file-operations.c
|
||||
+++ b/src/nautilus-file-operations.c
|
||||
@@ -8330,6 +8330,7 @@ extract_job_on_error (AutoarExtractor *extractor,
|
||||
{
|
||||
ExtractJob *extract_job = user_data;
|
||||
GFile *source_file;
|
||||
+ GFile *destination;
|
||||
gint response_id;
|
||||
g_autofree gchar *basename = NULL;
|
||||
|
||||
@@ -8349,7 +8350,11 @@ extract_job_on_error (AutoarExtractor *extractor,
|
||||
*/
|
||||
if (extract_job->destination_decided)
|
||||
{
|
||||
- delete_file_recursively (extract_job->output_files->data, NULL, NULL, NULL);
|
||||
+ destination = extract_job->output_files->data;
|
||||
+ delete_file_recursively (destination, NULL, NULL, NULL);
|
||||
+ extract_job->output_files = g_list_delete_link (extract_job->output_files,
|
||||
+ extract_job->output_files);
|
||||
+ g_object_unref (destination);
|
||||
}
|
||||
|
||||
basename = get_basename (source_file);
|
||||
@@ -8602,7 +8607,6 @@ extract_task_thread_func (GTask *task,
|
||||
{
|
||||
ExtractJob *extract_job = task_data;
|
||||
GList *l;
|
||||
- GList *existing_output_files = NULL;
|
||||
gint total_files;
|
||||
g_autofree guint64 *archive_compressed_sizes = NULL;
|
||||
gint i;
|
||||
@@ -8690,23 +8694,6 @@ extract_task_thread_func (GTask *task,
|
||||
report_extract_final_progress (extract_job, total_files);
|
||||
}
|
||||
|
||||
- for (l = extract_job->output_files; l != NULL; l = l->next)
|
||||
- {
|
||||
- GFile *output_file;
|
||||
-
|
||||
- output_file = G_FILE (l->data);
|
||||
-
|
||||
- if (g_file_query_exists (output_file, NULL))
|
||||
- {
|
||||
- existing_output_files = g_list_prepend (existing_output_files,
|
||||
- g_object_ref (output_file));
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- g_list_free_full (extract_job->output_files, g_object_unref);
|
||||
-
|
||||
- extract_job->output_files = existing_output_files;
|
||||
-
|
||||
if (extract_job->common.undo_info)
|
||||
{
|
||||
if (extract_job->output_files)
|
||||
--
|
||||
2.33.1
|
||||
|
@ -0,0 +1,36 @@
|
||||
From 4d7a1a7413cc7e76e99e11def90a6503cc142efb Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Holy <oholy@redhat.com>
|
||||
Date: Wed, 26 Feb 2020 12:56:39 +0100
|
||||
Subject: [PATCH] files-view: Clear selection if any files don't match the
|
||||
pattern
|
||||
|
||||
The Select items matching (Ctrl + S) feature allows to select files
|
||||
which match the pattern. However, it is confusing that current selection
|
||||
is not cleared when any files don't match the pattern.
|
||||
---
|
||||
src/nautilus-files-view.c | 6 +++---
|
||||
1 file changed, 3 insertions(+), 3 deletions(-)
|
||||
|
||||
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
|
||||
index 5573701cc..f3d507fff 100644
|
||||
--- a/src/nautilus-files-view.c
|
||||
+++ b/src/nautilus-files-view.c
|
||||
@@ -1716,12 +1716,12 @@ pattern_select_response_cb (GtkWidget *dialog,
|
||||
selection = nautilus_directory_match_pattern (directory,
|
||||
gtk_entry_get_text (GTK_ENTRY (entry)));
|
||||
|
||||
+ nautilus_files_view_call_set_selection (view, selection);
|
||||
+ nautilus_files_view_reveal_selection (view);
|
||||
+
|
||||
if (selection)
|
||||
{
|
||||
- nautilus_files_view_call_set_selection (view, selection);
|
||||
nautilus_file_list_free (selection);
|
||||
-
|
||||
- nautilus_files_view_reveal_selection (view);
|
||||
}
|
||||
/* fall through */
|
||||
}
|
||||
--
|
||||
2.26.0
|
||||
|
@ -1,117 +0,0 @@
|
||||
From 67c7bdbf8757c51d3b1bc1f5c40eaeddef9e3a89 Mon Sep 17 00:00:00 2001
|
||||
From: Anubhav Tyagi <tyagianubhav619@gmail.com>
|
||||
Date: Sat, 17 Jul 2021 12:39:20 +0530
|
||||
Subject: [PATCH] files-view: Store selected files list for compressing
|
||||
|
||||
The selected files list is chosen after the user confirmed the compress
|
||||
operation in the compress-dialog which may result in files other than
|
||||
chosen file being compressed.
|
||||
|
||||
Store the list of selected files when the user chooses the "Compress"
|
||||
option from the menu, to avoid that
|
||||
|
||||
Fixes: https://gitlab.gnome.org/GNOME/nautilus/-/issues/1900
|
||||
|
||||
|
||||
(cherry picked from commit 6c7eacd20302046521e89dd28240c6b0193ba942)
|
||||
---
|
||||
src/nautilus-files-view.c | 37 +++++++++++++++++++++++++++----------
|
||||
1 file changed, 27 insertions(+), 10 deletions(-)
|
||||
|
||||
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
|
||||
index 378e6bdba..b4a91226b 100644
|
||||
--- a/src/nautilus-files-view.c
|
||||
+++ b/src/nautilus-files-view.c
|
||||
@@ -302,6 +302,12 @@ typedef struct
|
||||
NautilusDirectory *directory;
|
||||
} FileAndDirectory;
|
||||
|
||||
+typedef struct
|
||||
+{
|
||||
+ NautilusFilesView *view;
|
||||
+ GList *selection;
|
||||
+} CompressCallbackData;
|
||||
+
|
||||
/* forward declarations */
|
||||
|
||||
static gboolean display_selection_info_idle_callback (gpointer data);
|
||||
@@ -2217,9 +2223,9 @@ static void
|
||||
compress_dialog_controller_on_name_accepted (NautilusFileNameWidgetController *controller,
|
||||
gpointer user_data)
|
||||
{
|
||||
+ CompressCallbackData *callback_data = user_data;
|
||||
NautilusFilesView *view;
|
||||
g_autofree gchar *name = NULL;
|
||||
- GList *selection;
|
||||
GList *source_files = NULL;
|
||||
GList *l;
|
||||
CompressData *data;
|
||||
@@ -2230,12 +2236,10 @@ compress_dialog_controller_on_name_accepted (NautilusFileNameWidgetController *c
|
||||
AutoarFormat format;
|
||||
AutoarFilter filter;
|
||||
|
||||
- view = NAUTILUS_FILES_VIEW (user_data);
|
||||
+ view = NAUTILUS_FILES_VIEW (callback_data->view);
|
||||
priv = nautilus_files_view_get_instance_private (view);
|
||||
|
||||
- selection = nautilus_files_view_get_selection_for_file_transfer (view);
|
||||
-
|
||||
- for (l = selection; l != NULL; l = l->next)
|
||||
+ for (l = callback_data->selection; l != NULL; l = l->next)
|
||||
{
|
||||
source_files = g_list_prepend (source_files,
|
||||
nautilus_file_get_location (l->data));
|
||||
@@ -2302,7 +2306,6 @@ compress_dialog_controller_on_name_accepted (NautilusFileNameWidgetController *c
|
||||
compress_done,
|
||||
data);
|
||||
|
||||
- nautilus_file_list_free (selection);
|
||||
g_list_free_full (source_files, g_object_unref);
|
||||
g_clear_object (&priv->compress_controller);
|
||||
}
|
||||
@@ -2320,6 +2323,12 @@ compress_dialog_controller_on_cancelled (NautilusNewFolderDialogController *cont
|
||||
g_clear_object (&priv->compress_controller);
|
||||
}
|
||||
|
||||
+static void
|
||||
+compress_callback_data_free (CompressCallbackData *data)
|
||||
+{
|
||||
+ nautilus_file_list_free (data->selection);
|
||||
+ g_free (data);
|
||||
+}
|
||||
|
||||
static void
|
||||
nautilus_files_view_compress_dialog_new (NautilusFilesView *view)
|
||||
@@ -2328,6 +2337,7 @@ nautilus_files_view_compress_dialog_new (NautilusFilesView *view)
|
||||
NautilusFilesViewPrivate *priv;
|
||||
g_autolist (NautilusFile) selection = NULL;
|
||||
g_autofree char *common_prefix = NULL;
|
||||
+ CompressCallbackData *data;
|
||||
|
||||
priv = nautilus_files_view_get_instance_private (view);
|
||||
|
||||
@@ -2365,10 +2375,17 @@ nautilus_files_view_compress_dialog_new (NautilusFilesView *view)
|
||||
containing_directory,
|
||||
common_prefix);
|
||||
|
||||
- g_signal_connect (priv->compress_controller,
|
||||
- "name-accepted",
|
||||
- (GCallback) compress_dialog_controller_on_name_accepted,
|
||||
- view);
|
||||
+ data = g_new0 (CompressCallbackData, 1);
|
||||
+ data->view = view;
|
||||
+ data->selection = nautilus_files_view_get_selection_for_file_transfer (view);
|
||||
+
|
||||
+ g_signal_connect_data (priv->compress_controller,
|
||||
+ "name-accepted",
|
||||
+ (GCallback) compress_dialog_controller_on_name_accepted,
|
||||
+ data,
|
||||
+ (GClosureNotify) compress_callback_data_free,
|
||||
+ G_CONNECT_AFTER);
|
||||
+
|
||||
g_signal_connect (priv->compress_controller,
|
||||
"cancelled",
|
||||
(GCallback) compress_dialog_controller_on_cancelled,
|
||||
--
|
||||
2.31.1
|
||||
|
@ -0,0 +1,22 @@
|
||||
diff --git a/src/gtk/nautilusgtkplacesview.c b/src/gtk/nautilusgtkplacesview.c
|
||||
index de0610e52..b72085ba9 100644
|
||||
--- a/src/gtk/nautilusgtkplacesview.c
|
||||
+++ b/src/gtk/nautilusgtkplacesview.c
|
||||
@@ -401,6 +401,9 @@ nautilus_gtk_places_view_destroy (GtkWidget *widget)
|
||||
if (priv->network_monitor)
|
||||
g_signal_handlers_disconnect_by_func (priv->network_monitor, update_places, widget);
|
||||
|
||||
+ if (priv->server_list_monitor)
|
||||
+ g_signal_handlers_disconnect_by_func (priv->server_list_monitor, server_file_changed_cb, widget);
|
||||
+
|
||||
g_cancellable_cancel (priv->cancellable);
|
||||
g_cancellable_cancel (priv->networks_fetching_cancellable);
|
||||
|
||||
@@ -1405,6 +1407,7 @@ pulse_entry_cb (gpointer user_data)
|
||||
{
|
||||
gtk_entry_set_progress_pulse_step (GTK_ENTRY (priv->address_entry), 0.0);
|
||||
gtk_entry_set_progress_fraction (GTK_ENTRY (priv->address_entry), 0.0);
|
||||
+ priv->entry_pulse_timeout_id = 0;
|
||||
|
||||
return G_SOURCE_REMOVE;
|
||||
}
|
@ -0,0 +1,29 @@
|
||||
From 4190844d91f9d4f1bb2997d7769caa57dd5f9a4c Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Soriano <csoriano1618@gmail.com>
|
||||
Date: Fri, 7 Sep 2018 08:05:18 +0000
|
||||
Subject: [PATCH] man: Remove geometry option
|
||||
|
||||
We removed that some time ago.
|
||||
---
|
||||
docs/nautilus.1 | 5 -----
|
||||
1 file changed, 5 deletions(-)
|
||||
|
||||
diff --git a/docs/nautilus.1 b/docs/nautilus.1
|
||||
index 70304a1d2..a868c72cb 100644
|
||||
--- a/docs/nautilus.1
|
||||
+++ b/docs/nautilus.1
|
||||
@@ -37,11 +37,6 @@ Perform a quick set of self-check tests.
|
||||
.B \-\-version
|
||||
Show the version of the program.
|
||||
|
||||
-.TP
|
||||
-.BR \-g ", " \-\-geometry=\fIGEOMETRY\fR
|
||||
-Create the initial window with the given geometry. \fBDeprecated\fR - the geometry
|
||||
-is saved and loaded using GSettings.
|
||||
-
|
||||
.TP
|
||||
.BR \-w ", " \-\-new-window
|
||||
Always open a new window for browsing specified URIs.
|
||||
--
|
||||
2.21.0
|
||||
|
@ -0,0 +1,189 @@
|
||||
From a7a31137aee8c4af81d7d447ceb83ccdb2ddadc0 Mon Sep 17 00:00:00 2001
|
||||
From: Xiang Fan <sfanxiang@gmail.com>
|
||||
Date: Fri, 13 Jul 2018 11:49:09 -0700
|
||||
Subject: [PATCH] nautilus-canvas-container: Remove the "include visible area"
|
||||
logic.
|
||||
|
||||
canvas_set_scroll_region_include_visible_area() was added in
|
||||
ec054c80981e26b71c8bb2e6853b035dc2063e7d to fix
|
||||
https://bugzilla.gnome.org/show_bug.cgi?id=42068 ("Dragging icons
|
||||
adjusts scroll area in a way that causes immediate scrolling"). This is
|
||||
no longer the case, because now icons remain in place when being dragged
|
||||
and are not allowed to be rearranged.
|
||||
|
||||
ec054c80981e26b71c8bb2e6853b035dc2063e7d causes issues relating to extra
|
||||
scrolling space (#340), hence the removal.
|
||||
|
||||
Fixes #340.
|
||||
---
|
||||
src/nautilus-canvas-container.c | 79 +--------------------------------
|
||||
src/nautilus-canvas-container.h | 1 -
|
||||
src/nautilus-canvas-private.h | 3 --
|
||||
src/nautilus-canvas-view.c | 6 ---
|
||||
4 files changed, 1 insertion(+), 88 deletions(-)
|
||||
|
||||
diff --git a/src/nautilus-canvas-container.c b/src/nautilus-canvas-container.c
|
||||
index 09acd47fc..bd05a3a2d 100644
|
||||
--- a/src/nautilus-canvas-container.c
|
||||
+++ b/src/nautilus-canvas-container.c
|
||||
@@ -968,45 +968,6 @@ get_all_icon_bounds (NautilusCanvasContainer *container,
|
||||
x1, y1, x2, y2, usage);
|
||||
}
|
||||
|
||||
-/* Don't preserve visible white space the next time the scroll region
|
||||
- * is recomputed when the container is not empty. */
|
||||
-void
|
||||
-nautilus_canvas_container_reset_scroll_region (NautilusCanvasContainer *container)
|
||||
-{
|
||||
- container->details->reset_scroll_region_trigger = TRUE;
|
||||
-}
|
||||
-
|
||||
-/* Set a new scroll region without eliminating any of the currently-visible area. */
|
||||
-static void
|
||||
-canvas_set_scroll_region_include_visible_area (EelCanvas *canvas,
|
||||
- double x1,
|
||||
- double y1,
|
||||
- double x2,
|
||||
- double y2)
|
||||
-{
|
||||
- double old_x1, old_y1, old_x2, old_y2;
|
||||
- double old_scroll_x, old_scroll_y;
|
||||
- double height, width;
|
||||
- GtkAllocation allocation;
|
||||
-
|
||||
- eel_canvas_get_scroll_region (canvas, &old_x1, &old_y1, &old_x2, &old_y2);
|
||||
- gtk_widget_get_allocation (GTK_WIDGET (canvas), &allocation);
|
||||
-
|
||||
- width = (allocation.width) / canvas->pixels_per_unit;
|
||||
- height = (allocation.height) / canvas->pixels_per_unit;
|
||||
-
|
||||
- old_scroll_x = gtk_adjustment_get_value (gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (canvas)));
|
||||
- old_scroll_y = gtk_adjustment_get_value (gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (canvas)));
|
||||
-
|
||||
- x1 = MIN (x1, old_x1 + old_scroll_x);
|
||||
- y1 = MIN (y1, old_y1 + old_scroll_y);
|
||||
- x2 = MAX (x2, old_x1 + old_scroll_x + width);
|
||||
- y2 = MAX (y2, old_y1 + old_scroll_y + height);
|
||||
-
|
||||
- eel_canvas_set_scroll_region
|
||||
- (canvas, x1, y1, x2, y2);
|
||||
-}
|
||||
-
|
||||
void
|
||||
nautilus_canvas_container_update_scroll_region (NautilusCanvasContainer *container)
|
||||
{
|
||||
@@ -1014,24 +975,10 @@ nautilus_canvas_container_update_scroll_region (NautilusCanvasContainer *contain
|
||||
double pixels_per_unit;
|
||||
GtkAdjustment *hadj, *vadj;
|
||||
float step_increment;
|
||||
- gboolean reset_scroll_region;
|
||||
GtkAllocation allocation;
|
||||
|
||||
pixels_per_unit = EEL_CANVAS (container)->pixels_per_unit;
|
||||
|
||||
- reset_scroll_region = container->details->reset_scroll_region_trigger
|
||||
- || nautilus_canvas_container_is_empty (container);
|
||||
-
|
||||
- /* The trigger is only cleared when container is non-empty, so
|
||||
- * callers can reliably reset the scroll region when an item
|
||||
- * is added even if extraneous relayouts are called when the
|
||||
- * window is still empty.
|
||||
- */
|
||||
- if (!nautilus_canvas_container_is_empty (container))
|
||||
- {
|
||||
- container->details->reset_scroll_region_trigger = FALSE;
|
||||
- }
|
||||
-
|
||||
get_all_icon_bounds (container, &x1, &y1, &x2, &y2, BOUNDS_USAGE_FOR_ENTIRE_ITEM);
|
||||
|
||||
/* Add border at the "end"of the layout (i.e. after the icons), to
|
||||
@@ -1053,18 +1000,7 @@ nautilus_canvas_container_update_scroll_region (NautilusCanvasContainer *contain
|
||||
y2 -= 1;
|
||||
y2 = MAX (y1, y2);
|
||||
|
||||
- if (reset_scroll_region)
|
||||
- {
|
||||
- eel_canvas_set_scroll_region
|
||||
- (EEL_CANVAS (container),
|
||||
- x1, y1, x2, y2);
|
||||
- }
|
||||
- else
|
||||
- {
|
||||
- canvas_set_scroll_region_include_visible_area
|
||||
- (EEL_CANVAS (container),
|
||||
- x1, y1, x2, y2);
|
||||
- }
|
||||
+ eel_canvas_set_scroll_region (EEL_CANVAS (container), x1, y1, x2, y2);
|
||||
|
||||
hadj = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (container));
|
||||
vadj = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (container));
|
||||
@@ -5722,23 +5658,10 @@ nautilus_canvas_container_get_icon_drop_target_uri (NautilusCanvasContainer *con
|
||||
return uri;
|
||||
}
|
||||
|
||||
-/* Call to reset the scroll region only if the container is not empty,
|
||||
- * to avoid having the flag linger until the next file is added.
|
||||
- */
|
||||
-static void
|
||||
-reset_scroll_region_if_not_empty (NautilusCanvasContainer *container)
|
||||
-{
|
||||
- if (!nautilus_canvas_container_is_empty (container))
|
||||
- {
|
||||
- nautilus_canvas_container_reset_scroll_region (container);
|
||||
- }
|
||||
-}
|
||||
-
|
||||
/* Re-sort, switching to automatic layout if it was in manual layout. */
|
||||
void
|
||||
nautilus_canvas_container_sort (NautilusCanvasContainer *container)
|
||||
{
|
||||
- reset_scroll_region_if_not_empty (container);
|
||||
container->details->needs_resort = TRUE;
|
||||
redo_layout (container);
|
||||
}
|
||||
diff --git a/src/nautilus-canvas-container.h b/src/nautilus-canvas-container.h
|
||||
index a370bba26..33929375d 100644
|
||||
--- a/src/nautilus-canvas-container.h
|
||||
+++ b/src/nautilus-canvas-container.h
|
||||
@@ -271,7 +271,6 @@ void nautilus_canvas_container_set_single_click_mode (Nauti
|
||||
gboolean single_click_mode);
|
||||
void nautilus_canvas_container_enable_linger_selection (NautilusCanvasContainer *view,
|
||||
gboolean enable);
|
||||
-void nautilus_canvas_container_reset_scroll_region (NautilusCanvasContainer *container);
|
||||
void nautilus_canvas_container_set_font (NautilusCanvasContainer *container,
|
||||
const char *font);
|
||||
void nautilus_canvas_container_set_margins (NautilusCanvasContainer *container,
|
||||
diff --git a/src/nautilus-canvas-private.h b/src/nautilus-canvas-private.h
|
||||
index dd5e79060..e60e86299 100644
|
||||
--- a/src/nautilus-canvas-private.h
|
||||
+++ b/src/nautilus-canvas-private.h
|
||||
@@ -192,9 +192,6 @@ struct NautilusCanvasContainerDetails {
|
||||
|
||||
int size_allocation_count;
|
||||
guint size_allocation_count_id;
|
||||
-
|
||||
- /* Ignore the visible area the next time the scroll region is recomputed */
|
||||
- gboolean reset_scroll_region_trigger;
|
||||
|
||||
/* a11y items used by canvas items */
|
||||
guint a11y_item_action_idle_handler;
|
||||
diff --git a/src/nautilus-canvas-view.c b/src/nautilus-canvas-view.c
|
||||
index f74ea06db..bd3a7ae5d 100644
|
||||
--- a/src/nautilus-canvas-view.c
|
||||
+++ b/src/nautilus-canvas-view.c
|
||||
@@ -355,12 +355,6 @@ nautilus_canvas_view_add_files (NautilusFilesView *view,
|
||||
canvas_view = NAUTILUS_CANVAS_VIEW (view);
|
||||
canvas_container = get_canvas_container (canvas_view);
|
||||
|
||||
- /* Reset scroll region for the first canvas added when loading a directory. */
|
||||
- if (nautilus_files_view_get_loading (view) && nautilus_canvas_container_is_empty (canvas_container))
|
||||
- {
|
||||
- nautilus_canvas_container_reset_scroll_region (canvas_container);
|
||||
- }
|
||||
-
|
||||
for (l = files; l != NULL; l = l->next)
|
||||
{
|
||||
if (nautilus_canvas_container_add (canvas_container,
|
||||
--
|
||||
2.37.1
|
||||
|
@ -0,0 +1,33 @@
|
||||
From 49718175b75c8ff89a219954f0abd6067e4a39f6 Mon Sep 17 00:00:00 2001
|
||||
From: Wong Heung Sang <hswongac@gmail.com>
|
||||
Date: Mon, 7 May 2018 00:10:15 +0800
|
||||
Subject: [PATCH] nautilus-file.c: Fix open writable file in recent tab
|
||||
|
||||
File opened in recent tab now is read-only
|
||||
when it is writable.
|
||||
|
||||
Replace nautilus_file_info_get_uri ()
|
||||
with nautilus_file_info_get_activation_uri ()
|
||||
fix the problem.
|
||||
|
||||
https://gitlab.gnome.org/GNOME/nautilus/issues/378
|
||||
---
|
||||
src/nautilus-file.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/nautilus-file.c b/src/nautilus-file.c
|
||||
index 0ec5e3848..d3ba8c841 100644
|
||||
--- a/src/nautilus-file.c
|
||||
+++ b/src/nautilus-file.c
|
||||
@@ -4482,7 +4482,7 @@ nautilus_file_get_activation_uri (NautilusFile *file)
|
||||
{
|
||||
g_return_val_if_fail (NAUTILUS_IS_FILE (file), NULL);
|
||||
|
||||
- return nautilus_file_info_get_uri (NAUTILUS_FILE_INFO (file));
|
||||
+ return nautilus_file_info_get_activation_uri (NAUTILUS_FILE_INFO (file));
|
||||
}
|
||||
|
||||
GFile *
|
||||
--
|
||||
2.29.2
|
||||
|
@ -0,0 +1,40 @@
|
||||
From 3c78251bc3bda455423807cb7fd5e25e7f8afd7e Mon Sep 17 00:00:00 2001
|
||||
From: Timothy OBrien <obrien.timothy.a@gmail.com>
|
||||
Date: Sun, 27 Jan 2019 12:45:28 +1100
|
||||
Subject: [PATCH] nautilus-mime-actions.c: No Application Installed dialog not
|
||||
closed on GTK_RESPONSE_YES
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
The "There is no application installed for “foo” files. Do you want to search for an application to open this file?" dialog that appears when there is no application installed to open the specific file type is not closed after clicking Yes. Instead, it reopens again.
|
||||
|
||||
This patch removes code that was causing the file to be activated after the user clicked Yes; relaunching the dialog.
|
||||
|
||||
Resolves #842
|
||||
---
|
||||
src/nautilus-mime-actions.c | 8 --------
|
||||
1 file changed, 8 deletions(-)
|
||||
|
||||
diff --git a/src/nautilus-mime-actions.c b/src/nautilus-mime-actions.c
|
||||
index 6f0ad9db5..5d1d5234e 100644
|
||||
--- a/src/nautilus-mime-actions.c
|
||||
+++ b/src/nautilus-mime-actions.c
|
||||
@@ -1191,14 +1191,6 @@ search_for_application_dbus_call_notify_cb (GDBusProxy *proxy,
|
||||
|
||||
g_variant_unref (variant);
|
||||
|
||||
- /* activate the file again */
|
||||
- nautilus_mime_activate_files (parameters_install->parent_window,
|
||||
- parameters_install->slot,
|
||||
- parameters_install->files,
|
||||
- parameters_install->activation_directory,
|
||||
- parameters_install->flags,
|
||||
- parameters_install->user_confirmation);
|
||||
-
|
||||
activate_parameters_install_free (parameters_install);
|
||||
}
|
||||
|
||||
--
|
||||
2.26.0
|
||||
|
@ -0,0 +1,54 @@
|
||||
From 2eed21b2dd3ec0cdd701f9c18e1e2582c69bdad8 Mon Sep 17 00:00:00 2001
|
||||
From: Timothy OBrien <obrien.timothy.a@gmail.com>
|
||||
Date: Mon, 14 Jan 2019 02:17:42 +1100
|
||||
Subject: [PATCH] org.gnome.Nautilus.appdata.xml.in.in: No screenshots in
|
||||
appdata
|
||||
|
||||
No screenshots were supplied by the appdata xml meaning that software install tools would not show them to the user.
|
||||
|
||||
This commit proposes a set of screenshots hosted via the static-web project: https://gitlab.gnome.org/Infrastructure/static-web
|
||||
|
||||
See static-web merge request https://gitlab.gnome.org/Infrastructure/static-web/merge_requests/2 for proposed screenshots.
|
||||
|
||||
Fixes #556
|
||||
---
|
||||
data/org.gnome.Nautilus.appdata.xml.in.in | 19 +++++++++++++++++++
|
||||
1 file changed, 19 insertions(+)
|
||||
|
||||
diff --git a/data/org.gnome.Nautilus.appdata.xml.in.in b/data/org.gnome.Nautilus.appdata.xml.in.in
|
||||
index 30648b3e6..cb20fa05f 100644
|
||||
--- a/data/org.gnome.Nautilus.appdata.xml.in.in
|
||||
+++ b/data/org.gnome.Nautilus.appdata.xml.in.in
|
||||
@@ -25,6 +25,24 @@
|
||||
<kudo>Notifications</kudo>
|
||||
<kudo>SearchProvider</kudo>
|
||||
</kudos>
|
||||
+ <screenshots>
|
||||
+ <screenshot type="default">
|
||||
+ <image>https://static.gnome.org/appdata/nautilus/nautilus-201901141.png</image>
|
||||
+ <caption>Tile view</caption>
|
||||
+ </screenshot>
|
||||
+ <screenshot>
|
||||
+ <image>https://static.gnome.org/appdata/nautilus/nautilus-201901142.png</image>
|
||||
+ <caption>List view</caption>
|
||||
+ </screenshot>
|
||||
+ <screenshot>
|
||||
+ <image>https://static.gnome.org/appdata/nautilus/nautilus-201901143.png</image>
|
||||
+ <caption>Search</caption>
|
||||
+ </screenshot>
|
||||
+ <screenshot>
|
||||
+ <image>https://static.gnome.org/appdata/nautilus/nautilus-201901144.png</image>
|
||||
+ <caption>Other locations</caption>
|
||||
+ </screenshot>
|
||||
+ </screenshots>
|
||||
<categories>
|
||||
<category>System</category>
|
||||
</categories>
|
||||
@@ -35,3 +53,4 @@
|
||||
<url type="help">https://wiki.gnome.org/action/show/Apps/Nautilus</url>
|
||||
<translation type="gettext">nautilus</translation>
|
||||
</component>
|
||||
+
|
||||
--
|
||||
2.21.0
|
||||
|
@ -1,59 +1,16 @@
|
||||
From 151af5733a11dc4aceb8ecf4c9eeafcaab188451 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Holy <oholy@redhat.com>
|
||||
Date: Fri, 27 Jan 2023 11:02:22 +0100
|
||||
Subject: [PATCH] pathbar: Do nothing when current location disappears
|
||||
|
||||
The pathbar automatically clear all the buttons when the current location
|
||||
is marked as gone. This was needed earlier, when child folders where shown
|
||||
in some cases, but this is no more needed nowadays. Let's drop that code.
|
||||
---
|
||||
src/nautilus-pathbar.c | 33 +--------------------------------
|
||||
1 file changed, 1 insertion(+), 32 deletions(-)
|
||||
|
||||
diff --git a/src/nautilus-pathbar.c b/src/nautilus-pathbar.c
|
||||
index edc0fff56..4bd9ff5b2 100644
|
||||
index 630b8ed33..2fe88fe1d 100644
|
||||
--- a/src/nautilus-pathbar.c
|
||||
+++ b/src/nautilus-pathbar.c
|
||||
@@ -1445,38 +1445,7 @@ button_data_file_changed (NautilusFile *file,
|
||||
}
|
||||
else if (nautilus_file_is_gone (file))
|
||||
{
|
||||
- gint idx, position;
|
||||
-
|
||||
- /* if the current or a parent location are gone, clear all the buttons,
|
||||
- * the view will set the new path.
|
||||
- */
|
||||
- current_location = nautilus_file_get_location (current_button_data->file);
|
||||
-
|
||||
- if (g_file_has_prefix (current_location, location) ||
|
||||
- g_file_equal (current_location, location))
|
||||
- {
|
||||
@@ -2033,7 +2033,7 @@ button_data_file_changed (NautilusFile *file,
|
||||
if (g_file_has_prefix (current_location, location) ||
|
||||
g_file_equal (current_location, location))
|
||||
{
|
||||
- nautilus_path_bar_clear_buttons (self);
|
||||
- }
|
||||
- else if (g_file_has_prefix (location, current_location))
|
||||
- {
|
||||
- /* remove this and the following buttons */
|
||||
- position = g_list_position (self->button_list,
|
||||
- g_list_find (self->button_list, button_data));
|
||||
-
|
||||
- if (position != -1)
|
||||
- {
|
||||
- for (idx = 0; idx <= position; idx++)
|
||||
- {
|
||||
- ButtonData *data;
|
||||
-
|
||||
- data = BUTTON_DATA (self->button_list->data);
|
||||
-
|
||||
- gtk_container_remove (GTK_CONTAINER (self), data->button);
|
||||
- }
|
||||
- }
|
||||
- }
|
||||
-
|
||||
- g_object_unref (current_location);
|
||||
+ /* Do nothing here, the view will set new path if needed. */
|
||||
g_object_unref (location);
|
||||
return;
|
||||
}
|
||||
+ /* Do nothing here, the view will set new path if needed. */
|
||||
}
|
||||
else if (g_file_has_prefix (location, current_location))
|
||||
{
|
||||
--
|
||||
2.40.0
|
||||
|
||||
|
@ -0,0 +1,62 @@
|
||||
From a20229f185b494a107634c4b99b2be1ce962a277 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Holy <oholy@redhat.com>
|
||||
Date: Thu, 26 Sep 2019 11:06:45 +0200
|
||||
Subject: [PATCH] properties-window: Fix crashes when cancelled
|
||||
|
||||
Nautilus crashes on the "timed_wait_free: assertion failed:
|
||||
(g_hash_table_lookup (timed_wait_hash_table, wait) != NULL)" assertion
|
||||
when the creating of the properties window is cancelled. This is because
|
||||
the timed wait has been already removed. Let's don't remove the wait
|
||||
when cancelled in order to prevent the crashes.
|
||||
---
|
||||
src/nautilus-properties-window.c | 14 ++++++++++++--
|
||||
1 file changed, 12 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
|
||||
index 969e3ffea..0112aeb3c 100644
|
||||
--- a/src/nautilus-properties-window.c
|
||||
+++ b/src/nautilus-properties-window.c
|
||||
@@ -148,6 +148,7 @@ typedef struct
|
||||
NautilusPropertiesWindowCallback callback;
|
||||
gpointer callback_data;
|
||||
NautilusPropertiesWindow *window;
|
||||
+ gboolean cancelled;
|
||||
} StartupData;
|
||||
|
||||
/* drag and drop definitions */
|
||||
@@ -5229,6 +5230,8 @@ get_existing_window (GList *file_list)
|
||||
static void
|
||||
properties_window_finish (StartupData *data)
|
||||
{
|
||||
+ gboolean cancel_timed_wait;
|
||||
+
|
||||
if (data->parent_widget != NULL)
|
||||
{
|
||||
g_signal_handlers_disconnect_by_data (data->parent_widget,
|
||||
@@ -5240,14 +5243,21 @@ properties_window_finish (StartupData *data)
|
||||
data);
|
||||
}
|
||||
|
||||
- remove_pending (data, TRUE, (data->window == NULL), FALSE);
|
||||
+ cancel_timed_wait = (data->window == NULL && !data->cancelled);
|
||||
+ remove_pending (data, TRUE, cancel_timed_wait, FALSE);
|
||||
+
|
||||
startup_data_free (data);
|
||||
}
|
||||
|
||||
static void
|
||||
cancel_create_properties_window_callback (gpointer callback_data)
|
||||
{
|
||||
- properties_window_finish ((StartupData *) callback_data);
|
||||
+ StartupData *data;
|
||||
+
|
||||
+ data = callback_data;
|
||||
+ data->cancelled = TRUE;
|
||||
+
|
||||
+ properties_window_finish (data);
|
||||
}
|
||||
|
||||
static void
|
||||
--
|
||||
2.23.0
|
||||
|
@ -0,0 +1,33 @@
|
||||
From c4b567936ebbba8479f6641c89b3980f7963b765 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Holy <oholy@redhat.com>
|
||||
Date: Thu, 26 Sep 2019 11:07:35 +0200
|
||||
Subject: [PATCH] properties-window: Fix crashes when opened multiple times
|
||||
|
||||
Nautilus crashes with segmentation fault when closing the properties dialog
|
||||
after it has been opened mutliple times for the same file. This can't be
|
||||
reproduced over Nautilus as it uses modal dialogs, however, it can be simply
|
||||
reproduced over the Desktop Icons extension. Let's check the pending_key
|
||||
variable before used to be sure it is not NULL to fix this crashes.
|
||||
---
|
||||
src/nautilus-properties-window.c | 5 ++++-
|
||||
1 file changed, 4 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
|
||||
index 0112aeb3c..f6b2f21a6 100644
|
||||
--- a/src/nautilus-properties-window.c
|
||||
+++ b/src/nautilus-properties-window.c
|
||||
@@ -5297,7 +5297,10 @@ remove_pending (StartupData *startup_data,
|
||||
eel_timed_wait_stop
|
||||
(cancel_create_properties_window_callback, startup_data);
|
||||
}
|
||||
- g_hash_table_remove (pending_lists, startup_data->pending_key);
|
||||
+ if (startup_data->pending_key != NULL)
|
||||
+ {
|
||||
+ g_hash_table_remove (pending_lists, startup_data->pending_key);
|
||||
+ }
|
||||
}
|
||||
|
||||
static gboolean
|
||||
--
|
||||
2.23.0
|
||||
|
@ -0,0 +1,32 @@
|
||||
From 97ec09e79d0a92f57ef6bb6b7e042921f5c3c3c8 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Holy <oholy@redhat.com>
|
||||
Date: Tue, 24 Sep 2019 17:06:15 +0200
|
||||
Subject: [PATCH] properties-window: Fix criticals when closing
|
||||
|
||||
The "eel_timed_wait_stop: assertion 'wait != NULL' failed" critical
|
||||
is printed when closing the properties window since commit c8c2fab2.
|
||||
This is because the timed wait has been already removed. Let's remove
|
||||
the wait when closing only if it has not been yet removed in order to
|
||||
prevent this criticals.
|
||||
|
||||
Fixes: https://gitlab.gnome.org/GNOME/nautilus/issues/1075
|
||||
---
|
||||
src/nautilus-properties-window.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
|
||||
index 9d9bd1c54..969e3ffea 100644
|
||||
--- a/src/nautilus-properties-window.c
|
||||
+++ b/src/nautilus-properties-window.c
|
||||
@@ -5240,7 +5240,7 @@ properties_window_finish (StartupData *data)
|
||||
data);
|
||||
}
|
||||
|
||||
- remove_pending (data, TRUE, TRUE, FALSE);
|
||||
+ remove_pending (data, TRUE, (data->window == NULL), FALSE);
|
||||
startup_data_free (data);
|
||||
}
|
||||
|
||||
--
|
||||
2.23.0
|
||||
|
@ -0,0 +1,46 @@
|
||||
From 13ecf5f9c2d219866550757cb660b569299ac285 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Holy <oholy@redhat.com>
|
||||
Date: Mon, 2 Mar 2020 14:53:36 +0100
|
||||
Subject: [PATCH] properties-window: Fix endless content size calculations
|
||||
|
||||
The total number of items and their size are shown in Properties dialog.
|
||||
|
||||
However, the deep count calculations are currently restarted with each
|
||||
"changed" event of `NautilusFile` object(s). This is not usually a problem
|
||||
if only one file is selected, but it is a pretty big issue when more
|
||||
files are selected. It is common that the calculation never ends. This
|
||||
is because the "changed" events are emitted in many irrelevant cases
|
||||
(e.g. free space change) and it totally doesn't make sense to restart
|
||||
the calculation in most of the cases. The initial idea was to react
|
||||
on ongoing file operations, however, the calculation currently doesn't
|
||||
react on file changes deeper in the tree anyway, or on changes, which
|
||||
happened after the calculation is done. Thus the current result can be
|
||||
outdated anyway.
|
||||
|
||||
Let's ignore `NautilusFile` changes at all when calculating the content
|
||||
size as it is pretty impossible to implement this properly to dynamically
|
||||
react on all size changes in the tree.
|
||||
|
||||
Fixes: https://gitlab.gnome.org/GNOME/nautilus/issues/363
|
||||
---
|
||||
src/nautilus-properties-window.c | 4 ----
|
||||
1 file changed, 4 deletions(-)
|
||||
|
||||
diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c
|
||||
index 9250adbe3..52a2b3fce 100644
|
||||
--- a/src/nautilus-properties-window.c
|
||||
+++ b/src/nautilus-properties-window.c
|
||||
@@ -1137,10 +1137,6 @@ properties_window_update (NautilusPropertiesWindow *window,
|
||||
{
|
||||
dirty_target = TRUE;
|
||||
}
|
||||
- if (changed_file != NULL)
|
||||
- {
|
||||
- start_deep_count_for_file (window, changed_file);
|
||||
- }
|
||||
}
|
||||
|
||||
if (dirty_original)
|
||||
--
|
||||
2.26.0
|
||||
|
@ -0,0 +1,900 @@
|
||||
From 93ecc7c079a438bb2baf34500fa77806a545910a Mon Sep 17 00:00:00 2001
|
||||
From: Carlos Soriano <csoriano@redhat.com>
|
||||
Date: Tue, 23 Apr 2019 11:35:45 +0200
|
||||
Subject: [PATCH] Remove nfs support strings
|
||||
|
||||
---
|
||||
src/gtk/nautilusgtkplacesview.ui | 701 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
|
||||
1 file changed, 388 insertions(+), 313 deletions(-)
|
||||
|
||||
diff --git a/src/gtk/nautilusgtkplacesview.ui b/src/gtk/nautilusgtkplacesview.ui
|
||||
index c366fde..601fce2 100644
|
||||
--- a/src/gtk/nautilusgtkplacesview.ui
|
||||
+++ b/src/gtk/nautilusgtkplacesview.ui
|
||||
@@ -1,4 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
+<!-- Generated with glade 3.22.1 -->
|
||||
<interface domain="gtk30">
|
||||
<requires lib="gtk+" version="3.16"/>
|
||||
<object class="GtkListStore" id="completion_store">
|
||||
@@ -11,265 +12,52 @@
|
||||
</object>
|
||||
<object class="GtkEntryCompletion" id="address_entry_completion">
|
||||
<property name="model">completion_store</property>
|
||||
- <property name="text-column">1</property>
|
||||
- <property name="inline-completion">1</property>
|
||||
- <property name="popup-completion">0</property>
|
||||
- </object>
|
||||
- <object class="GtkPopover" id="server_adresses_popover">
|
||||
- <property name="relative-to">address_entry</property>
|
||||
- <child>
|
||||
- <object class="GtkBox">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="border-width">18</property>
|
||||
- <property name="orientation">vertical</property>
|
||||
- <property name="spacing">6</property>
|
||||
- <child>
|
||||
- <object class="GtkLabel">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="hexpand">1</property>
|
||||
- <property name="label" translatable="yes">Server Addresses</property>
|
||||
- <attributes>
|
||||
- <attribute name="weight" value="bold"/>
|
||||
- </attributes>
|
||||
- <style>
|
||||
- <class name="dim-label"/>
|
||||
- </style>
|
||||
- </object>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkLabel">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="hexpand">1</property>
|
||||
- <property name="label" translatable="yes">Server addresses are made up of a protocol prefix and an address. Examples:</property>
|
||||
- <property name="wrap">1</property>
|
||||
- <property name="width-chars">40</property>
|
||||
- <property name="max-width-chars">40</property>
|
||||
- <property name="xalign">0</property>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="position">1</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkLabel">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="hexpand">1</property>
|
||||
- <property name="label">smb://gnome.org, ssh://192.168.0.1, ftp://[2001:db8::1]</property>
|
||||
- <property name="wrap">1</property>
|
||||
- <property name="width-chars">40</property>
|
||||
- <property name="max-width-chars">40</property>
|
||||
- <property name="xalign">0</property>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="position">2</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkGrid">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="margin-top">12</property>
|
||||
- <property name="hexpand">1</property>
|
||||
- <property name="row-spacing">6</property>
|
||||
- <property name="column-spacing">12</property>
|
||||
- <child>
|
||||
- <object class="GtkLabel">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="hexpand">1</property>
|
||||
- <property name="label" translatable="yes">Available Protocols</property>
|
||||
- <property name="xalign">0</property>
|
||||
- <attributes>
|
||||
- <attribute name="weight" value="bold"/>
|
||||
- </attributes>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="left-attach">0</property>
|
||||
- <property name="top-attach">0</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkLabel">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="label" translatable="yes">AppleTalk</property>
|
||||
- <property name="xalign">0</property>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="left-attach">0</property>
|
||||
- <property name="top-attach">1</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkLabel">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="label" translatable="yes">File Transfer Protocol</property>
|
||||
- <property name="xalign">0</property>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="left-attach">0</property>
|
||||
- <property name="top-attach">2</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkLabel">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="label" translatable="yes">Network File System</property>
|
||||
- <property name="xalign">0</property>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="left-attach">0</property>
|
||||
- <property name="top-attach">3</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkLabel">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="label" translatable="yes">Samba</property>
|
||||
- <property name="xalign">0</property>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="left-attach">0</property>
|
||||
- <property name="top-attach">4</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkLabel">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="label" translatable="yes">SSH File Transfer Protocol</property>
|
||||
- <property name="xalign">0</property>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="left-attach">0</property>
|
||||
- <property name="top-attach">5</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkLabel">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="label" translatable="yes">WebDAV</property>
|
||||
- <property name="xalign">0</property>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="left-attach">0</property>
|
||||
- <property name="top-attach">6</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkLabel">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="label" translatable="yes">Prefix</property>
|
||||
- <property name="xalign">0</property>
|
||||
- <attributes>
|
||||
- <attribute name="weight" value="bold"/>
|
||||
- </attributes>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="left-attach">1</property>
|
||||
- <property name="top-attach">0</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkLabel">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="label">afp://</property>
|
||||
- <property name="xalign">0</property>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="left-attach">1</property>
|
||||
- <property name="top-attach">1</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkLabel">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="label" translatable="yes" comments="Translators: do not translate ftp:// and ftps://">ftp:// or ftps://</property>
|
||||
- <property name="xalign">0</property>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="left-attach">1</property>
|
||||
- <property name="top-attach">2</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkLabel">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="label">nfs://</property>
|
||||
- <property name="xalign">0</property>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="left-attach">1</property>
|
||||
- <property name="top-attach">3</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkLabel">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="label" translatable="yes">smb://</property>
|
||||
- <property name="xalign">0</property>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="left-attach">1</property>
|
||||
- <property name="top-attach">4</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkLabel">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="label" translatable="yes" comments="Translators: do not translate sftp:// and ssh://">sftp:// or ssh://</property>
|
||||
- <property name="xalign">0</property>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="left-attach">1</property>
|
||||
- <property name="top-attach">5</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkLabel">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="label" translatable="yes" comments="Translators: do not translate dav:// and davs://">dav:// or davs://</property>
|
||||
- <property name="xalign">0</property>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="left-attach">1</property>
|
||||
- <property name="top-attach">6</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- </object>
|
||||
- <packing>
|
||||
- <property name="position">3</property>
|
||||
- </packing>
|
||||
- </child>
|
||||
- </object>
|
||||
- </child>
|
||||
+ <property name="text_column">1</property>
|
||||
+ <property name="inline_completion">True</property>
|
||||
+ <property name="popup_completion">False</property>
|
||||
</object>
|
||||
<object class="GtkPopover" id="recent_servers_popover">
|
||||
+ <property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkStack" id="recent_servers_stack">
|
||||
- <property name="visible">1</property>
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="vexpand">1</property>
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
<property name="valign">center</property>
|
||||
+ <property name="vexpand">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">18</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="pixel-size">48</property>
|
||||
- <property name="icon-name">network-server-symbolic</property>
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="pixel_size">48</property>
|
||||
+ <property name="icon_name">network-server-symbolic</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
+ <packing>
|
||||
+ <property name="expand">False</property>
|
||||
+ <property name="fill">True</property>
|
||||
+ <property name="position">0</property>
|
||||
+ </packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
- <property name="visible">1</property>
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes" comments="Translators: Server as any successfully connected network address">No recent servers found</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
+ <property name="expand">False</property>
|
||||
+ <property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
@@ -280,82 +68,98 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="border-width">12</property>
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="border_width">12</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
- <property name="visible">1</property>
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Recent Servers</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
+ <packing>
|
||||
+ <property name="expand">False</property>
|
||||
+ <property name="fill">True</property>
|
||||
+ <property name="position">0</property>
|
||||
+ </packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="can-focus">1</property>
|
||||
- <property name="vexpand">1</property>
|
||||
- <property name="shadow-type">in</property>
|
||||
- <property name="min-content-width">250</property>
|
||||
- <property name="min-content-height">200</property>
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">True</property>
|
||||
+ <property name="vexpand">True</property>
|
||||
+ <property name="shadow_type">in</property>
|
||||
+ <property name="min_content_width">250</property>
|
||||
+ <property name="min_content_height">200</property>
|
||||
<child>
|
||||
<object class="GtkViewport">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="shadow-type">none</property>
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="shadow_type">none</property>
|
||||
<child>
|
||||
<object class="GtkListBox" id="recent_servers_listbox">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="can-focus">1</property>
|
||||
- <property name="selection-mode">none</property>
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">True</property>
|
||||
+ <property name="selection_mode">none</property>
|
||||
<signal name="row-activated" handler="on_recent_servers_listbox_row_activated" object="NautilusGtkPlacesView" swapped="yes"/>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
+ <property name="expand">False</property>
|
||||
+ <property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">list</property>
|
||||
+ <property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<template class="NautilusGtkPlacesView" parent="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
- <property name="can-focus">False</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<signal name="key-press-event" handler="on_key_press_event" object="NautilusGtkPlacesView" swapped="no"/>
|
||||
<child>
|
||||
<object class="GtkStack" id="stack">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="vhomogeneous">0</property>
|
||||
- <property name="transition-type">crossfade</property>
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="vhomogeneous">False</property>
|
||||
+ <property name="transition_type">crossfade</property>
|
||||
<child>
|
||||
<object class="GtkFrame">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="shadow-type">none</property>
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="label_xalign">0</property>
|
||||
+ <property name="shadow_type">none</property>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="hexpand">1</property>
|
||||
- <property name="vexpand">1</property>
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="hexpand">True</property>
|
||||
+ <property name="vexpand">True</property>
|
||||
<child>
|
||||
<object class="GtkViewport">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="shadow-type">none</property>
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="shadow_type">none</property>
|
||||
<child>
|
||||
<object class="GtkListBox" id="listbox">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="can-focus">1</property>
|
||||
- <property name="selection-mode">none</property>
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">True</property>
|
||||
+ <property name="selection_mode">none</property>
|
||||
<signal name="row-activated" handler="on_listbox_row_activated" object="NautilusGtkPlacesView" swapped="yes"/>
|
||||
</object>
|
||||
</child>
|
||||
@@ -370,51 +174,65 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
- <property name="visible">1</property>
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="valign">center</property>
|
||||
- <property name="hexpand">1</property>
|
||||
- <property name="vexpand">1</property>
|
||||
+ <property name="hexpand">True</property>
|
||||
+ <property name="vexpand">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="pixel-size">72</property>
|
||||
- <property name="icon-name">edit-find-symbolic</property>
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="pixel_size">72</property>
|
||||
+ <property name="icon_name">edit-find-symbolic</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
+ <packing>
|
||||
+ <property name="expand">False</property>
|
||||
+ <property name="fill">True</property>
|
||||
+ <property name="position">0</property>
|
||||
+ </packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
- <property name="visible">1</property>
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">No results found</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
- <attribute name="scale" value="1.44"/>
|
||||
+ <attribute name="scale" value="1.4399999999999999"/>
|
||||
</attributes>
|
||||
</object>
|
||||
<packing>
|
||||
+ <property name="expand">False</property>
|
||||
+ <property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
- <property name="visible">1</property>
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Try a different search</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
+ <property name="expand">False</property>
|
||||
+ <property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">empty-search</property>
|
||||
+ <property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
@@ -426,89 +244,346 @@
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkActionBar" id="actionbar">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="hexpand">1</property>
|
||||
- <style>
|
||||
- <class name="background"/>
|
||||
- </style>
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="hexpand">True</property>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="hexpand">1</property>
|
||||
- <property name="xalign">0</property>
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="hexpand">True</property>
|
||||
<property name="label" translatable="yes">Connect to _Server</property>
|
||||
- <property name="mnemonic-widget">address_entry</property>
|
||||
- <property name="use-underline">1</property>
|
||||
+ <property name="use_underline">True</property>
|
||||
+ <property name="mnemonic_widget">address_entry</property>
|
||||
+ <property name="xalign">0</property>
|
||||
<attributes>
|
||||
<attribute name="weight" value="bold"/>
|
||||
</attributes>
|
||||
</object>
|
||||
- </child>
|
||||
- <child>
|
||||
- <object class="GtkButton" id="connect_button">
|
||||
- <property name="label" translatable="yes">Con_nect</property>
|
||||
- <property name="use-underline">1</property>
|
||||
- <property name="visible">1</property>
|
||||
- <property name="can-focus">1</property>
|
||||
- <property name="sensitive">0</property>
|
||||
- <property name="receives-default">1</property>
|
||||
- <property name="valign">center</property>
|
||||
- <signal name="clicked" handler="on_connect_button_clicked" object="NautilusGtkPlacesView" swapped="yes"/>
|
||||
- </object>
|
||||
<packing>
|
||||
- <property name="pack-type">end</property>
|
||||
+ <property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="hexpand">1</property>
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="hexpand">True</property>
|
||||
<child>
|
||||
<object class="GtkEntry" id="address_entry">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="can-focus">1</property>
|
||||
- <property name="hexpand">1</property>
|
||||
- <property name="width-chars">20</property>
|
||||
- <property name="placeholder-text" translatable="yes">Enter server address…</property>
|
||||
- <property name="secondary-icon-name">dialog-question-symbolic</property>
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">True</property>
|
||||
+ <property name="hexpand">True</property>
|
||||
+ <property name="width_chars">20</property>
|
||||
+ <property name="secondary_icon_name">dialog-question-symbolic</property>
|
||||
+ <property name="placeholder_text" translatable="yes">Enter server address…</property>
|
||||
<property name="completion">address_entry_completion</property>
|
||||
- <signal name="notify::text" handler="on_address_entry_text_changed" object="NautilusGtkPlacesView" swapped="yes"/>
|
||||
<signal name="activate" handler="on_connect_button_clicked" object="NautilusGtkPlacesView" swapped="yes"/>
|
||||
<signal name="icon-press" handler="on_address_entry_show_help_pressed" object="NautilusGtkPlacesView" swapped="yes"/>
|
||||
+ <signal name="notify::text" handler="on_address_entry_text_changed" object="NautilusGtkPlacesView" swapped="yes"/>
|
||||
</object>
|
||||
+ <packing>
|
||||
+ <property name="expand">False</property>
|
||||
+ <property name="fill">True</property>
|
||||
+ <property name="position">0</property>
|
||||
+ </packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkMenuButton" id="server_list_button">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="can-focus">1</property>
|
||||
- <property name="receives-default">1</property>
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">True</property>
|
||||
+ <property name="receives_default">True</property>
|
||||
<property name="direction">up</property>
|
||||
<property name="popover">recent_servers_popover</property>
|
||||
- <style>
|
||||
- <class name="server-list-button"/>
|
||||
- </style>
|
||||
<child>
|
||||
<object class="GtkImage">
|
||||
- <property name="visible">1</property>
|
||||
- <property name="icon-name">pan-down-symbolic</property>
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="icon_name">pan-down-symbolic</property>
|
||||
</object>
|
||||
</child>
|
||||
+ <style>
|
||||
+ <class name="server-list-button"/>
|
||||
+ </style>
|
||||
</object>
|
||||
+ <packing>
|
||||
+ <property name="expand">False</property>
|
||||
+ <property name="fill">True</property>
|
||||
+ <property name="position">1</property>
|
||||
+ </packing>
|
||||
</child>
|
||||
<style>
|
||||
<class name="linked"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
- <property name="pack-type">end</property>
|
||||
+ <property name="pack_type">end</property>
|
||||
+ <property name="position">0</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="GtkButton" id="connect_button">
|
||||
+ <property name="label" translatable="yes">Con_nect</property>
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="sensitive">False</property>
|
||||
+ <property name="can_focus">True</property>
|
||||
+ <property name="receives_default">True</property>
|
||||
+ <property name="valign">center</property>
|
||||
+ <property name="use_underline">True</property>
|
||||
+ <signal name="clicked" handler="on_connect_button_clicked" object="NautilusGtkPlacesView" swapped="yes"/>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="pack_type">end</property>
|
||||
+ <property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
+ <style>
|
||||
+ <class name="background"/>
|
||||
+ </style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</template>
|
||||
+ <object class="GtkPopover" id="server_adresses_popover">
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="relative_to">address_entry</property>
|
||||
+ <child>
|
||||
+ <object class="GtkBox">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="border_width">18</property>
|
||||
+ <property name="orientation">vertical</property>
|
||||
+ <property name="spacing">6</property>
|
||||
+ <child>
|
||||
+ <object class="GtkLabel">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="hexpand">True</property>
|
||||
+ <property name="label" translatable="yes">Server Addresses</property>
|
||||
+ <attributes>
|
||||
+ <attribute name="weight" value="bold"/>
|
||||
+ </attributes>
|
||||
+ <style>
|
||||
+ <class name="dim-label"/>
|
||||
+ </style>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="expand">False</property>
|
||||
+ <property name="fill">True</property>
|
||||
+ <property name="position">0</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="GtkLabel">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="hexpand">True</property>
|
||||
+ <property name="label" translatable="yes">Server addresses are made up of a protocol prefix and an address. Examples:</property>
|
||||
+ <property name="wrap">True</property>
|
||||
+ <property name="width_chars">40</property>
|
||||
+ <property name="max_width_chars">40</property>
|
||||
+ <property name="xalign">0</property>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="expand">False</property>
|
||||
+ <property name="fill">True</property>
|
||||
+ <property name="position">1</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="GtkLabel">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="hexpand">True</property>
|
||||
+ <property name="label">smb://gnome.org, ssh://192.168.0.1, ftp://[2001:db8::1]</property>
|
||||
+ <property name="wrap">True</property>
|
||||
+ <property name="width_chars">40</property>
|
||||
+ <property name="max_width_chars">40</property>
|
||||
+ <property name="xalign">0</property>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="expand">False</property>
|
||||
+ <property name="fill">True</property>
|
||||
+ <property name="position">2</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="GtkGrid">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="margin_top">12</property>
|
||||
+ <property name="hexpand">True</property>
|
||||
+ <property name="row_spacing">6</property>
|
||||
+ <property name="column_spacing">12</property>
|
||||
+ <child>
|
||||
+ <object class="GtkLabel">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="hexpand">True</property>
|
||||
+ <property name="label" translatable="yes">Available Protocols</property>
|
||||
+ <property name="xalign">0</property>
|
||||
+ <attributes>
|
||||
+ <attribute name="weight" value="bold"/>
|
||||
+ </attributes>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="left_attach">0</property>
|
||||
+ <property name="top_attach">0</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="GtkLabel">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="label" translatable="yes">AppleTalk</property>
|
||||
+ <property name="xalign">0</property>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="left_attach">0</property>
|
||||
+ <property name="top_attach">1</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="GtkLabel">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="label" translatable="yes">File Transfer Protocol</property>
|
||||
+ <property name="xalign">0</property>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="left_attach">0</property>
|
||||
+ <property name="top_attach">2</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="GtkLabel">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="label" translatable="yes">Samba</property>
|
||||
+ <property name="xalign">0</property>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="left_attach">0</property>
|
||||
+ <property name="top_attach">4</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="GtkLabel">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="label" translatable="yes">SSH File Transfer Protocol</property>
|
||||
+ <property name="xalign">0</property>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="left_attach">0</property>
|
||||
+ <property name="top_attach">5</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="GtkLabel">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="label" translatable="yes">WebDAV</property>
|
||||
+ <property name="xalign">0</property>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="left_attach">0</property>
|
||||
+ <property name="top_attach">6</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="GtkLabel">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="label" translatable="yes">Prefix</property>
|
||||
+ <property name="xalign">0</property>
|
||||
+ <attributes>
|
||||
+ <attribute name="weight" value="bold"/>
|
||||
+ </attributes>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="left_attach">1</property>
|
||||
+ <property name="top_attach">0</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="GtkLabel">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="label">afp://</property>
|
||||
+ <property name="xalign">0</property>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="left_attach">1</property>
|
||||
+ <property name="top_attach">1</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="GtkLabel">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="label" translatable="yes" comments="Translators: do not translate ftp:// and ftps://">ftp:// or ftps://</property>
|
||||
+ <property name="xalign">0</property>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="left_attach">1</property>
|
||||
+ <property name="top_attach">2</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="GtkLabel">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="label" translatable="yes">smb://</property>
|
||||
+ <property name="xalign">0</property>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="left_attach">1</property>
|
||||
+ <property name="top_attach">4</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="GtkLabel">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="label" translatable="yes" comments="Translators: do not translate sftp:// and ssh://">sftp:// or ssh://</property>
|
||||
+ <property name="xalign">0</property>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="left_attach">1</property>
|
||||
+ <property name="top_attach">5</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <object class="GtkLabel">
|
||||
+ <property name="visible">True</property>
|
||||
+ <property name="can_focus">False</property>
|
||||
+ <property name="label" translatable="yes" comments="Translators: do not translate dav:// and davs://">dav:// or davs://</property>
|
||||
+ <property name="xalign">0</property>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="left_attach">1</property>
|
||||
+ <property name="top_attach">6</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <placeholder/>
|
||||
+ </child>
|
||||
+ <child>
|
||||
+ <placeholder/>
|
||||
+ </child>
|
||||
+ </object>
|
||||
+ <packing>
|
||||
+ <property name="expand">False</property>
|
||||
+ <property name="fill">True</property>
|
||||
+ <property name="position">3</property>
|
||||
+ </packing>
|
||||
+ </child>
|
||||
+ </object>
|
||||
+ </child>
|
||||
+ </object>
|
||||
</interface>
|
||||
--
|
||||
libgit2 0.26.0
|
||||
|
@ -0,0 +1,90 @@
|
||||
diff --git a/src/nautilus-search-engine-tracker.c b/src/nautilus-search-engine-tracker.c
|
||||
index 66494cae8..32b6039a9 100644
|
||||
--- a/src/nautilus-search-engine-tracker.c
|
||||
+++ b/src/nautilus-search-engine-tracker.c
|
||||
@@ -286,6 +286,12 @@ search_finished_idle (gpointer user_data)
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
+/* This is used to compensate rank if fts:rank is not set (resp. fts:match is
|
||||
+ * not used). The value was determined experimentally. I am conviced that
|
||||
+ * fts:rank is currently always set to 5.0 in case of filename match.
|
||||
+ */
|
||||
+#define FILENAME_RANK 5.0
|
||||
+
|
||||
static void
|
||||
nautilus_search_engine_tracker_start (NautilusSearchProvider *provider)
|
||||
{
|
||||
@@ -327,7 +333,11 @@ nautilus_search_engine_tracker_start (NautilusSearchProvider *provider)
|
||||
mimetypes = nautilus_query_get_mime_types (tracker->query);
|
||||
mime_count = g_list_length (mimetypes);
|
||||
|
||||
- sparql = g_string_new ("SELECT DISTINCT nie:url(?urn) fts:rank(?urn) nfo:fileLastModified(?urn) nfo:fileLastAccessed(?urn)");
|
||||
+ sparql = g_string_new ("SELECT DISTINCT"
|
||||
+ " nie:url(?urn)"
|
||||
+ " xsd:double(COALESCE(?rank2, ?rank1)) AS ?rank"
|
||||
+ " nfo:fileLastModified(?urn)"
|
||||
+ " nfo:fileLastAccessed(?urn)");
|
||||
|
||||
if (tracker->fts_enabled)
|
||||
{
|
||||
@@ -342,16 +352,31 @@ nautilus_search_engine_tracker_start (NautilusSearchProvider *provider)
|
||||
" tracker:available true;"
|
||||
" nie:url ?url");
|
||||
|
||||
- if (*search_text)
|
||||
+ if (mime_count > 0)
|
||||
{
|
||||
- g_string_append_printf (sparql, "; fts:match '\"%s\"*'", search_text);
|
||||
+ g_string_append (sparql, "; nie:mimeType ?mime");
|
||||
}
|
||||
|
||||
- if (mime_count > 0)
|
||||
+ if (tracker->fts_enabled)
|
||||
{
|
||||
- g_string_append (sparql, "; nie:mimeType ?mime");
|
||||
+ /* Use fts:match only for content search to not lose some filename results due to stop words. */
|
||||
+ g_string_append_printf (sparql,
|
||||
+ " {"
|
||||
+ " ?urn fts:match '\"nie:plainTextContent\" : \"%s\"*' ."
|
||||
+ " BIND(fts:rank(?urn) AS ?rank1) ."
|
||||
+ " } UNION",
|
||||
+ search_text);
|
||||
}
|
||||
|
||||
+ g_string_append_printf (sparql,
|
||||
+ " {"
|
||||
+ " ?urn nfo:fileName ?filename ."
|
||||
+ " FILTER(fn:contains(fn:lower-case(?filename), '%s')) ."
|
||||
+ " BIND(%f AS ?rank2) ."
|
||||
+ " }",
|
||||
+ search_text,
|
||||
+ FILENAME_RANK);
|
||||
+
|
||||
g_string_append_printf (sparql, " . FILTER( ");
|
||||
|
||||
if (!tracker->recursive)
|
||||
@@ -363,11 +388,6 @@ nautilus_search_engine_tracker_start (NautilusSearchProvider *provider)
|
||||
g_string_append_printf (sparql, "tracker:uri-is-descendant('%s', ?url)", location_uri);
|
||||
}
|
||||
|
||||
- if (!tracker->fts_enabled)
|
||||
- {
|
||||
- g_string_append_printf (sparql, " && fn:contains(fn:lower-case(nfo:fileName(?urn)), '%s')", search_text);
|
||||
- }
|
||||
-
|
||||
date_range = nautilus_query_get_date_range (tracker->query);
|
||||
if (date_range)
|
||||
{
|
||||
@@ -424,7 +444,7 @@ nautilus_search_engine_tracker_start (NautilusSearchProvider *provider)
|
||||
g_string_append (sparql, ")\n");
|
||||
}
|
||||
|
||||
- g_string_append (sparql, ")} ORDER BY DESC (fts:rank(?urn))");
|
||||
+ g_string_append (sparql, ")} ORDER BY DESC (?rank)");
|
||||
|
||||
tracker->cancellable = g_cancellable_new ();
|
||||
tracker_sparql_connection_query_async (tracker->connection,
|
||||
--
|
||||
2.23.0
|
||||
|
@ -0,0 +1,33 @@
|
||||
From 33fafad8430ac32a750fd3315d507482c8028c15 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ant=C3=B3nio=20Fernandes?= <antoniof@gnome.org>
|
||||
Date: Fri, 29 May 2020 13:16:11 +0100
|
||||
Subject: [PATCH] search-engine-tracker: Expand macro as string
|
||||
|
||||
We have changed the FILENAME_RANK constant from being used as a format
|
||||
string argument to be concatenated as a string during compilation, as
|
||||
detailed in 7f00ede9b410e88106cef34c634cb46e46015e37
|
||||
|
||||
However, I have forgotten to quote the constant, which otherwise cannot
|
||||
be treated as a string to concatenate.
|
||||
|
||||
Fix that now.
|
||||
---
|
||||
src/nautilus-search-engine-tracker.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/nautilus-search-engine-tracker.c b/src/nautilus-search-engine-tracker.c
|
||||
index 571467a25..13470a62e 100644
|
||||
--- a/src/nautilus-search-engine-tracker.c
|
||||
+++ b/src/nautilus-search-engine-tracker.c
|
||||
@@ -290,7 +290,7 @@ search_finished_idle (gpointer user_data)
|
||||
* not used). The value was determined experimentally. I am convinced that
|
||||
* fts:rank is currently always set to 5.0 in case of filename match.
|
||||
*/
|
||||
-#define FILENAME_RANK 5.0
|
||||
+#define FILENAME_RANK "5.0"
|
||||
|
||||
static void
|
||||
nautilus_search_engine_tracker_start (NautilusSearchProvider *provider)
|
||||
--
|
||||
2.26.2
|
||||
|
@ -0,0 +1,53 @@
|
||||
From 7018cdcaa9954271cd82ba1c2620ecdfea176fae Mon Sep 17 00:00:00 2001
|
||||
From: Cristiano Nunes <cfgnunes@gmail.com>
|
||||
Date: Tue, 7 Apr 2020 14:47:41 +0000
|
||||
Subject: [PATCH] search-engine-tracker: Fix broken query under some locales
|
||||
|
||||
We set a 5.0 rank for filename matches in the SPARQL query as a float
|
||||
argument in a format string.
|
||||
|
||||
However, the floats in format strings are translated with the decimal
|
||||
separator from the locale. This means in some locales the rank has a
|
||||
comma instead of a dot, which results in a query error. In turn, this
|
||||
effectively broke the shell search provider.
|
||||
|
||||
Instead of using a format specifier and passing the value as an
|
||||
argument, we should just use compile-time concatenation to insert '5.0'
|
||||
in the query unmodified.
|
||||
|
||||
Fixes https://gitlab.gnome.org/GNOME/nautilus/-/issues/1412 and #1437
|
||||
|
||||
Cherry-picked from 7f00ede9b410e88106cef34c634cb46e46015e37
|
||||
---
|
||||
src/nautilus-search-engine-tracker.c | 7 +++----
|
||||
1 file changed, 3 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/nautilus-search-engine-tracker.c b/src/nautilus-search-engine-tracker.c
|
||||
index 32b6039a9..571467a25 100644
|
||||
--- a/src/nautilus-search-engine-tracker.c
|
||||
+++ b/src/nautilus-search-engine-tracker.c
|
||||
@@ -287,7 +287,7 @@ search_finished_idle (gpointer user_data)
|
||||
}
|
||||
|
||||
/* This is used to compensate rank if fts:rank is not set (resp. fts:match is
|
||||
- * not used). The value was determined experimentally. I am conviced that
|
||||
+ * not used). The value was determined experimentally. I am convinced that
|
||||
* fts:rank is currently always set to 5.0 in case of filename match.
|
||||
*/
|
||||
#define FILENAME_RANK 5.0
|
||||
@@ -372,10 +372,9 @@ nautilus_search_engine_tracker_start (NautilusSearchProvider *provider)
|
||||
" {"
|
||||
" ?urn nfo:fileName ?filename ."
|
||||
" FILTER(fn:contains(fn:lower-case(?filename), '%s')) ."
|
||||
- " BIND(%f AS ?rank2) ."
|
||||
+ " BIND(" FILENAME_RANK " AS ?rank2) ."
|
||||
" }",
|
||||
- search_text,
|
||||
- FILENAME_RANK);
|
||||
+ search_text);
|
||||
|
||||
g_string_append_printf (sparql, " . FILTER( ");
|
||||
|
||||
--
|
||||
2.26.2
|
||||
|
@ -0,0 +1,35 @@
|
||||
From 668e0673a7ea3fe4cb6c99bc7b56bc52597e2061 Mon Sep 17 00:00:00 2001
|
||||
From: Ondrej Holy <oholy@redhat.com>
|
||||
Date: Wed, 25 Sep 2019 09:16:44 +0200
|
||||
Subject: [PATCH] window: Fix criticals when moving file to trash
|
||||
|
||||
The "gtk_revealer_get_transition_type: assertion 'GTK_IS_REVEALER (revealer)'
|
||||
failed" critical is printed when moving file to trash after closing a window.
|
||||
This is because the "undo-changed" signal handler is not disconnected when
|
||||
the window is destroyed. Let's use g_signal_connect_object() to ensure
|
||||
disconnection and prevent those criticals.
|
||||
|
||||
Fixes: https://gitlab.gnome.org/GNOME/nautilus/issues/1076
|
||||
---
|
||||
src/nautilus-window.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
|
||||
index 285a6a6ce..056c75c7a 100644
|
||||
--- a/src/nautilus-window.c
|
||||
+++ b/src/nautilus-window.c
|
||||
@@ -2239,8 +2239,9 @@ nautilus_window_constructed (GObject *self)
|
||||
nautilus_window_set_up_sidebar (window);
|
||||
|
||||
|
||||
- g_signal_connect_after (nautilus_file_undo_manager_get (), "undo-changed",
|
||||
- G_CALLBACK (nautilus_window_on_undo_changed), self);
|
||||
+ g_signal_connect_object (nautilus_file_undo_manager_get (), "undo-changed",
|
||||
+ G_CALLBACK (nautilus_window_on_undo_changed), self,
|
||||
+ G_CONNECT_AFTER);
|
||||
|
||||
/* Is required that the UI is constructed before initializating the actions, since
|
||||
* some actions trigger UI widgets to show/hide. */
|
||||
--
|
||||
2.23.0
|
||||
|
@ -0,0 +1,118 @@
|
||||
From 4bdd3fad8d51e50e3539c8e04bc91538467bd236 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Ant=C3=B3nio=20Fernandes?= <antoniof@gnome.org>
|
||||
Date: Wed, 8 Jul 2020 14:44:38 +0100
|
||||
Subject: [PATCH] window: Streamline RestoreTabData memory management
|
||||
|
||||
When restoring the back and forward lists, we make a deep copy only to
|
||||
free the data immediately afterwards.
|
||||
|
||||
Instead of reallocating the lists unnecessarily, let's just steal them.
|
||||
|
||||
Also, use g_queue_free_full() to make free_restore_tab_data() a proper
|
||||
GDestroyNotify; also define it in window-slot.c, where it belongs.
|
||||
---
|
||||
src/nautilus-window-slot.c | 16 ++++++++++++++--
|
||||
src/nautilus-window-slot.h | 1 +
|
||||
src/nautilus-window.c | 20 ++------------------
|
||||
3 files changed, 17 insertions(+), 20 deletions(-)
|
||||
|
||||
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
|
||||
index c3260aeb0..bf040bff2 100644
|
||||
--- a/src/nautilus-window-slot.c
|
||||
+++ b/src/nautilus-window-slot.c
|
||||
@@ -155,6 +155,18 @@ static void trash_state_changed_cb (NautilusTrashMonitor *monitor,
|
||||
gboolean is_empty,
|
||||
gpointer user_data);
|
||||
|
||||
+void
|
||||
+free_restore_tab_data (gpointer data)
|
||||
+{
|
||||
+ RestoreTabData *tab_data = data;
|
||||
+
|
||||
+ g_list_free_full (tab_data->back_list, g_object_unref);
|
||||
+ g_list_free_full (tab_data->forward_list, g_object_unref);
|
||||
+ nautilus_file_unref (tab_data->file);
|
||||
+
|
||||
+ g_free (tab_data);
|
||||
+}
|
||||
+
|
||||
void
|
||||
nautilus_window_slot_restore_from_data (NautilusWindowSlot *self,
|
||||
RestoreTabData *data)
|
||||
@@ -163,9 +175,9 @@ nautilus_window_slot_restore_from_data (NautilusWindowSlot *self,
|
||||
|
||||
priv = nautilus_window_slot_get_instance_private (self);
|
||||
|
||||
- priv->back_list = g_list_copy_deep (data->back_list, (GCopyFunc) g_object_ref, NULL);
|
||||
+ priv->back_list = g_steal_pointer (&data->back_list);
|
||||
|
||||
- priv->forward_list = g_list_copy_deep (data->forward_list, (GCopyFunc) g_object_ref, NULL);
|
||||
+ priv->forward_list = g_steal_pointer (&data->forward_list);
|
||||
|
||||
priv->view_mode_before_search = data->view_before_search;
|
||||
|
||||
diff --git a/src/nautilus-window-slot.h b/src/nautilus-window-slot.h
|
||||
index 573357d9b..bda1a920f 100644
|
||||
--- a/src/nautilus-window-slot.h
|
||||
+++ b/src/nautilus-window-slot.h
|
||||
@@ -125,4 +125,5 @@ RestoreTabData* nautilus_window_slot_get_restore_tab_data (NautilusWindowSlot *s
|
||||
/* Only used by slot-dnd */
|
||||
NautilusView* nautilus_window_slot_get_current_view (NautilusWindowSlot *slot);
|
||||
|
||||
+void free_restore_tab_data (gpointer data);
|
||||
#endif /* NAUTILUS_WINDOW_SLOT_H */
|
||||
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
|
||||
index 1f8d5208e..175da6fce 100644
|
||||
--- a/src/nautilus-window.c
|
||||
+++ b/src/nautilus-window.c
|
||||
@@ -79,8 +79,6 @@ static GtkWidget *nautilus_window_ensure_location_entry (NautilusWindow *window)
|
||||
static void close_slot (NautilusWindow *window,
|
||||
NautilusWindowSlot *slot,
|
||||
gboolean remove_from_notebook);
|
||||
-static void free_restore_tab_data (gpointer data,
|
||||
- gpointer user_data);
|
||||
|
||||
/* Sanity check: highest mouse button value I could find was 14. 5 is our
|
||||
* lower threshold (well-documented to be the one of the button events for the
|
||||
@@ -1374,7 +1372,7 @@ action_restore_tab (GSimpleAction *action,
|
||||
nautilus_window_slot_open_location_full (slot, location, flags, NULL);
|
||||
nautilus_window_slot_restore_from_data (slot, data);
|
||||
|
||||
- free_restore_tab_data (data, NULL);
|
||||
+ free_restore_tab_data (data);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -2501,19 +2499,6 @@ nautilus_window_destroy (GtkWidget *object)
|
||||
GTK_WIDGET_CLASS (nautilus_window_parent_class)->destroy (object);
|
||||
}
|
||||
|
||||
-static void
|
||||
-free_restore_tab_data (gpointer data,
|
||||
- gpointer user_data)
|
||||
-{
|
||||
- RestoreTabData *tab_data = data;
|
||||
-
|
||||
- g_list_free_full (tab_data->back_list, g_object_unref);
|
||||
- g_list_free_full (tab_data->forward_list, g_object_unref);
|
||||
- nautilus_file_unref (tab_data->file);
|
||||
-
|
||||
- g_free (tab_data);
|
||||
-}
|
||||
-
|
||||
static void
|
||||
nautilus_window_finalize (GObject *object)
|
||||
{
|
||||
@@ -2548,8 +2533,7 @@ nautilus_window_finalize (GObject *object)
|
||||
G_CALLBACK (nautilus_window_on_undo_changed),
|
||||
window);
|
||||
|
||||
- g_queue_foreach (priv->tab_data_queue, (GFunc) free_restore_tab_data, NULL);
|
||||
- g_queue_free (priv->tab_data_queue);
|
||||
+ g_queue_free_full (priv->tab_data_queue, free_restore_tab_data);
|
||||
|
||||
g_object_unref (priv->pad_controller);
|
||||
|
||||
--
|
||||
2.35.1
|
||||
|
@ -0,0 +1,170 @@
|
||||
From 148559bc6809aac40be4aff64b7d3a4e5ac3c59a Mon Sep 17 00:00:00 2001
|
||||
From: Sachin Daluja <30343-sachindaluja@users.noreply.gitlab.gnome.org>
|
||||
Date: Sun, 24 May 2020 13:29:49 -0400
|
||||
Subject: [PATCH] window-slot: Rename RestoreTabData to NautilusNavigationState
|
||||
|
||||
This struct is going to be used to also restore navigation state when
|
||||
replacing the active window slot in order to handle other-locations://
|
||||
|
||||
Also enhance it to also save and restore the current location bookmark.
|
||||
---
|
||||
src/nautilus-window-slot.c | 28 ++++++++++++++++------------
|
||||
src/nautilus-window-slot.h | 11 ++++++-----
|
||||
src/nautilus-window.c | 12 ++++++------
|
||||
3 files changed, 28 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
|
||||
index bf040bff2..e688f0716 100644
|
||||
--- a/src/nautilus-window-slot.c
|
||||
+++ b/src/nautilus-window-slot.c
|
||||
@@ -156,20 +156,21 @@ static void trash_state_changed_cb (NautilusTrashMonitor *monitor,
|
||||
gpointer user_data);
|
||||
|
||||
void
|
||||
-free_restore_tab_data (gpointer data)
|
||||
+free_navigation_state (gpointer data)
|
||||
{
|
||||
- RestoreTabData *tab_data = data;
|
||||
+ NautilusNavigationState *navigation_state = data;
|
||||
|
||||
- g_list_free_full (tab_data->back_list, g_object_unref);
|
||||
- g_list_free_full (tab_data->forward_list, g_object_unref);
|
||||
- nautilus_file_unref (tab_data->file);
|
||||
+ g_list_free_full (navigation_state->back_list, g_object_unref);
|
||||
+ g_list_free_full (navigation_state->forward_list, g_object_unref);
|
||||
+ nautilus_file_unref (navigation_state->file);
|
||||
+ g_clear_object (&navigation_state->current_location_bookmark);
|
||||
|
||||
- g_free (tab_data);
|
||||
+ g_free (navigation_state);
|
||||
}
|
||||
|
||||
void
|
||||
-nautilus_window_slot_restore_from_data (NautilusWindowSlot *self,
|
||||
- RestoreTabData *data)
|
||||
+nautilus_window_slot_restore_navigation_state (NautilusWindowSlot *self,
|
||||
+ NautilusNavigationState *data)
|
||||
{
|
||||
NautilusWindowSlotPrivate *priv;
|
||||
|
||||
@@ -181,14 +182,16 @@ nautilus_window_slot_restore_from_data (NautilusWindowSlot *self,
|
||||
|
||||
priv->view_mode_before_search = data->view_before_search;
|
||||
|
||||
+ g_set_object (&priv->current_location_bookmark, data->current_location_bookmark);
|
||||
+
|
||||
priv->location_change_type = NAUTILUS_LOCATION_CHANGE_RELOAD;
|
||||
}
|
||||
|
||||
-RestoreTabData *
|
||||
-nautilus_window_slot_get_restore_tab_data (NautilusWindowSlot *self)
|
||||
+NautilusNavigationState *
|
||||
+nautilus_window_slot_get_navigation_state (NautilusWindowSlot *self)
|
||||
{
|
||||
NautilusWindowSlotPrivate *priv;
|
||||
- RestoreTabData *data;
|
||||
+ NautilusNavigationState *data;
|
||||
GList *back_list;
|
||||
GList *forward_list;
|
||||
|
||||
@@ -211,11 +214,12 @@ nautilus_window_slot_get_restore_tab_data (NautilusWindowSlot *self)
|
||||
* the view mode before search and a reference to the file.
|
||||
* A GFile isn't enough, as the NautilusFile also keeps a
|
||||
* reference to the search directory */
|
||||
- data = g_new0 (RestoreTabData, 1);
|
||||
+ data = g_new0 (NautilusNavigationState, 1);
|
||||
data->back_list = back_list;
|
||||
data->forward_list = forward_list;
|
||||
data->file = nautilus_file_get (priv->location);
|
||||
data->view_before_search = priv->view_mode_before_search;
|
||||
+ g_set_object (&data->current_location_bookmark, priv->current_location_bookmark);
|
||||
|
||||
return data;
|
||||
}
|
||||
diff --git a/src/nautilus-window-slot.h b/src/nautilus-window-slot.h
|
||||
index bda1a920f..2edc96786 100644
|
||||
--- a/src/nautilus-window-slot.h
|
||||
+++ b/src/nautilus-window-slot.h
|
||||
@@ -48,7 +48,8 @@ typedef struct
|
||||
gint view_before_search;
|
||||
GList *back_list;
|
||||
GList *forward_list;
|
||||
-} RestoreTabData;
|
||||
+ NautilusBookmark *current_location_bookmark;
|
||||
+} NautilusNavigationState;
|
||||
|
||||
struct _NautilusWindowSlotClass {
|
||||
GtkBoxClass parent_class;
|
||||
@@ -117,13 +118,13 @@ void nautilus_window_slot_search (NautilusWindowSlot *
|
||||
gboolean nautilus_window_slot_handles_location (NautilusWindowSlot *self,
|
||||
GFile *location);
|
||||
|
||||
-void nautilus_window_slot_restore_from_data (NautilusWindowSlot *self,
|
||||
- RestoreTabData *data);
|
||||
+void nautilus_window_slot_restore_navigation_state (NautilusWindowSlot *self,
|
||||
+ NautilusNavigationState *data);
|
||||
|
||||
-RestoreTabData* nautilus_window_slot_get_restore_tab_data (NautilusWindowSlot *self);
|
||||
+NautilusNavigationState* nautilus_window_slot_get_navigation_state (NautilusWindowSlot *self);
|
||||
|
||||
/* Only used by slot-dnd */
|
||||
NautilusView* nautilus_window_slot_get_current_view (NautilusWindowSlot *slot);
|
||||
|
||||
-void free_restore_tab_data (gpointer data);
|
||||
+void free_navigation_state (gpointer data);
|
||||
#endif /* NAUTILUS_WINDOW_SLOT_H */
|
||||
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
|
||||
index 175da6fce..900239cb8 100644
|
||||
--- a/src/nautilus-window.c
|
||||
+++ b/src/nautilus-window.c
|
||||
@@ -1349,7 +1349,7 @@ action_restore_tab (GSimpleAction *action,
|
||||
NautilusWindowOpenFlags flags;
|
||||
g_autoptr (GFile) location = NULL;
|
||||
NautilusWindowSlot *slot;
|
||||
- RestoreTabData *data;
|
||||
+ NautilusNavigationState *data;
|
||||
|
||||
priv = nautilus_window_get_instance_private (window);
|
||||
|
||||
@@ -1370,9 +1370,9 @@ action_restore_tab (GSimpleAction *action,
|
||||
slot = nautilus_window_create_and_init_slot (window, location, flags);
|
||||
|
||||
nautilus_window_slot_open_location_full (slot, location, flags, NULL);
|
||||
- nautilus_window_slot_restore_from_data (slot, data);
|
||||
+ nautilus_window_slot_restore_navigation_state (slot, data);
|
||||
|
||||
- free_restore_tab_data (data);
|
||||
+ free_navigation_state (data);
|
||||
}
|
||||
|
||||
static void
|
||||
@@ -1579,7 +1579,7 @@ nautilus_window_slot_close (NautilusWindow *window,
|
||||
{
|
||||
NautilusWindowPrivate *priv;
|
||||
NautilusWindowSlot *next_slot;
|
||||
- RestoreTabData *data;
|
||||
+ NautilusNavigationState *data;
|
||||
|
||||
DEBUG ("Requesting to remove slot %p from window %p", slot, window);
|
||||
if (window == NULL)
|
||||
@@ -1595,7 +1595,7 @@ nautilus_window_slot_close (NautilusWindow *window,
|
||||
nautilus_window_set_active_slot (window, next_slot);
|
||||
}
|
||||
|
||||
- data = nautilus_window_slot_get_restore_tab_data (slot);
|
||||
+ data = nautilus_window_slot_get_navigation_state (slot);
|
||||
if (data != NULL)
|
||||
{
|
||||
g_queue_push_head (priv->tab_data_queue, data);
|
||||
@@ -2533,7 +2533,7 @@ nautilus_window_finalize (GObject *object)
|
||||
G_CALLBACK (nautilus_window_on_undo_changed),
|
||||
window);
|
||||
|
||||
- g_queue_free_full (priv->tab_data_queue, free_restore_tab_data);
|
||||
+ g_queue_free_full (priv->tab_data_queue, free_navigation_state);
|
||||
|
||||
g_object_unref (priv->pad_controller);
|
||||
|
||||
--
|
||||
2.35.1
|
||||
|
@ -0,0 +1,242 @@
|
||||
From fe7533b0b82e2ebc7767006ee9768572700a91df Mon Sep 17 00:00:00 2001
|
||||
From: Sachin Daluja <30343-sachindaluja@users.noreply.gitlab.gnome.org>
|
||||
Date: Sun, 10 May 2020 22:30:03 -0400
|
||||
Subject: [PATCH] window, window-slot: Save and restore navigation history
|
||||
|
||||
When a new window slot instance replaces the existing one to handle the new
|
||||
location.
|
||||
|
||||
This allows back and forward history lists to be preserved when the window
|
||||
switches between instances of different window slot classes.
|
||||
|
||||
Closes https://gitlab.gnome.org/GNOME/nautilus/-/issues/32
|
||||
---
|
||||
src/nautilus-window-slot.c | 48 +++++++++++++++++++---
|
||||
src/nautilus-window-slot.h | 13 ++++++
|
||||
src/nautilus-window.c | 84 +++++++++++++++++++++++++++++++++++++-
|
||||
3 files changed, 138 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/src/nautilus-window-slot.c b/src/nautilus-window-slot.c
|
||||
index e688f0716..69040fc44 100644
|
||||
--- a/src/nautilus-window-slot.c
|
||||
+++ b/src/nautilus-window-slot.c
|
||||
@@ -176,6 +176,9 @@ nautilus_window_slot_restore_navigation_state (NautilusWindowSlot *self,
|
||||
|
||||
priv = nautilus_window_slot_get_instance_private (self);
|
||||
|
||||
+ /* We are restoring saved history to newly created slot with no history. */
|
||||
+ g_warn_if_fail (priv->back_list == NULL && priv->forward_list == NULL);
|
||||
+
|
||||
priv->back_list = g_steal_pointer (&data->back_list);
|
||||
|
||||
priv->forward_list = g_steal_pointer (&data->forward_list);
|
||||
@@ -2003,12 +2006,11 @@ nautilus_window_slot_set_content_view (NautilusWindowSlot *self,
|
||||
}
|
||||
|
||||
void
|
||||
-nautilus_window_back_or_forward (NautilusWindow *window,
|
||||
- gboolean back,
|
||||
- guint distance,
|
||||
- NautilusWindowOpenFlags flags)
|
||||
+nautilus_window_slot_back_or_forward (NautilusWindowSlot *self,
|
||||
+ gboolean back,
|
||||
+ guint distance,
|
||||
+ NautilusWindowOpenFlags flags)
|
||||
{
|
||||
- NautilusWindowSlot *self;
|
||||
GList *list;
|
||||
GFile *location;
|
||||
guint len;
|
||||
@@ -2016,7 +2018,6 @@ nautilus_window_back_or_forward (NautilusWindow *window,
|
||||
GFile *old_location;
|
||||
NautilusWindowSlotPrivate *priv;
|
||||
|
||||
- self = nautilus_window_get_active_slot (window);
|
||||
priv = nautilus_window_slot_get_instance_private (self);
|
||||
list = back ? priv->back_list : priv->forward_list;
|
||||
|
||||
@@ -3308,3 +3309,38 @@ nautilus_window_slot_get_loading (NautilusWindowSlot *self)
|
||||
|
||||
return priv->loading;
|
||||
}
|
||||
+
|
||||
+/*
|
||||
+ * Open the specified location and set up the navigation history including the
|
||||
+ * back and forward lists. This function is intended to be called when switching
|
||||
+ * between NautilusWindowSlot and NautilusOtherLocationsWindowSlot. It allows
|
||||
+ * the navigation history accumulated in the slot being replaced to be loaded
|
||||
+ * into the replacing slot.
|
||||
+ *
|
||||
+ * The 'location' member variable is set to the new location before calling
|
||||
+ * begin_location_change() to ensure that it matches the
|
||||
+ * 'current_location_bookmark' member as expected by the location change
|
||||
+ * pipeline.
|
||||
+ */
|
||||
+void
|
||||
+nautilus_window_slot_open_location_set_navigation_state (NautilusWindowSlot *self,
|
||||
+ GFile *location,
|
||||
+ NautilusWindowOpenFlags flags,
|
||||
+ GList *new_selection,
|
||||
+ NautilusLocationChangeType change_type,
|
||||
+ NautilusNavigationState *navigation_state,
|
||||
+ guint distance)
|
||||
+{
|
||||
+ NautilusWindowSlotPrivate *priv;
|
||||
+
|
||||
+ priv = nautilus_window_slot_get_instance_private (self);
|
||||
+
|
||||
+ nautilus_window_slot_restore_navigation_state (self, navigation_state);
|
||||
+
|
||||
+ g_clear_object (&priv->location);
|
||||
+
|
||||
+ priv->location = nautilus_file_get_location (navigation_state->file);
|
||||
+
|
||||
+ begin_location_change (self, location, NULL, new_selection,
|
||||
+ change_type, distance, NULL);
|
||||
+}
|
||||
diff --git a/src/nautilus-window-slot.h b/src/nautilus-window-slot.h
|
||||
index 2edc96786..cbd3454ce 100644
|
||||
--- a/src/nautilus-window-slot.h
|
||||
+++ b/src/nautilus-window-slot.h
|
||||
@@ -82,6 +82,14 @@ void nautilus_window_slot_open_location_full (NautilusWindowSlot
|
||||
NautilusWindowOpenFlags flags,
|
||||
GList *new_selection);
|
||||
|
||||
+void nautilus_window_slot_open_location_set_navigation_state (NautilusWindowSlot *slot,
|
||||
+ GFile *location,
|
||||
+ NautilusWindowOpenFlags flags,
|
||||
+ GList *new_selection,
|
||||
+ NautilusLocationChangeType change_type,
|
||||
+ NautilusNavigationState *navigation_state,
|
||||
+ guint distance);
|
||||
+
|
||||
GFile * nautilus_window_slot_get_location (NautilusWindowSlot *slot);
|
||||
|
||||
NautilusBookmark *nautilus_window_slot_get_bookmark (NautilusWindowSlot *slot);
|
||||
@@ -126,5 +134,10 @@ NautilusNavigationState* nautilus_window_slot_get_navigation_state (NautilusWind
|
||||
/* Only used by slot-dnd */
|
||||
NautilusView* nautilus_window_slot_get_current_view (NautilusWindowSlot *slot);
|
||||
|
||||
+void nautilus_window_slot_back_or_forward (NautilusWindowSlot *slot,
|
||||
+ gboolean back,
|
||||
+ guint distance,
|
||||
+ NautilusWindowOpenFlags flags);
|
||||
+
|
||||
void free_navigation_state (gpointer data);
|
||||
#endif /* NAUTILUS_WINDOW_SLOT_H */
|
||||
diff --git a/src/nautilus-window.c b/src/nautilus-window.c
|
||||
index 900239cb8..af01b43e7 100644
|
||||
--- a/src/nautilus-window.c
|
||||
+++ b/src/nautilus-window.c
|
||||
@@ -613,6 +613,7 @@ nautilus_window_open_location_full (NautilusWindow *window,
|
||||
{
|
||||
NautilusWindowSlot *active_slot;
|
||||
gboolean new_tab_at_end;
|
||||
+ NautilusNavigationState *navigation_state = NULL;
|
||||
|
||||
/* The location owner can be one of the slots requesting to handle an
|
||||
* unhandled location. But this slot can be destroyed when switching to
|
||||
@@ -644,6 +645,8 @@ nautilus_window_open_location_full (NautilusWindow *window,
|
||||
}
|
||||
else if (!nautilus_window_slot_handles_location (target_slot, location))
|
||||
{
|
||||
+ navigation_state = nautilus_window_slot_get_navigation_state (active_slot);
|
||||
+
|
||||
target_slot = replace_active_slot (window, location, flags);
|
||||
}
|
||||
|
||||
@@ -655,7 +658,19 @@ nautilus_window_open_location_full (NautilusWindow *window,
|
||||
nautilus_window_set_active_slot (window, target_slot);
|
||||
}
|
||||
|
||||
- nautilus_window_slot_open_location_full (target_slot, location, flags, selection);
|
||||
+ if (navigation_state != NULL)
|
||||
+ {
|
||||
+ nautilus_window_slot_open_location_set_navigation_state (target_slot,
|
||||
+ location, flags, selection,
|
||||
+ NAUTILUS_LOCATION_CHANGE_STANDARD,
|
||||
+ navigation_state, 0);
|
||||
+
|
||||
+ free_navigation_state (navigation_state);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ nautilus_window_slot_open_location_full (target_slot, location, flags, selection);
|
||||
+ }
|
||||
|
||||
g_object_unref (location);
|
||||
}
|
||||
@@ -3099,3 +3114,70 @@ nautilus_window_search (NautilusWindow *window,
|
||||
g_warning ("Trying search on a slot but no active slot present");
|
||||
}
|
||||
}
|
||||
+
|
||||
+/* Ideally, this method should be a simple wrapper for the slot method. However,
|
||||
+ * going back or forward can result in a new slot (or another subclass), so we
|
||||
+ * workaround that by duplicating part of nautilus_window_slot_back_or_forward()
|
||||
+ */
|
||||
+void
|
||||
+nautilus_window_back_or_forward (NautilusWindow *window,
|
||||
+ gboolean back,
|
||||
+ guint distance,
|
||||
+ NautilusWindowOpenFlags flags)
|
||||
+{
|
||||
+ NautilusWindowSlot *slot;
|
||||
+ GList *next_location_list, *back_list, *forward_list;
|
||||
+ GFile *next_location;
|
||||
+ guint len;
|
||||
+ NautilusBookmark *next_location_bookmark;
|
||||
+ gboolean active_slot_handles_location;
|
||||
+
|
||||
+ slot = nautilus_window_get_active_slot (window);
|
||||
+ back_list = nautilus_window_slot_get_back_history (slot);
|
||||
+ forward_list = nautilus_window_slot_get_forward_history (slot);
|
||||
+
|
||||
+ next_location_list = back ? back_list : forward_list;
|
||||
+
|
||||
+ len = (guint) g_list_length (next_location_list);
|
||||
+
|
||||
+ /* If we can't move in the direction at all, just return. */
|
||||
+ if (len == 0)
|
||||
+ {
|
||||
+ return;
|
||||
+ }
|
||||
+
|
||||
+ /* If the distance to move is off the end of the list, go to the end
|
||||
+ * of the list. */
|
||||
+ if (distance >= len)
|
||||
+ {
|
||||
+ distance = len - 1;
|
||||
+ }
|
||||
+
|
||||
+ next_location_bookmark = g_list_nth_data (next_location_list, distance);
|
||||
+ next_location = nautilus_bookmark_get_location (next_location_bookmark);
|
||||
+
|
||||
+ active_slot_handles_location = nautilus_window_slot_handles_location (slot, next_location);
|
||||
+
|
||||
+ if (!active_slot_handles_location)
|
||||
+ {
|
||||
+ NautilusNavigationState *navigation_state;
|
||||
+ NautilusLocationChangeType location_change_type;
|
||||
+
|
||||
+ navigation_state = nautilus_window_slot_get_navigation_state (slot);
|
||||
+
|
||||
+ location_change_type = back ? NAUTILUS_LOCATION_CHANGE_BACK : NAUTILUS_LOCATION_CHANGE_FORWARD;
|
||||
+
|
||||
+ slot = replace_active_slot (window, next_location, flags);
|
||||
+
|
||||
+ nautilus_window_slot_open_location_set_navigation_state (slot,
|
||||
+ next_location, flags, NULL,
|
||||
+ location_change_type,
|
||||
+ navigation_state, distance);
|
||||
+
|
||||
+ free_navigation_state (navigation_state);
|
||||
+ }
|
||||
+ else
|
||||
+ {
|
||||
+ nautilus_window_slot_back_or_forward (slot, back, distance, flags);
|
||||
+ }
|
||||
+}
|
||||
--
|
||||
2.35.1
|
||||
|
Loading…
Reference in new issue