diff --git a/ChangeLog b/ChangeLog index 65a53c69e..2ae12d246 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2011-04-19 Fred Kiefer + + * Source/NSMenu.m (-_organizeMenu): Move some code around to avoid + a compiler warning. + 2011-04-19 Fred Kiefer * Source/NSViewController.m (-loadView): Retain the topLevelObjects. diff --git a/Source/NSMenu.m b/Source/NSMenu.m index fc28fc1ca..02520ae06 100644 --- a/Source/NSMenu.m +++ b/Source/NSMenu.m @@ -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); }