Skip to content
Browse files

Remove unused variable and other minor cleanup.

Signed-off-by: Jonathan 'Wolf' Rentzsch <jwr.git@redshed.net>
  • Loading branch information...
1 parent 599420a commit 2aa30c669903b0e9888b5c64fcdacd9c6dd8da3a @lapcat lapcat committed with Feb 20, 2009
Showing with 13 additions and 13 deletions.
  1. +13 −13 Plugin/CTFMenubarMenuController.m
View
26 Plugin/CTFMenubarMenuController.m
@@ -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.
@@ -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 ];
}

0 comments on commit 2aa30c6

Please sign in to comment.
Something went wrong with that request. Please try again.