mirror of
https://gitlab.gnome.org/GNOME/gimp
synced 2024-10-21 12:02:32 +00:00
make sure the description contains no empty lines.
2007-05-19 Michael Natterer <mitch@gimp.org> * app/core/gimpimagefile.c (gimp_imagefile_get_desc_string): make sure the description contains no empty lines. svn path=/trunk/; revision=22540
This commit is contained in:
parent
d0e37946ed
commit
4884bc43fe
|
@ -1,3 +1,8 @@
|
|||
2007-05-19 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/core/gimpimagefile.c (gimp_imagefile_get_desc_string): make
|
||||
sure the description contains no empty lines.
|
||||
|
||||
2007-05-18 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* plug-ins/common/screenshot.c: try to use the window name as
|
||||
|
|
|
@ -571,34 +571,42 @@ gimp_imagefile_get_desc_string (GimpImagefile *imagefile)
|
|||
if (thumbnail->image_state == GIMP_THUMB_STATE_REMOTE)
|
||||
{
|
||||
g_string_append (str, _("Remote File"));
|
||||
g_string_append_c (str, '\n');
|
||||
}
|
||||
|
||||
if (thumbnail->image_filesize > 0)
|
||||
{
|
||||
gchar *size = gimp_memsize_to_string (thumbnail->image_filesize);
|
||||
|
||||
if (str->len > 0)
|
||||
g_string_append_c (str, '\n');
|
||||
|
||||
g_string_append (str, size);
|
||||
g_free (size);
|
||||
|
||||
g_string_append_c (str, '\n');
|
||||
}
|
||||
|
||||
switch (thumbnail->thumb_state)
|
||||
{
|
||||
case GIMP_THUMB_STATE_NOT_FOUND:
|
||||
if (str->len > 0)
|
||||
g_string_append_c (str, '\n');
|
||||
g_string_append (str, _("Click to create preview"));
|
||||
break;
|
||||
|
||||
case GIMP_THUMB_STATE_EXISTS:
|
||||
if (str->len > 0)
|
||||
g_string_append_c (str, '\n');
|
||||
g_string_append (str, _("Loading preview..."));
|
||||
break;
|
||||
|
||||
case GIMP_THUMB_STATE_OLD:
|
||||
if (str->len > 0)
|
||||
g_string_append_c (str, '\n');
|
||||
g_string_append (str, _("Preview is out of date"));
|
||||
break;
|
||||
|
||||
case GIMP_THUMB_STATE_FAILED:
|
||||
if (str->len > 0)
|
||||
g_string_append_c (str, '\n');
|
||||
g_string_append (str, _("Cannot create preview"));
|
||||
break;
|
||||
|
||||
|
@ -606,28 +614,39 @@ gimp_imagefile_get_desc_string (GimpImagefile *imagefile)
|
|||
{
|
||||
if (thumbnail->image_state == GIMP_THUMB_STATE_REMOTE)
|
||||
{
|
||||
if (str->len > 0)
|
||||
g_string_append_c (str, '\n');
|
||||
|
||||
g_string_append (str, _("(Preview may be out of date)"));
|
||||
g_string_append_c (str, '\n');
|
||||
}
|
||||
|
||||
if (thumbnail->image_width > 0 && thumbnail->image_height > 0)
|
||||
{
|
||||
if (str->len > 0)
|
||||
g_string_append_c (str, '\n');
|
||||
|
||||
g_string_append_printf (str,
|
||||
ngettext ("%d × %d pixel",
|
||||
"%d × %d pixels",
|
||||
thumbnail->image_height),
|
||||
thumbnail->image_width,
|
||||
thumbnail->image_height);
|
||||
g_string_append_c (str, '\n');
|
||||
}
|
||||
|
||||
if (thumbnail->image_type)
|
||||
g_string_append (str, gettext (thumbnail->image_type));
|
||||
{
|
||||
if (str->len > 0)
|
||||
g_string_append_c (str, '\n');
|
||||
|
||||
g_string_append (str, gettext (thumbnail->image_type));
|
||||
}
|
||||
|
||||
if (thumbnail->image_num_layers > 0)
|
||||
{
|
||||
if (thumbnail->image_type)
|
||||
g_string_append_len (str, ", ", 2);
|
||||
else if (str->len > 0)
|
||||
g_string_append_c (str, '\n');
|
||||
|
||||
g_string_append_printf (str,
|
||||
ngettext ("%d layer",
|
||||
|
|
Loading…
Reference in a new issue