Add method to ask if the menu should show the icon. In some themes it

is redundant.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32829 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
gcasa 2011-04-10 20:14:53 +00:00
parent 5fc2c2c4e7
commit 0d33cb856d
3 changed files with 33 additions and 12 deletions

View file

@ -274,16 +274,19 @@ static BOOL menuBarVisible = YES;
NSMutableArray *itemsToMove;
NSImage *ti;
float bar;
if([[GSTheme theme] menuShouldShowIcon])
{
ti = [[NSApp applicationIconImage] copy];
if (ti == nil)
{
ti = [[NSImage imageNamed: @"GNUstep"] copy];
}
[ti setScalesWhenResized: YES];
bar = [NSMenuView menuBarHeight] - 4;
[ti setSize: NSMakeSize(bar, bar)];
}
ti = [[NSApp applicationIconImage] copy];
if (ti == nil)
{
ti = [[NSImage imageNamed: @"GNUstep"] copy];
}
[ti setScalesWhenResized: YES];
bar = [NSMenuView menuBarHeight] - 4;
[ti setSize: NSMakeSize(bar, bar)];
itemsToMove = [NSMutableArray new];
if (appMenu == nil)
@ -309,9 +312,13 @@ static BOOL menuBarVisible = YES;
RELEASE (appItem);
}
}
[appItem setImage: ti];
RELEASE(ti);
if([[GSTheme theme] menuShouldShowIcon])
{
[appItem setImage: ti];
RELEASE(ti);
}
// Collect all simple items plus "Info" and "Services"
for (i = 1; i < [_items count]; i++)
{