Commit 8da246b2 authored by Liam Quin's avatar Liam Quin Committed by Michael Natterer
Browse files

Issue #1371 - Add title printf-like expando for export-clean and export-dirty

Add %Ex to print 'x' as export-clean indicator and %Nx for 'x' as
export-dirty indicator.

(cherry picked from commit 2e4b3ae0)
parent b20bb291
...@@ -402,6 +402,8 @@ static const gchar display_format_description[] = ...@@ -402,6 +402,8 @@ static const gchar display_format_description[] =
"%Cx expands to x if the image is clean, the empty string otherwise\n" "%Cx expands to x if the image is clean, the empty string otherwise\n"
"%B expands to (modified) if the image is dirty, the empty string otherwise\n" "%B expands to (modified) if the image is dirty, the empty string otherwise\n"
"%A expands to (clean) if the image is clean, the empty string otherwise\n" "%A expands to (clean) if the image is clean, the empty string otherwise\n"
"%Nx expands to x if the image is export-dirty, the empty string otherwise\n"
"%Ex expands to x if the image is export-clean, the empty string otherwise\n"
"%l the number of layers\n" "%l the number of layers\n"
"%L the number of layers (long form)\n" "%L the number of layers (long form)\n"
"%m memory used by the image\n" "%m memory used by the image\n"
......
...@@ -295,6 +295,30 @@ gimp_display_shell_format_title (GimpDisplayShell *shell, ...@@ -295,6 +295,30 @@ gimp_display_shell_format_title (GimpDisplayShell *shell,
i += print (title, title_len, i, "%s", _("(clean)")); i += print (title, title_len, i, "%s", _("(clean)"));
break; break;
case 'N': /* not-exported flag */
if (format[1] == 0)
{
/* format string ends within %E-sequence, print literal '%E' */
i += print (title, title_len, i, "%%N");
break;
}
if (gimp_image_is_export_dirty (image))
title[i++] = format[1];
format++;
break;
case 'E': /* exported flag */
if (format[1] == 0)
{
/* format string ends within %E-sequence, print literal '%E' */
i += print (title, title_len, i, "%%E");
break;
}
if (! gimp_image_is_export_dirty (image))
title[i++] = format[1];
format++;
break;
case 'm': /* memory used by image */ case 'm': /* memory used by image */
{ {
GimpObject *object = GIMP_OBJECT (image); GimpObject *object = GIMP_OBJECT (image);
......
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