diff options
author | António Fernandes <antoniof@gnome.org> | 2021-12-24 01:07:44 +0000 |
---|---|---|
committer | António Fernandes <antoniof@gnome.org> | 2022-01-05 12:56:32 +0000 |
commit | 6a2fd2d0ede3cb7b9ba3f7ec94e0fa9611227eb0 (patch) | |
tree | e9539d53bdefe1396b935b1ca3fdb3f4308c4b20 | |
parent | a8466fd00cc4449211912fa7ebab9b7276c7e320 (diff) | |
download | nautilus-6a2fd2d0ede3cb7b9ba3f7ec94e0fa9611227eb0.tar.gz |
general: Adapt to GtkFileChooser API changes
The API is GFIle-only now, and as such always supports non-local URIs.
-rw-r--r-- | src/nautilus-files-view.c | 6 | ||||
-rw-r--r-- | src/nautilus-properties-window.c | 10 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/nautilus-files-view.c b/src/nautilus-files-view.c index b64ad81a8..c7a464066 100644 --- a/src/nautilus-files-view.c +++ b/src/nautilus-files-view.c @@ -5896,7 +5896,6 @@ copy_or_move_selection (NautilusFilesView *view, _("_Cancel"), GTK_RESPONSE_CANCEL, _("_Select"), GTK_RESPONSE_OK, NULL); - gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (dialog), FALSE); gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); @@ -5923,7 +5922,7 @@ copy_or_move_selection (NautilusFilesView *view, location = nautilus_directory_get_location (priv->model); } - gtk_file_chooser_set_current_folder_file (GTK_FILE_CHOOSER (dialog), location, NULL); + gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), location, NULL); g_signal_connect (dialog, "response", G_CALLBACK (on_destination_dialog_response), copy_data); @@ -6344,7 +6343,6 @@ extract_files_to_chosen_location (NautilusFilesView *view, _("_Cancel"), GTK_RESPONSE_CANCEL, _("_Select"), GTK_RESPONSE_OK, NULL); - gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (dialog), FALSE); gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); @@ -6370,7 +6368,7 @@ extract_files_to_chosen_location (NautilusFilesView *view, location = nautilus_directory_get_location (priv->model); } - gtk_file_chooser_set_current_folder_file (GTK_FILE_CHOOSER (dialog), location, NULL); + gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), location, NULL); data->view = view; data->files = nautilus_file_list_copy (files); diff --git a/src/nautilus-properties-window.c b/src/nautilus-properties-window.c index 9e82bb1b3..e6a2a4e24 100644 --- a/src/nautilus-properties-window.c +++ b/src/nautilus-properties-window.c @@ -5232,14 +5232,16 @@ select_image_button_callback (GtkWidget *widget, if (dialog == NULL) { + g_autoptr (GFile) pictures_location = NULL; dialog = gtk_file_chooser_dialog_new (_("Select Custom Icon"), GTK_WINDOW (self), GTK_FILE_CHOOSER_ACTION_OPEN, _("_Revert"), GTK_RESPONSE_NO, _("_Cancel"), GTK_RESPONSE_CANCEL, _("_Open"), GTK_RESPONSE_OK, NULL); + pictures_location = g_file_new_for_path (g_get_user_special_dir (G_USER_DIRECTORY_PICTURES)); gtk_file_chooser_add_shortcut_folder (GTK_FILE_CHOOSER (dialog), - g_get_user_special_dir (G_USER_DIRECTORY_PICTURES), + pictures_location, NULL); gtk_window_set_destroy_with_parent (GTK_WINDOW (dialog), TRUE); gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); @@ -5267,9 +5269,9 @@ select_image_button_callback (GtkWidget *widget, if (image_location != NULL) { - gtk_file_chooser_set_current_folder_file (GTK_FILE_CHOOSER (dialog), - image_location, - NULL); + gtk_file_chooser_set_current_folder (GTK_FILE_CHOOSER (dialog), + image_location, + NULL); } } } |