Commit 08bd204c authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

use gtk_file_chooser_set_uri() to check if a file exists. Seems to work

2005-02-12  Michael Natterer  <mitch@gimp.org>

	* app/dialogs/file-save-dialog.c (file_save_dialog_response): use
	gtk_file_chooser_set_uri() to check if a file exists. Seems to
	work reliably even for remote files and fixes the issue i
	mentioned below.
parent 344463b7
2005-02-12 Michael Natterer <mitch@gimp.org>
* app/dialogs/file-save-dialog.c (file_save_dialog_response): use
gtk_file_chooser_set_uri() to check if a file exists. Seems to
work reliably even for remote files and fixes the issue i
mentioned below.
2005-02-12 Sven Neumann <sven@gimp.org>
Changes suggested in bug #167200:
......
......@@ -134,17 +134,7 @@ file_save_dialog_response (GtkWidget *save_dialog,
if (uri && strlen (uri))
{
gchar *filename = file_utils_filename_from_uri (uri);
gboolean exists = FALSE;
if (filename)
{
exists = g_file_test (filename, G_FILE_TEST_EXISTS);
g_free (filename);
}
if (exists)
if (gtk_file_chooser_set_uri (GTK_FILE_CHOOSER (save_dialog), uri))
{
file_save_overwrite (save_dialog, uri, uri);
}
......@@ -164,9 +154,9 @@ file_save_dialog_response (GtkWidget *save_dialog,
gimp_file_dialog_set_sensitive (dialog, TRUE);
}
g_free (uri);
}
g_free (uri);
}
typedef struct _OverwriteData OverwriteData;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment