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.
This commit is contained in:

committed by
Sven Neumann

parent
c3ef897b10
commit
69c5ce557d
@ -1,3 +1,8 @@
|
||||
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
|
||||
|
Reference in New Issue
Block a user