[nautilus/wip/antoniof/experimental-gtk4-build: 30/55] general: Adapt to GtkFileChooser API changes
- From: António Fernandes <antoniof src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/antoniof/experimental-gtk4-build: 30/55] general: Adapt to GtkFileChooser API changes
- Date: Sat, 1 Jan 2022 21:47:02 +0000 (UTC)
commit f53261fbf76cfb0ecb425eae7f9ad06eeea4f218
Author: António Fernandes <antoniof gnome org>
Date: Fri Dec 24 01:07:44 2021 +0000
general: Adapt to GtkFileChooser API changes
The API is GFIle-only now, and as such always supports non-local URIs.
src/nautilus-files-view.c | 6 ++----
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 28ef9e897..b6e28ea38 100644
--- a/src/nautilus-properties-window.c
+++ b/src/nautilus-properties-window.c
@@ -5231,14 +5231,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);
@@ -5266,9 +5268,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);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]