* Source/NSMenu.m: Beginning of support for windows style menus on the

top of the window.
	* Source/NSWindow.m: Added code in the method -setFrameFromString: to 
	make certain the window doesn't go out of bounds if the screen size
	changes.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@26751 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Gregory John Casamento 2008-07-08 20:17:44 +00:00
parent 001bdbc4e9
commit e39b7a04b4
3 changed files with 24 additions and 5 deletions

View file

@ -145,8 +145,9 @@ static BOOL menuBarVisible = YES;
- (NSString*) _locationKey
{
if (NSInterfaceStyleForKey(@"NSMenuInterfaceStyle", nil)
== NSMacintoshInterfaceStyle)
NSInterfaceStyle style = NSInterfaceStyleForKey(@"NSMenuInterfaceStyle", nil);
if (style == NSMacintoshInterfaceStyle ||
style == NSWindows95InterfaceStyle)
{
return nil;
}
@ -1486,8 +1487,9 @@ static BOOL menuBarVisible = YES;
- (void) _showTornOffMenuIfAny: (NSNotification*)notification
{
if (NSInterfaceStyleForKey(@"NSMenuInterfaceStyle", nil)
== NSMacintoshInterfaceStyle)
NSInterfaceStyle style = NSInterfaceStyleForKey(@"NSMenuInterfaceStyle", nil);
if (style == NSMacintoshInterfaceStyle ||
style == NSWindows95InterfaceStyle)
{
return;
}
@ -1727,7 +1729,8 @@ static BOOL menuBarVisible = YES;
NSMenuView *newRep;
newRep = [[NSMenuView alloc] initWithFrame: NSZeroRect];
if (newStyle == NSMacintoshInterfaceStyle)
if (newStyle == NSMacintoshInterfaceStyle ||
newStyle == NSWindows95InterfaceStyle)
{
[newRep setHorizontal: YES];
}