mirror of https://github.com/GNOME/gimp.git
changed "Remote Image" to "Remote File". The state of the thumbnail
2005-02-07 Sven Neumann <sven@gimp.org> * app/core/gimpimagefile.c (gimp_imagefile_get_desc_string): changed "Remote Image" to "Remote File". The state of the thumbnail doesn't tell us if this is an image file at all. * app/widgets/gimpthumbbox.c: don't auto-thumbnail remote files. * libgimpthumb/gimpthumb-utils.[ch] * libgimpthumb/gimpthumbnail.c: do the same workaround for UNC paths as in file_utils_filename_from_uri().
This commit is contained in:
parent
796898f72a
commit
313f7835cb
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2005-02-07 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/core/gimpimagefile.c (gimp_imagefile_get_desc_string):
|
||||
changed "Remote Image" to "Remote File". The state of the
|
||||
thumbnail doesn't tell us if this is an image file at all.
|
||||
|
||||
* app/widgets/gimpthumbbox.c: don't auto-thumbnail remote files.
|
||||
|
||||
* libgimpthumb/gimpthumb-utils.[ch]
|
||||
* libgimpthumb/gimpthumbnail.c: do the same workaround for UNC
|
||||
paths as in file_utils_filename_from_uri().
|
||||
|
||||
2005-02-07 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* plug-ins/uri/uri-backend.h: added backend methods
|
||||
|
|
|
@ -565,7 +565,7 @@ gimp_imagefile_get_desc_string (GimpImagefile *imagefile)
|
|||
break;
|
||||
|
||||
case GIMP_THUMB_STATE_REMOTE:
|
||||
imagefile->description = _("Remote image");
|
||||
imagefile->description = _("Remote File");
|
||||
imagefile->static_desc = TRUE;
|
||||
break;
|
||||
|
||||
|
|
|
@ -317,9 +317,10 @@ gimp_file_dialog_new (Gimp *gimp,
|
|||
}
|
||||
|
||||
dialog = g_object_new (GIMP_TYPE_FILE_DIALOG,
|
||||
"title", title,
|
||||
"role", role,
|
||||
"action", action,
|
||||
"title", title,
|
||||
"role", role,
|
||||
"action", action,
|
||||
"local-only", FALSE,
|
||||
NULL);
|
||||
|
||||
gtk_dialog_add_buttons (GTK_DIALOG (dialog),
|
||||
|
|
|
@ -535,6 +535,9 @@ gimp_thumb_box_thumb_state_notify (GimpThumbnail *thumb,
|
|||
if (box->idle_id)
|
||||
return;
|
||||
|
||||
if (thumb->image_state == GIMP_THUMB_STATE_REMOTE)
|
||||
return;
|
||||
|
||||
switch (thumb->thumb_state)
|
||||
{
|
||||
case GIMP_THUMB_STATE_NOT_FOUND:
|
||||
|
|
|
@ -358,7 +358,7 @@ gimp_thumb_name_from_uri_local (const gchar *uri,
|
|||
if (strstr (uri, thumb_dir))
|
||||
return NULL;
|
||||
|
||||
filename = g_filename_from_uri (uri, NULL, NULL);
|
||||
filename = _gimp_thumb_filename_from_uri (uri);
|
||||
|
||||
if (filename)
|
||||
{
|
||||
|
@ -419,7 +419,7 @@ gimp_thumb_find_thumb (const gchar *uri,
|
|||
|
||||
if (! result)
|
||||
{
|
||||
gchar *filename = g_filename_from_uri (uri, NULL, NULL);
|
||||
gchar *filename = _gimp_thumb_filename_from_uri (uri);
|
||||
|
||||
if (filename)
|
||||
{
|
||||
|
@ -576,6 +576,41 @@ _gimp_thumbs_delete_others (const gchar *uri,
|
|||
}
|
||||
}
|
||||
|
||||
gchar *
|
||||
_gimp_thumb_filename_from_uri (const gchar *uri)
|
||||
{
|
||||
gchar *filename;
|
||||
gchar *hostname;
|
||||
|
||||
g_return_val_if_fail (uri != NULL, NULL);
|
||||
|
||||
filename = g_filename_from_uri (uri, &hostname, NULL);
|
||||
|
||||
if (!filename)
|
||||
return NULL;
|
||||
|
||||
if (hostname)
|
||||
{
|
||||
/* we have a file: URI with a hostname */
|
||||
|
||||
#ifdef G_OS_WIN32
|
||||
/* on Win32, create a valid UNC path and use it as the filename */
|
||||
gchar *tmp = g_build_filename ("//", hostname, filename, NULL);
|
||||
|
||||
g_free (filename);
|
||||
filename = tmp;
|
||||
#else
|
||||
/* otherwise return NULL, caller should use URI then */
|
||||
g_free (filename);
|
||||
filename = NULL;
|
||||
#endif
|
||||
|
||||
g_free (hostname);
|
||||
}
|
||||
|
||||
return filename;
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_thumb_exit (void)
|
||||
{
|
||||
|
|
|
@ -60,6 +60,7 @@ void gimp_thumbs_delete_for_uri_local (const gchar *uri);
|
|||
/* for internal use only */
|
||||
void _gimp_thumbs_delete_others (const gchar *uri,
|
||||
GimpThumbSize size);
|
||||
gchar * _gimp_thumb_filename_from_uri (const gchar *uri);
|
||||
|
||||
|
||||
G_END_DECLS
|
||||
|
|
|
@ -639,8 +639,8 @@ gimp_thumbnail_update_image (GimpThumbnail *thumbnail)
|
|||
case GIMP_THUMB_STATE_UNKNOWN:
|
||||
g_return_if_fail (thumbnail->image_filename == NULL);
|
||||
|
||||
thumbnail->image_filename = g_filename_from_uri (thumbnail->image_uri,
|
||||
NULL, NULL);
|
||||
thumbnail->image_filename =
|
||||
_gimp_thumb_filename_from_uri (thumbnail->image_uri);
|
||||
|
||||
if (! thumbnail->image_filename)
|
||||
state = GIMP_THUMB_STATE_REMOTE;
|
||||
|
@ -1212,7 +1212,7 @@ gimp_thumbnail_save_thumb_local (GimpThumbnail *thumbnail,
|
|||
if (size < 1)
|
||||
return TRUE;
|
||||
|
||||
filename = g_filename_from_uri (thumbnail->image_uri, NULL, NULL);
|
||||
filename = _gimp_thumb_filename_from_uri (thumbnail->image_uri);
|
||||
if (! filename)
|
||||
return TRUE;
|
||||
|
||||
|
|
Loading…
Reference in New Issue