mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-31 19:10:48 +00:00
Fix for bug #16688, but needs more investigation/work
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@22995 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
d585d1e2fb
commit
c84f195bd8
5 changed files with 23 additions and 4 deletions
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,17 @@
|
||||||
|
2006-05-29 Richard Frith-Macdonald <rfm@gnu.org>
|
||||||
|
|
||||||
|
* Source/NSApplication.m: Revert last change which broke menu
|
||||||
|
key equivalents for off-screen windows.
|
||||||
|
* Source/NSOpenPanel.m: Fix handling CR key equivalent (bug #16688)
|
||||||
|
so that panel only takes action when it is active.
|
||||||
|
* Source/NSSavePanel.m: ditto
|
||||||
|
Fix done by disabling the ok button when the panel is not active,
|
||||||
|
but what about if other panels have similar bugs ... shouldn't there
|
||||||
|
be some automatic mechanism to stop buttons (but not menu items) from
|
||||||
|
responding to key equivalents when a window is not the key window?
|
||||||
|
* Source/NSButton.m: ([performKeyEquivalent:]) return NO if blocked
|
||||||
|
by a modal window as per macos-x documentation.
|
||||||
|
|
||||||
2006-05-29 00:58 Gregory John Casamento <greg_casamento@yahoo.com>
|
2006-05-29 00:58 Gregory John Casamento <greg_casamento@yahoo.com>
|
||||||
|
|
||||||
* Source/NSApplication.m: Correction for bug#16688.
|
* Source/NSApplication.m: Correction for bug#16688.
|
||||||
|
|
|
@ -1838,9 +1838,6 @@ See -runModalForWindow:
|
||||||
{
|
{
|
||||||
NSWindow *window = [window_list objectAtIndex: i];
|
NSWindow *window = [window_list objectAtIndex: i];
|
||||||
|
|
||||||
if ([window isVisible] == NO)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if ([window performKeyEquivalent: theEvent] == YES)
|
if ([window performKeyEquivalent: theEvent] == YES)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -500,10 +500,15 @@ static id buttonCellClass = nil;
|
||||||
[NSControl-performClick:]
|
[NSControl-performClick:]
|
||||||
[NSEvent-charactersIgnoringModifiers] [NSEvent-modifierFlags]</p>
|
[NSEvent-charactersIgnoringModifiers] [NSEvent-modifierFlags]</p>
|
||||||
|
|
||||||
|
Does nothing and returns NO if the receiver is disabled or if it is
|
||||||
|
blocked by a modal window being run.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
- (BOOL) performKeyEquivalent: (NSEvent *)anEvent
|
- (BOOL) performKeyEquivalent: (NSEvent *)anEvent
|
||||||
{
|
{
|
||||||
if ([self isEnabled])
|
NSWindow *w = [self window];
|
||||||
|
|
||||||
|
if ([self isEnabled] && ([w worksWhenModal] || [NSApp modalWindow] == w))
|
||||||
{
|
{
|
||||||
NSString *key = [self keyEquivalent];
|
NSString *key = [self keyEquivalent];
|
||||||
|
|
||||||
|
|
|
@ -563,6 +563,7 @@ static NSOpenPanel *_gs_gui_open_panel = nil;
|
||||||
}
|
}
|
||||||
|
|
||||||
[NSApp stopModalWithCode: NSOKButton];
|
[NSApp stopModalWithCode: NSOKButton];
|
||||||
|
[_okButton setEnabled: NO];
|
||||||
[self close];
|
[self close];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1067,6 +1067,7 @@ selectCellWithString: (NSString*)title
|
||||||
{
|
{
|
||||||
ASSIGN(_directory, [_browser pathToColumn:[_browser lastColumn]]);
|
ASSIGN(_directory, [_browser pathToColumn:[_browser lastColumn]]);
|
||||||
[NSApp stopModalWithCode: NSCancelButton];
|
[NSApp stopModalWithCode: NSCancelButton];
|
||||||
|
[_okButton setEnabled: NO];
|
||||||
[self close];
|
[self close];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1179,6 +1180,7 @@ selectCellWithString: (NSString*)title
|
||||||
return;
|
return;
|
||||||
|
|
||||||
[NSApp stopModalWithCode: NSOKButton];
|
[NSApp stopModalWithCode: NSOKButton];
|
||||||
|
[_okButton setEnabled: NO];
|
||||||
[self close];
|
[self close];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue