Get windows item update working.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3533 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 1999-01-06 18:01:05 +00:00
parent 4906cb9402
commit 5e8b545ae1
3 changed files with 30 additions and 6 deletions

View file

@ -1,7 +1,13 @@
Wed Jan 6 17:35:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
* Source/NSApplication.m: minor fix for updating windows menu items.
* Source/NSWindow.m: Update windows menu when document edit state is
changed.
Tue Jan 5 18:05:00 1999 Richard Frith-Macdonald <richard@brainstorm.co.uk>
Source/NSMatrix.m: bugfix growing matrix - from stark@easynet.fr
Source/NSApplication.m: Modified -init method to return the shared
* Source/NSMatrix.m: bugfix growing matrix - from stark@easynet.fr
* Source/NSApplication.m: Modified -init method to return the shared
application object so that +new is effectively a synonym for the
[+sharedApplication] method - from stark@easynet.fr

View file

@ -1551,7 +1551,7 @@ NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
}
if (changed)
{
[item sizeToFit];
[[item controlView] sizeToFit];
[menu sizeToFit];
[menu update];
}

View file

@ -1,6 +1,4 @@
/*
NSWindow.m
The window class
Copyright (C) 1996 Free Software Foundation, Inc.
@ -246,7 +244,15 @@ NSView *wv;
- (void) setRepresentedFilename: (NSString*)aString
{
id old = represented_filename;
ASSIGN(represented_filename, aString);
if (menu_exclude == NO
&& ((represented_filename != nil && old == nil)
|| (represented_filename == nil && old != nil)))
{
[[NSApplication sharedApplication] updateWindowsItem: self];
}
}
- (void) setTitle: (NSString*)aString
@ -706,7 +712,19 @@ NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
}
- (void)performMiniaturize:sender { is_miniaturized = YES; } - (int)resizeFlags { return 0; }
- (void)setDocumentEdited:(BOOL)flag { is_edited = flag; }
- (void) setDocumentEdited: (BOOL)flag
{
if (is_edited != flag)
{
is_edited = flag;
if (menu_exclude == NO)
{
[[NSApplication sharedApplication] updateWindowsItem: self];
}
}
}
- (void)setReleasedWhenClosed:(BOOL)flag { is_released_when_closed = flag; }
//