diff --git a/ChangeLog b/ChangeLog index 90af433df..775698f05 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2007-10-11 Fred Kiefer + + * Source/NSDocument.m (-setPrintInfo:, -runPageLayout:): Move + updateChangeCount: call from one method to the other. + * Source/NSPageLayout.m (-okButtonClicked:, + -cancelButtonClicked:): Use standard button return codes. + * Source/NSTableView.m (-validateEditing): Initialize + newObjectValue with nil. + Patches by Wolfgang Lux . + 2007-10-06 23:03-EDT Gregory John Casamento * Headers/Additions/GNUstepGUI/GSNibCompatibility.h diff --git a/Source/NSDocument.m b/Source/NSDocument.m index 2fa90a3fc..f228274e1 100644 --- a/Source/NSDocument.m +++ b/Source/NSDocument.m @@ -1163,6 +1163,7 @@ originalContentsURL: (NSURL *)orig - (void)setPrintInfo: (NSPrintInfo *)printInfo { ASSIGN(_print_info, printInfo); + [self updateChangeCount: NSChangeDone]; } @@ -1195,7 +1196,6 @@ originalContentsURL: (NSURL *)orig && [self shouldChangePrintInfo: printInfo]) { [self setPrintInfo: printInfo]; - [self updateChangeCount: NSChangeDone]; } } diff --git a/Source/NSPageLayout.m b/Source/NSPageLayout.m index c0e0bd291..52acad489 100644 --- a/Source/NSPageLayout.m +++ b/Source/NSPageLayout.m @@ -543,13 +543,13 @@ enum { - (void) okButtonClicked: (id)sender { [self writePrintInfo]; - [NSApp stopModalWithCode: NSPLOKButton]; + [NSApp stopModalWithCode: NSOKButton]; } - (void) cancelButtonClicked: (id)sender { - [NSApp stopModalWithCode: NSPLCancelButton]; + [NSApp stopModalWithCode: NSCancelButton]; } diff --git a/Source/NSTableView.m b/Source/NSTableView.m index 8dba720f0..b8d26775a 100644 --- a/Source/NSTableView.m +++ b/Source/NSTableView.m @@ -3154,7 +3154,7 @@ byExtendingSelection: (BOOL)flag { NSFormatter *formatter; NSString *string; - id newObjectValue; + id newObjectValue = nil; BOOL validatedOK = YES; formatter = [_editedCell formatter]; @@ -3185,7 +3185,7 @@ byExtendingSelection: (BOOL)flag else { SEL sel = @selector(control:didFailToFormatString:errorDescription:); - newObjectValue = nil; + if ([_delegate respondsToSelector: sel]) { validatedOK = [_delegate control: self