Commit 2f98bfd1 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

app/dialogs/file-open-dialog.c app/dialogs/file-save-dialog.c use

2005-02-07  Sven Neumann  <sven@gimp.org>

	* app/dialogs/file-open-dialog.c
	* app/dialogs/file-save-dialog.c
	* app/widgets/gimpthumbbox.c: use file_utils_filename_from_uri()
	in some more places.

	* app/dialogs/file-open-location-dialog.c
	* app/widgets/gimpselectiondata.c: deal with hostname in URIs.
parent 747ffe8b
2005-02-07 Sven Neumann <sven@gimp.org>
* app/dialogs/file-open-dialog.c
* app/dialogs/file-save-dialog.c
* app/widgets/gimpthumbbox.c: use file_utils_filename_from_uri()
in some more places.
* app/dialogs/file-open-location-dialog.c
* app/widgets/gimpselectiondata.c: deal with hostname in URIs.
2005-02-07 Sven Neumann <sven@gimp.org>
* app/core/gimpimagefile.c (gimp_imagefile_get_desc_string):
......
......@@ -117,7 +117,7 @@ file_open_dialog_response (GtkWidget *open_dialog,
for (list = uris; list; list = g_slist_next (list))
{
gchar *filename = g_filename_from_uri (list->data, NULL, NULL);
gchar *filename = file_utils_filename_from_uri (list->data);
if (g_file_test (filename, G_FILE_TEST_IS_REGULAR))
{
......
......@@ -158,14 +158,16 @@ file_open_location_response (GtkDialog *dialog,
GimpImage *image;
gchar *uri;
gchar *filename;
gchar *hostname;
GError *error = NULL;
GimpPDBStatusType status;
filename = g_filename_from_uri (text, NULL, NULL);
filename = g_filename_from_uri (text, &hostname, NULL);
if (filename)
{
uri = g_filename_to_uri (filename, NULL, NULL);
uri = g_filename_to_uri (filename, hostname, NULL);
g_free (hostname);
g_free (filename);
}
else
......
......@@ -129,7 +129,8 @@ file_save_dialog_response (GtkWidget *save_dialog,
if (uri && strlen (uri))
{
gchar *filename = g_filename_from_uri (uri, NULL, NULL);
gchar *filename = file_utils_filename_from_uri (uri);
g_return_if_fail (filename != NULL);
if (g_file_test (filename, G_FILE_TEST_EXISTS))
......
......@@ -232,13 +232,14 @@ gimp_selection_data_get_uri_list (GtkSelectionData *selection)
{
const gchar *dnd_crap = list->data;
gchar *filename;
gchar *hostname;
gchar *uri = NULL;
GError *error = NULL;
D (g_print ("%s: trying to convert \"%s\" to an uri.\n",
G_STRFUNC, dnd_crap));
filename = g_filename_from_uri (dnd_crap, NULL, NULL);
filename = g_filename_from_uri (dnd_crap, hostname, NULL);
if (filename)
{
......@@ -248,8 +249,9 @@ gimp_selection_data_get_uri_list (GtkSelectionData *selection)
* for GLib > 2.4.4, this is escaped local filename encoding)
*/
uri = g_filename_to_uri (filename, NULL, NULL);
uri = g_filename_to_uri (filename, hostname, NULL);
g_free (hostname);
g_free (filename);
}
else if (g_file_test (dnd_crap, G_FILE_TEST_EXISTS))
......
......@@ -676,7 +676,7 @@ gimp_thumb_box_create_thumbnail (GimpThumbBox *box,
GimpThumbnailSize size,
gboolean force)
{
gchar *filename = g_filename_from_uri (uri, NULL, NULL);
gchar *filename = file_utils_filename_from_uri (uri);
if (filename && g_file_test (filename, G_FILE_TEST_IS_REGULAR))
{
......
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