* 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>
* Images/common_ToolbarClippedItemsMark.tiff: Revert to an older

View file

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