[nautilus/wip/csoriano/nautilus-3.24.1: 3/14] files-view: display search base for file chooser
- From: Carlos Soriano <csoriano src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/csoriano/nautilus-3.24.1: 3/14] files-view: display search base for file chooser
- Date: Sat, 22 Apr 2017 17:12:29 +0000 (UTC)
commit 28dd203d02317e6f5da7d7655ab4a5db6a571e5f
Author: Alexandru Pandelea <alexandru pandelea gmail com>
Date: Mon Mar 20 01:11:02 2017 +0200
files-view: display search base for file chooser
Currently when the move to/copy to file chooser dialog is launched
during search, the dialog shows an error as the location is invalid.
Change this so that the base of the search is displayed in the dialog
when this dialog is launched while searching.
https://bugzilla.gnome.org/show_bug.cgi?id=778113
src/nautilus-files-view.c | 13 ++++++++++++-
1 files changed, 12 insertions(+), 1 deletions(-)
---
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c
index 0bb513e..a305ef8 100644
--- a/src/nautilus-files-view.c
+++ b/src/nautilus-files-view.c
@@ -5956,6 +5956,7 @@ copy_or_move_selection (NautilusFilesView *view,
CopyCallbackData *copy_data;
GList *selection;
const gchar *title;
+ NautilusDirectory *directory;
priv = nautilus_files_view_get_instance_private (view);
@@ -6007,7 +6008,17 @@ copy_or_move_selection (NautilusFilesView *view,
gtk_file_chooser_set_filter (GTK_FILE_CHOOSER (dialog), filter);
}
- uri = nautilus_directory_get_uri (priv->model);
+
+ if (nautilus_view_is_searching (NAUTILUS_VIEW (view)))
+ {
+ directory = nautilus_search_directory_get_base_model (NAUTILUS_SEARCH_DIRECTORY (priv->model));
+ uri = nautilus_directory_get_uri (directory);
+ }
+ else
+ {
+ uri = nautilus_directory_get_uri (priv->model);
+ }
+
gtk_file_chooser_set_current_folder_uri (GTK_FILE_CHOOSER (dialog), uri);
g_free (uri);
g_signal_connect (dialog, "current-folder-changed",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]