diff --git a/ChangeLog b/ChangeLog index cd1bfef07..6f4acd481 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-12-18 Saso Kiselkov + + * Source/NSAlert.m: Left align long alert messages. + 2006-12-11 Adam Fedor * Documentation/manual/: File and node name fixes. diff --git a/Source/NSAlert.m b/Source/NSAlert.m index 96c0a7d1e..7decb4fc6 100644 --- a/Source/NSAlert.m +++ b/Source/NSAlert.m @@ -734,6 +734,20 @@ setControl(NSView* content, id control, NSString *title) [messageField removeFromSuperview]; } setControl(content, messageField, message); + + /* If the message contains a newline character then align the + * message to the left side, as it is quite undesirable for a long + * message to appear aligned in the center + */ + if ([message rangeOfString: @"\n"].location != NSNotFound) + { + [messageField setAlignment: NSLeftTextAlignment]; + } + else + { + [messageField setAlignment: NSCenterTextAlignment]; + } + setControl(content, defButton, defaultButton); setControl(content, altButton, alternateButton); setControl(content, othButton, otherButton);