diff --git a/ChangeLog b/ChangeLog index 5e149e4b3..c1d4849ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2002-11-08 Adam Fedor + + * Source/NSSavePanel.m ([NSSavePanel -_shouldShowExtension:isDir:]): + Filter regular files also. + + * Source/NSMenu.m ([NSMenuPanel -canBecomeKeyWindow]): Return + YES only if we are the main menu. + * Source/NSWindow.m ([NSWindow -sendEvent:]) (FocusIn): If we are + the main menu, try to find another window to become key. + 2002-11-07 Fred Kiefer * Source/NSCell.m diff --git a/Documentation/Gui/DefaultsSummary.gsdoc b/Documentation/Gui/DefaultsSummary.gsdoc index 5e88ed405..a53f4fc82 100644 --- a/Documentation/Gui/DefaultsSummary.gsdoc +++ b/Documentation/Gui/DefaultsSummary.gsdoc @@ -63,6 +63,14 @@ it is). Default is Control-q.

+ GSFileBrowserHideDotFiles + +

+ A boolean, by default NO. If you set it to YES, files that + begin with a dot ('.') are not shown in the NSSavePanel or + NSOpenPanel. +

+
GSInsertControlKeystrokes

diff --git a/Source/NSMenu.m b/Source/NSMenu.m index 0f9668317..8eb525961 100644 --- a/Source/NSMenu.m +++ b/Source/NSMenu.m @@ -91,10 +91,10 @@ static NSNotificationCenter *nc; @implementation NSMenuPanel - (BOOL) canBecomeKeyWindow { - /* This should be NO, but there's currently a bug in the interaction - with WindowMaker that causes spurious deactivation of the app - if the app icon is the only window that can become key */ - return YES; + /* See [NSWindow-_lossOfKeyOrMainWindow] */ + if (self == (NSMenuPanel *)[[NSApp mainMenu] window]) + return YES; + return NO; } @end diff --git a/Source/NSSavePanel.m b/Source/NSSavePanel.m index 242d3ff38..09821a4c7 100644 --- a/Source/NSSavePanel.m +++ b/Source/NSSavePanel.m @@ -458,8 +458,16 @@ selectCellWithString: (NSString*)title - (BOOL) _shouldShowExtension: (NSString *)extension isDir: (BOOL *)isDir; { - if (_treatsFilePackagesAsDirectories == NO && *isDir == YES && - ![extension isEqualToString: @""]) + if (*isDir == NO) + { + if ([extension isEqualToString: _requiredFileType] == NO) + return NO; + } + else if ([extension length] == 0) + { + /* Automatic YES */ + } + else if (_treatsFilePackagesAsDirectories == NO) { if ([extension isEqualToString: _requiredFileType] == YES) *isDir = NO; diff --git a/Source/NSWindow.m b/Source/NSWindow.m index 2e45a562d..511d6b9f8 100644 --- a/Source/NSWindow.m +++ b/Source/NSWindow.m @@ -106,10 +106,6 @@ BOOL GSViewAcceptsDrag(NSView *v, id dragInfo); non-obvious window that can become key) unless we have no choice (i.e. all the candidate windows were ordered out.) - FIXME: It should be the appicon which can become key, not the main - menu, but there is currently an unsolved problem with WindowMaker - interaction that prevents me from doing this. - FIXME: It would really be better if we maintained a stack of the most recent key/main windows and went through in order of most recent to least recent. That's probably a lot of work, however. @@ -3018,6 +3014,13 @@ Code shared with [NSPanel -sendEvent:], remember to update both places. [self makeMainWindow]; [NSApp activateIgnoringOtherApps: YES]; } + if (self == [[NSApp mainMenu] window]) + { + /* We should really find another window that can become + key (if possible) + */ + [self _lossOfKeyOrMainWindow]; + } break; case GSAppKitWindowFocusOut: