* Source/NSMenu.m (-_organizeMenu): Move some code around to avoid

a compiler warning.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@32890 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
fredkiefer 2011-04-18 22:24:08 +00:00
parent 81f9704bc9
commit 58df64a56b
2 changed files with 16 additions and 15 deletions

View file

@ -272,21 +272,7 @@ static BOOL menuBarVisible = YES;
if (_menu.horizontal == 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)];
}
itemsToMove = [NSMutableArray new];
if (appMenu == nil)
@ -313,8 +299,18 @@ static BOOL menuBarVisible = YES;
}
}
if([[GSTheme theme] menuShouldShowIcon])
if ([[GSTheme theme] menuShouldShowIcon])
{
NSImage *ti;
float 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)];
[appItem setImage: ti];
RELEASE(ti);
}