mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-05-30 03:50:39 +00:00
per-window menu setting tweaks.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@27686 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
246576a001
commit
ab54f4450e
8 changed files with 100 additions and 35 deletions
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include "GSWindowDecorationView.h"
|
||||
|
||||
#include <Foundation/NSEnumerator.h>
|
||||
#include <Foundation/NSException.h>
|
||||
|
||||
#include "AppKit/NSColor.h"
|
||||
|
@ -417,14 +418,26 @@
|
|||
[self changeWindowHeight: menubarHeight];
|
||||
}
|
||||
|
||||
- (void) removeMenuView: (NSMenuView*)menuView
|
||||
- (NSMenuView*) removeMenuView
|
||||
{
|
||||
float menubarHeight = [NSMenuView menuBarHeight];
|
||||
NSEnumerator *e = [[self subviews] objectEnumerator];
|
||||
NSView *v;
|
||||
|
||||
// Unplug the menu view
|
||||
[menuView removeFromSuperviewWithoutNeedingDisplay];
|
||||
while ((v = [e nextObject]) != nil)
|
||||
{
|
||||
if ([v isKindOfClass: [NSMenuView class]] == YES)
|
||||
{
|
||||
float menubarHeight = [NSMenuView menuBarHeight];
|
||||
|
||||
/* Unplug the menu view and return it so that it can be
|
||||
* restored to its original menu if necessary.
|
||||
*/
|
||||
[RETAIN(v) removeFromSuperviewWithoutNeedingDisplay];
|
||||
|
||||
[self changeWindowHeight: -menubarHeight];
|
||||
[self changeWindowHeight: -menubarHeight];
|
||||
return AUTORELEASE(v);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue