* Source/NSMenu.m (-setMain:): Remove the in-window menu when

switching to a theme without that.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@34652 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2012-01-29 00:43:50 +00:00
parent f44df5eb78
commit 424237e4d9
2 changed files with 15 additions and 16 deletions

View file

@ -1,3 +1,8 @@
2012-01-28 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSMenu.m (-setMain:): Remove the in-window menu when
switching to a theme without that.
2012-01-27 Fred Kiefer <FredKiefer@gmx.de> 2012-01-27 Fred Kiefer <FredKiefer@gmx.de>
* Images/common_ToolbarClippedItemsMark.tiff: Revert to an older * Images/common_ToolbarClippedItemsMark.tiff: Revert to an older

View file

@ -2011,41 +2011,35 @@ static BOOL menuBarVisible = YES;
[self setMenuRepresentation: newRep]; [self setMenuRepresentation: newRep];
[self _organizeMenu]; [self _organizeMenu];
RELEASE(newRep); RELEASE(newRep);
if (newStyle == NSWindows95InterfaceStyle) if (oldStyle == NSWindows95InterfaceStyle)
{ {
/* Put menu in the main window for microsoft style. /* Remove the menu from all main windows.
*/ */
[[NSApp mainWindow] setMenu: self]; [[GSTheme theme] updateAllWindowsWithMenu: nil];
}
else if ([[NSApp mainWindow] menu] == self)
{
/* Remove the menu from the main window.
*/
[[NSApp mainWindow] setMenu: nil];
} }
} }
/* Adjust the menu window to suit the menu view unless the menu /* Adjust the menu window to suit the menu view unless the menu
* is being displayed in the application main window. * is being displayed in the application main window.
*/ */
if ([[NSApp mainWindow] menu] != self) if (newStyle != NSWindows95InterfaceStyle)
{ {
[[self window] setTitle: [[NSProcessInfo processInfo] processName]]; [[self window] setTitle: [[NSProcessInfo processInfo] processName]];
[[self window] setLevel: NSMainMenuWindowLevel]; [[self window] setLevel: NSMainMenuWindowLevel];
[self _setGeometry]; [self _setGeometry];
[self sizeToFit]; [self sizeToFit];
} }
else
{
/* Put menu in all main windows for microsoft style.
*/
[[GSTheme theme] updateAllWindowsWithMenu: self];
}
if ([NSApp isActive]) if ([NSApp isActive])
{ {
[self display]; [self display];
} }
if (NSInterfaceStyleForKey(@"NSMenuInterfaceStyle", nil) ==
NSWindows95InterfaceStyle)
{
[[GSTheme theme] updateAllWindowsWithMenu: self];
}
} }
else else
{ {