Skip to content

Commit

Permalink
Remove unused variable and other minor cleanup.
Browse files Browse the repository at this point in the history
Signed-off-by: Jonathan 'Wolf' Rentzsch <jwr.git@redshed.net>
  • Loading branch information
lapcat authored and rentzsch committed Feb 20, 2009
1 parent 599420a commit 2aa30c6
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions Plugin/CTFMenubarMenuController.m
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ - (int) applicationMenuPrefsInsertionLocation
return [ indx intValue ];

NSMenu* applicationMenu = appMenu();
int insertLocation = -1, showPrefsItem = -1, lastSeenSep = -1;
int insertLocation = -1, showPrefsItem = -1;
int i, count = [ applicationMenu numberOfItems ];
for( i = 0 ; i < count ; ++i ) {
// Put it before the first separator after the preferences item.
Expand Down Expand Up @@ -157,29 +157,29 @@ - (void) awakeFromNib
NSLog( @"ClickToFlash: Could not load menubar menu" );
return;
}

// We need a submenu item to wrap this loaded menu:

NSMenuItem* ctfMenuItem = [ [ [ NSMenuItem alloc ] initWithTitle: [ menu title ]
action: nil
keyEquivalent: @"" ] autorelease ];
[ ctfMenuItem setSubmenu: menu ];

// Find the location to insert the item:

int insertLocation = [ self applicationMenuPrefsInsertionLocation ];

// Insert the submenu there:

NSMenu* applicationMenu = appMenu();

// Sanity check the location

NSMenu* applicationMenu = appMenu();

if ( ( insertLocation < 0 ) || ( insertLocation > [applicationMenu numberOfItems] ) ) {
if ( ( insertLocation < 0 ) || ( insertLocation > [ applicationMenu numberOfItems ] ) ) {
NSLog( @"ClickToFlash: Could not insert menu at location %i", insertLocation );
return;
}

// We need a submenu item to wrap this loaded menu:

NSMenuItem* ctfMenuItem = [ [ [ NSMenuItem alloc ] initWithTitle: [ menu title ]
action: nil
keyEquivalent: @"" ] autorelease ];
[ ctfMenuItem setSubmenu: menu ];

// Insert the submenu there:

[ applicationMenu insertItem: ctfMenuItem atIndex: insertLocation ];
}

Expand Down

0 comments on commit 2aa30c6

Please sign in to comment.