summaryrefslogtreecommitdiffstats
path: root/chrome/browser/cocoa/first_run_dialog.mm
diff options
context:
space:
mode:
authorthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-29 15:41:20 +0000
committerthomasvl@chromium.org <thomasvl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-29 15:41:20 +0000
commita3ff532e69db34c3abddb9dc962659e2142da48c (patch)
tree808660bfdfb4a7ae7f59e4cf009b89cd937fff6c /chrome/browser/cocoa/first_run_dialog.mm
parent27abbe288682085c8a7b4fa83f796fc200d87922 (diff)
downloadchromium_src-a3ff532e69db34c3abddb9dc962659e2142da48c.zip
chromium_src-a3ff532e69db34c3abddb9dc962659e2142da48c.tar.gz
chromium_src-a3ff532e69db34c3abddb9dc962659e2142da48c.tar.bz2
Mac First Run:
- Load the nib from the main bundle. - fetch the learn more url from resources instead of hardcoded in source - the the layout tweak the sizes of the two buttons based on the l10n strings - make the browser popup auto position based on the size of the checkbox's text. BUG=20531 TEST=the button always fit their text and position correctly, the browser menu positions next to the text, learn more for breakpad goes to the right language page. Review URL: http://codereview.chromium.org/248032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@27481 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/cocoa/first_run_dialog.mm')
-rw-r--r--chrome/browser/cocoa/first_run_dialog.mm13
1 files changed, 8 insertions, 5 deletions
diff --git a/chrome/browser/cocoa/first_run_dialog.mm b/chrome/browser/cocoa/first_run_dialog.mm
index e1daf6d..1a4a87b 100644
--- a/chrome/browser/cocoa/first_run_dialog.mm
+++ b/chrome/browser/cocoa/first_run_dialog.mm
@@ -4,9 +4,11 @@
#import "chrome/browser/cocoa/first_run_dialog.h"
+#include "app/l10n_util_mac.h"
#include "base/logging.h"
#include "base/mac_util.h"
#import "base/scoped_nsobject.h"
+#include "grit/locale_settings.h"
@implementation FirstRunDialogController
@@ -19,7 +21,10 @@
@synthesize browserImportListHidden = browser_import_list_hidden_;
- (id)init {
- self = [super initWithWindowNibName:@"FirstRunDialog"];
+ NSString* nibpath =
+ [mac_util::MainAppBundle() pathForResource:@"FirstRunDialog"
+ ofType:@"nib"];
+ self = [super initWithWindowNibPath:nibpath owner:self];
if (self != nil) {
// Bound to the dialog checkbox, default to true.
stats_enabled_ = YES;
@@ -67,10 +72,8 @@
}
- (IBAction)learnMore:(id)sender {
- // TODO(jeremy): Rather than always using English, set the language that
- // Chrome is running in.
- NSURL* learnMoreUrl = [NSURL URLWithString:@"http://www.google.com/support/"
- "chrome/bin/answer.py?answer=96817&hl=en"];
+ NSString* urlStr = l10n_util::GetNSString(IDS_LEARN_MORE_REPORTING_URL);
+ NSURL* learnMoreUrl = [NSURL URLWithString:urlStr];
[[NSWorkspace sharedWorkspace] openURL:learnMoreUrl];
}