diff options
author | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-03 19:13:17 +0000 |
---|---|---|
committer | avi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-03 19:13:17 +0000 |
commit | 2df7c5b5a9c31cdcf2623de4c996170d2af28b98 (patch) | |
tree | 6b7394dcad468eb6008d07ed6069de69af682d29 /chrome/browser/cocoa/autoseparating_menu.m | |
parent | e65c7713f650bd2bb3f5a8c94e96f33ade2c3812 (diff) | |
download | chromium_src-2df7c5b5a9c31cdcf2623de4c996170d2af28b98.zip chromium_src-2df7c5b5a9c31cdcf2623de4c996170d2af28b98.tar.gz chromium_src-2df7c5b5a9c31cdcf2623de4c996170d2af28b98.tar.bz2 |
Get rid of non-functional elements from the themes prefs; add switcher.
BUG=http://crbug.com/18094
TEST=try the theme picker and enjoy!
Review URL: http://codereview.chromium.org/159727
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22296 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/autoseparating_menu.m')
-rw-r--r-- | chrome/browser/cocoa/autoseparating_menu.m | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/autoseparating_menu.m b/chrome/browser/cocoa/autoseparating_menu.m new file mode 100644 index 0000000..e0f36a7 --- /dev/null +++ b/chrome/browser/cocoa/autoseparating_menu.m @@ -0,0 +1,26 @@ +// Copyright (c) 2009 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#import "chrome/browser/cocoa/autoseparating_menu.h" + +@implementation AutoseparatingMenu + +- (NSMenuItem *)insertItemWithTitle:(NSString *)aString + action:(SEL)aSelector + keyEquivalent:(NSString *)keyEquiv + atIndex:(NSInteger)index { + if ([aString isEqualToString:@"-"]) { + NSMenuItem* separator = [NSMenuItem separatorItem]; + [self insertItem:separator + atIndex:index]; + return separator; + } else { + return [super insertItemWithTitle:aString + action:aSelector + keyEquivalent:keyEquiv + atIndex:index]; + } +} + +@end |