Commit da34232a authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

print bad '%' sequences literally instead of warning (g_warning() is for

2004-08-25  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell-title.c
	(gimp_display_shell_format_title): print bad '%' sequences
	literally instead of warning (g_warning() is for programming
	errors only and must never be triggered by bad or intermediate
	user input). Fixes bug #150676
parent d52d54fe
2004-08-25 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-title.c
(gimp_display_shell_format_title): print bad '%' sequences
literally instead of warning (g_warning() is for programming
errors only and must never be triggered by bad or intermediate
user input). Fixes bug #150676
2004-08-24 Sven Neumann <sven@gimp.org>
* app/widgets/gimpmessagebox.c: put the icon to the right for RTL
......
......@@ -184,8 +184,7 @@ gimp_display_shell_format_title (GimpDisplayShell *shell,
switch (*format)
{
case 0:
g_warning ("image-title-format string ended within %%-sequence");
break;
/* format string ends within %-sequence, print literal '%' */
case '%':
title[i++] = '%';
......@@ -267,8 +266,8 @@ gimp_display_shell_format_title (GimpDisplayShell *shell,
case 'D': /* dirty flag */
if (format[1] == 0)
{
g_warning ("image-title-format string ended within "
"%%D-sequence");
/* format string ends within %D-sequence, print literal '%D' */
i += print (title, title_len, i, "%%D");
break;
}
if (image->dirty)
......@@ -279,8 +278,8 @@ gimp_display_shell_format_title (GimpDisplayShell *shell,
case 'C': /* clean flag */
if (format[1] == 0)
{
g_warning ("image-title-format string ended within "
"%%C-sequence");
/* format string ends within %C-sequence, print literal '%C' */
i += print (title, title_len, i, "%%C");
break;
}
if (! image->dirty)
......@@ -406,9 +405,9 @@ gimp_display_shell_format_title (GimpDisplayShell *shell,
*/
default:
g_warning ("image-title-format contains unknown "
"format sequence '%%%c'", *format);
break;
/* format string contains unknown %-sequence, print it literally */
i += print (title, title_len, i, "%%%c", *format);
break;
}
break;
......
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