summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/preferences_window_controller.mm
diff options
context:
space:
mode:
authoravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-31 15:06:25 +0000
committeravi@chromium.org <avi@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-07-31 15:06:25 +0000
commit5311ef449d5f7e3492d36226d926f3e8b9b6feca (patch)
treeaff358a03d7af7e1ca875fcd8d2e7fbf688bf5ae /chrome/browser/cocoa/preferences_window_controller.mm
parentc98b28ebd90a0352c453627063fa5f0c6a8c5584 (diff)
downloadchromium_src-5311ef449d5f7e3492d36226d926f3e8b9b6feca.zip
chromium_src-5311ef449d5f7e3492d36226d926f3e8b9b6feca.tar.gz
chromium_src-5311ef449d5f7e3492d36226d926f3e8b9b6feca.tar.bz2
Add "Get themes" button to the prefs.
BUG=none TEST=you get a button "get themes" that takes you to the theme gallery. Review URL: http://codereview.chromium.org/160455 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@22153 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/preferences_window_controller.mm')
-rw-r--r--chrome/browser/cocoa/preferences_window_controller.mm18
1 files changed, 18 insertions, 0 deletions
diff --git a/chrome/browser/cocoa/preferences_window_controller.mm b/chrome/browser/cocoa/preferences_window_controller.mm
index fc1a05c..5f5d68e 100644
--- a/chrome/browser/cocoa/preferences_window_controller.mm
+++ b/chrome/browser/cocoa/preferences_window_controller.mm
@@ -32,6 +32,7 @@
#include "chrome/installer/util/google_update_settings.h"
#include "grit/chromium_strings.h"
#include "grit/generated_resources.h"
+#include "grit/locale_settings.h"
#include "net/base/cookie_policy.h"
NSString* const kUserDoneEditingPrefsNotification =
@@ -638,6 +639,23 @@ const int kDisabledIndex = 1;
profile_->ClearTheme();
}
+- (IBAction)themesGallery:(id)sender {
+ [self recordUserAction:L"Options_ThemesGallery"];
+ Browser* browser =
+ BrowserList::FindBrowserWithType(profile_, Browser::TYPE_NORMAL);
+
+ if (!browser || !browser->GetSelectedTabContents()) {
+ browser = Browser::Create(profile_);
+ browser->OpenURL(
+ GURL(l10n_util::GetStringUTF8(IDS_THEMES_GALLERY_URL)),
+ GURL(), NEW_WINDOW, PageTransition::LINK);
+ } else {
+ browser->AddTabWithURL(
+ GURL(l10n_util::GetStringUTF8(IDS_THEMES_GALLERY_URL)),
+ GURL(), PageTransition::LINK, true, -1, false, NULL);
+ }
+}
+
- (void)setPasswordManagerEnabledIndex:(NSInteger)value {
if (value == kEnabledIndex)
[self recordUserAction:L"Options_PasswordManager_Enable"];