mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 07:00:46 +00:00
* Source/NSApplication.m (-changeWindowsItem:title:filename:): If the
window can become key, use makeKeyAndOrderFront: as the action. (-updateWindowsItem:, -setWindowsMenu): Compare the title to what it would be if there was a represented filename, not the filename. * Source/NSApplication.m (-orderWindow:relativeTo:): Ditto. (-setExcludedFromWindowsMenu): Ditto. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@20675 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
2d14cc4dfe
commit
16af347226
3 changed files with 40 additions and 6 deletions
|
@ -1,3 +1,12 @@
|
|||
2005-02-08 Matt Rice <ratmice@yahoo.com>
|
||||
|
||||
* Source/NSApplication.m (-changeWindowsItem:title:filename:): If the
|
||||
window can become key, use makeKeyAndOrderFront: as the action.
|
||||
(-updateWindowsItem:, -setWindowsMenu): Compare the title to what it
|
||||
would be if there was a represented filename, not the filename.
|
||||
* Source/NSApplication.m (-orderWindow:relativeTo:): Ditto.
|
||||
(-setExcludedFromWindowsMenu): Ditto.
|
||||
|
||||
2005-02-08 Fred Kiefer <FredKiefer@gmx.de>
|
||||
|
||||
* Source/NSSecureTextField.m (-drawInteriorWithFrame:inView:):
|
||||
|
|
|
@ -2476,10 +2476,21 @@ image.
|
|||
break;
|
||||
i++;
|
||||
}
|
||||
item = [_windows_menu insertItemWithTitle: aString
|
||||
|
||||
if ([aWindow canBecomeKeyWindow])
|
||||
{
|
||||
item = [_windows_menu insertItemWithTitle: aString
|
||||
action: @selector(makeKeyAndOrderFront:)
|
||||
keyEquivalent: @""
|
||||
atIndex: i];
|
||||
}
|
||||
else
|
||||
{
|
||||
item = [_windows_menu insertItemWithTitle: aString
|
||||
action: @selector(orderFront:)
|
||||
keyEquivalent: @""
|
||||
atIndex: i];
|
||||
}
|
||||
[item setTarget: aWindow];
|
||||
|
||||
// When changing for a window with a file, we should also set the image.
|
||||
|
@ -2516,6 +2527,9 @@ image.
|
|||
NSString *t = [aWindow title];
|
||||
NSString *f = [aWindow representedFilename];
|
||||
|
||||
f = [NSString stringWithFormat: @"%@ -- %@",
|
||||
[f lastPathComponent],
|
||||
[f stringByDeletingLastPathComponent]];
|
||||
[self changeWindowsItem: aWindow
|
||||
title: t
|
||||
filename: [t isEqual: f]];
|
||||
|
@ -2571,7 +2585,10 @@ image.
|
|||
{
|
||||
NSString *t = [win title];
|
||||
NSString *f = [win representedFilename];
|
||||
|
||||
|
||||
f = [NSString stringWithFormat: @"%@ -- %@",
|
||||
[f lastPathComponent],
|
||||
[f stringByDeletingLastPathComponent]];
|
||||
[self changeWindowsItem: win
|
||||
title: t
|
||||
filename: [t isEqual: f]];
|
||||
|
|
|
@ -1565,8 +1565,12 @@ many times.
|
|||
if (_f.menu_exclude == NO)
|
||||
{
|
||||
BOOL isFileName;
|
||||
|
||||
isFileName = [_windowTitle isEqual: _representedFilename];
|
||||
NSString *aString;
|
||||
|
||||
aString = [NSString stringWithFormat: @"%@ -- %@",
|
||||
[_representedFilename lastPathComponent],
|
||||
[_representedFilename stringByDeletingLastPathComponent]];
|
||||
isFileName = [_windowTitle isEqual: aString];
|
||||
|
||||
[NSApp addWindowsItem: self
|
||||
title: _windowTitle
|
||||
|
@ -3591,8 +3595,12 @@ resetCursorRectsForView(NSView *theView)
|
|||
if (_f.menu_exclude == NO)
|
||||
{
|
||||
BOOL isFileName;
|
||||
|
||||
isFileName = [_windowTitle isEqual: _representedFilename];
|
||||
NSString *aString;
|
||||
|
||||
aString = [NSString stringWithFormat: @"%@ -- %@",
|
||||
[_representedFilename lastPathComponent],
|
||||
[_representedFilename stringByDeletingLastPathComponent]];
|
||||
isFileName = [_windowTitle isEqual: aString];
|
||||
|
||||
[NSApp addWindowsItem: self
|
||||
title: _windowTitle
|
||||
|
|
Loading…
Reference in a new issue