* 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:
Fred Kiefer 2011-04-18 22:24:08 +00:00
parent 2a781c1651
commit e8745434cd
2 changed files with 16 additions and 15 deletions

View file

@ -1,3 +1,8 @@
2011-04-19 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSMenu.m (-_organizeMenu): Move some code around to avoid
a compiler warning.
2011-04-19 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSViewController.m (-loadView): Retain the topLevelObjects.

View file

@ -272,20 +272,6 @@ 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];
@ -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);
}