mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-06-01 18:11:56 +00:00
* Source/NSAlert.m: Offset color by less in -resetWindow. Remove
redundant logic for calling the "didEnd" method in the NSBeginSheet... functions. * Source/NSApplication.m: Add code to reset parent window in beginSheet:... method. Also added check to make sure the modalDelegate is not nil. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@28411 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
9529d2cdb7
commit
c58602f5f5
3 changed files with 19 additions and 26 deletions
|
@ -1,3 +1,12 @@
|
||||||
|
2009-07-25 22:54-EDT Gregory John Casamento <greg.casamento@gmail.com>
|
||||||
|
|
||||||
|
* Source/NSAlert.m: Offset color by less in -resetWindow. Remove
|
||||||
|
redundant logic for calling the "didEnd" method in the NSBeginSheet...
|
||||||
|
functions.
|
||||||
|
* Source/NSApplication.m: Add code to reset parent window in
|
||||||
|
beginSheet:... method. Also added check to make sure the
|
||||||
|
modalDelegate is not nil.
|
||||||
|
|
||||||
2009-07-25 20:54-EDT Gregory John Casamento <greg.casamento@gmail.com>
|
2009-07-25 20:54-EDT Gregory John Casamento <greg.casamento@gmail.com>
|
||||||
|
|
||||||
* Source/NSAlert.m: Remove category for setAttachedSheet method.
|
* Source/NSAlert.m: Remove category for setAttachedSheet method.
|
||||||
|
|
|
@ -976,9 +976,9 @@ setControl(NSView* content, id control, NSString *title)
|
||||||
colorUsingColorSpaceName: NSCalibratedRGBColorSpace]
|
colorUsingColorSpaceName: NSCalibratedRGBColorSpace]
|
||||||
getRed: &r green: &g blue: &b alpha: &a];
|
getRed: &r green: &g blue: &b alpha: &a];
|
||||||
|
|
||||||
color = [NSColor colorWithCalibratedRed: r + 0.1
|
color = [NSColor colorWithCalibratedRed: r + 0.05
|
||||||
green: g + 0.1
|
green: g + 0.05
|
||||||
blue: b + 0.1
|
blue: b + 0.05
|
||||||
alpha: a];
|
alpha: a];
|
||||||
[self setBackgroundColor: color];
|
[self setBackgroundColor: color];
|
||||||
}
|
}
|
||||||
|
@ -1547,21 +1547,16 @@ void NSBeginAlertSheet(NSString *title,
|
||||||
|
|
||||||
panel = getSomeSheet(&standardAlertPanel, defaultTitle, title, message,
|
panel = getSomeSheet(&standardAlertPanel, defaultTitle, title, message,
|
||||||
defaultButton, alternateButton, otherButton);
|
defaultButton, alternateButton, otherButton);
|
||||||
|
|
||||||
// FIXME: We should also change the button action to call endSheet:
|
// FIXME: We should also change the button action to call endSheet:
|
||||||
[NSApp beginSheet: panel
|
[NSApp beginSheet: panel
|
||||||
modalForWindow: docWindow
|
modalForWindow: docWindow
|
||||||
modalDelegate: modalDelegate
|
modalDelegate: modalDelegate
|
||||||
didEndSelector: willEndSelector
|
didEndSelector: willEndSelector
|
||||||
contextInfo: contextInfo];
|
contextInfo: contextInfo];
|
||||||
[panel close];
|
|
||||||
if (modalDelegate && [modalDelegate respondsToSelector: didEndSelector])
|
|
||||||
{
|
|
||||||
void (*didEnd)(id, SEL, id, int, void*);
|
|
||||||
|
|
||||||
didEnd = (void (*)(id, SEL, id, int, void*))[modalDelegate methodForSelector:
|
[panel close];
|
||||||
didEndSelector];
|
|
||||||
didEnd(modalDelegate, didEndSelector, panel, [panel result], contextInfo);
|
|
||||||
}
|
|
||||||
NSReleaseAlertPanel(panel);
|
NSReleaseAlertPanel(panel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1593,14 +1588,7 @@ void NSBeginCriticalAlertSheet(NSString *title,
|
||||||
didEndSelector: willEndSelector
|
didEndSelector: willEndSelector
|
||||||
contextInfo: contextInfo];
|
contextInfo: contextInfo];
|
||||||
[panel close];
|
[panel close];
|
||||||
if (modalDelegate && [modalDelegate respondsToSelector: didEndSelector])
|
|
||||||
{
|
|
||||||
void (*didEnd)(id, SEL, id, int, void*);
|
|
||||||
|
|
||||||
didEnd = (void (*)(id, SEL, id, int, void*))[modalDelegate methodForSelector:
|
|
||||||
didEndSelector];
|
|
||||||
didEnd(modalDelegate, didEndSelector, panel, [panel result], contextInfo);
|
|
||||||
}
|
|
||||||
NSReleaseAlertPanel(panel);
|
NSReleaseAlertPanel(panel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1634,14 +1622,7 @@ void NSBeginInformationalAlertSheet(NSString *title,
|
||||||
didEndSelector: willEndSelector
|
didEndSelector: willEndSelector
|
||||||
contextInfo: contextInfo];
|
contextInfo: contextInfo];
|
||||||
[panel close];
|
[panel close];
|
||||||
if (modalDelegate && [modalDelegate respondsToSelector: didEndSelector])
|
|
||||||
{
|
|
||||||
void (*didEnd)(id, SEL, id, int, void*);
|
|
||||||
|
|
||||||
didEnd = (void (*)(id, SEL, id, int, void*))[modalDelegate methodForSelector:
|
|
||||||
didEndSelector];
|
|
||||||
didEnd(modalDelegate, didEndSelector, panel, [panel result], contextInfo);
|
|
||||||
}
|
|
||||||
NSReleaseAlertPanel(panel);
|
NSReleaseAlertPanel(panel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1893,10 +1893,11 @@ See -runModalForWindow:
|
||||||
|
|
||||||
[sheet setParentWindow: docWindow];
|
[sheet setParentWindow: docWindow];
|
||||||
[docWindow setAttachedSheet: sheet];
|
[docWindow setAttachedSheet: sheet];
|
||||||
|
|
||||||
ret = [self runModalForWindow: sheet
|
ret = [self runModalForWindow: sheet
|
||||||
relativeToWindow: docWindow];
|
relativeToWindow: docWindow];
|
||||||
|
|
||||||
if ([modalDelegate respondsToSelector: didEndSelector])
|
if (modalDelegate && [modalDelegate respondsToSelector: didEndSelector])
|
||||||
{
|
{
|
||||||
void (*didEnd)(id, SEL, id, int, void*);
|
void (*didEnd)(id, SEL, id, int, void*);
|
||||||
|
|
||||||
|
@ -1904,7 +1905,9 @@ See -runModalForWindow:
|
||||||
didEndSelector];
|
didEndSelector];
|
||||||
didEnd(modalDelegate, didEndSelector, sheet, ret, contextInfo);
|
didEnd(modalDelegate, didEndSelector, sheet, ret, contextInfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
[docWindow setAttachedSheet: nil];
|
[docWindow setAttachedSheet: nil];
|
||||||
|
[sheet setParentWindow: nil];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue