Commit 69c5ce55 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

fixed handling of too many error messages.

2004-09-19  Sven Neumann  <sven@gimp.org>

	* app/widgets/gimperrordialog.c (gimp_error_dialog_add): fixed
	handling of too many error messages.
parent c3ef897b
2004-09-19 Sven Neumann <sven@gimp.org>
* app/widgets/gimperrordialog.c (gimp_error_dialog_add): fixed
handling of too many error messages.
2004-09-19 Sven Neumann <sven@gimp.org>
Try to make floating selections more obvious:
......
......@@ -212,7 +212,15 @@ gimp_error_dialog_add (GimpErrorDialog *dialog,
g_return_if_fail (domain != NULL);
g_return_if_fail (message != NULL);
if (++dialog->num_messages > GIMP_ERROR_DIALOG_MAX_MESSAGES)
if (dialog->last_box &&
dialog->last_domain && strcmp (dialog->last_domain, domain) == 0 &&
dialog->last_message && strcmp (dialog->last_message, message) == 0)
{
if (gimp_message_box_repeat (GIMP_MESSAGE_BOX (dialog->last_box)))
return;
}
if (dialog->num_messages >= GIMP_ERROR_DIALOG_MAX_MESSAGES)
{
g_printerr ("%s: %s\n\n", domain, message);
......@@ -222,6 +230,7 @@ gimp_error_dialog_add (GimpErrorDialog *dialog,
message = _("Messages are redirected to stderr.");
}
/* yes, these lines are repeated here for a reason */
if (dialog->last_box &&
dialog->last_domain && strcmp (dialog->last_domain, domain) == 0 &&
dialog->last_message && strcmp (dialog->last_message, message) == 0)
......@@ -235,6 +244,8 @@ gimp_error_dialog_add (GimpErrorDialog *dialog,
"border_width", 12,
NULL);
dialog->num_messages++;
if (overflow)
gimp_message_box_set_primary_text (GIMP_MESSAGE_BOX (box), domain);
else
......
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