* Source/NSAlert.m: Remove category for setAttachedSheet method.

* Source/NSApplication.m: Added private category to add 
	setAttachedSheet: to NSWindow.  Modified beginSheet:... method
	to call the new method with the sheet that is associated with it.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28410 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2009-07-26 00:56:29 +00:00
parent 5c556f96a7
commit 0c982ef3eb
3 changed files with 23 additions and 14 deletions

View file

@ -1,3 +1,10 @@
2009-07-25 20:54-EDT Gregory John Casamento <greg.casamento@gmail.com>
* Source/NSAlert.m: Remove category for setAttachedSheet method.
* Source/NSApplication.m: Added private category to add
setAttachedSheet: to NSWindow. Modified beginSheet:... method
to call the new method with the sheet that is associated with it.
2009-07-25 20:25-EDT Gregory John Casamento <greg.casamento@gmail.com>
* Source/NSAlert.m: GSAlertSheet - removed unecessary parentWindow

View file

@ -899,20 +899,6 @@ setControl(NSView* content, id control, NSString *title)
attached to the parent window.
*/
@interface NSWindow (GSAlertSheetPrivate)
- (void) setAttachedSheet: (id) sheet;
@end
@implementation NSWindow (GSAlertSheetPrivate)
/**
* Associate sheet with the window it's attached to. The window is not retained.
*/
- (void) setAttachedSheet: (id) sheet
{
_attachedSheet = sheet;
}
@end
@interface GSAlertSheet : GSAlertPanel
@end

View file

@ -372,6 +372,20 @@ struct _NSModalSession {
- (void) _workspaceNotification: (NSNotification*) notification;
@end
@interface NSWindow (ApplicationPrivate)
- (void) setAttachedSheet: (id) sheet;
@end
@implementation NSWindow (ApplicationPrivate)
/**
* Associate sheet with the window it's attached to. The window is not retained.
*/
- (void) setAttachedSheet: (id) sheet
{
_attachedSheet = sheet;
}
@end
@interface NSIconWindow : NSWindow
@end
@ -1878,6 +1892,7 @@ See -runModalForWindow:
int ret;
[sheet setParentWindow: docWindow];
[docWindow setAttachedSheet: sheet];
ret = [self runModalForWindow: sheet
relativeToWindow: docWindow];
@ -1889,6 +1904,7 @@ See -runModalForWindow:
didEndSelector];
didEnd(modalDelegate, didEndSelector, sheet, ret, contextInfo);
}
[docWindow setAttachedSheet: nil];
}
/**