Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1718)

Unified Diff: chrome/browser/platform_util_mac.mm

Issue 1745024: Make a new yes/no messagebox wrapper function, use it in the bookmark alert.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/platform_util_mac.mm
===================================================================
--- chrome/browser/platform_util_mac.mm (revision 50758)
+++ chrome/browser/platform_util_mac.mm (working copy)
@@ -63,14 +63,31 @@
void SimpleErrorBox(gfx::NativeWindow parent,
const string16& title,
const string16& message) {
+ // Ignore the title; it's the window title on other platforms and ignorable.
NSAlert* alert = [[[NSAlert alloc] init] autorelease];
[alert addButtonWithTitle:l10n_util::GetNSString(IDS_OK)];
- [alert setMessageText:base::SysUTF16ToNSString(title)];
- [alert setInformativeText:base::SysUTF16ToNSString(message)];
+ [alert setMessageText:base::SysUTF16ToNSString(message)];
[alert setAlertStyle:NSWarningAlertStyle];
[alert runModal];
}
+bool SimpleYesNoBox(gfx::NativeWindow parent,
+ const string16& title,
+ const string16& message) {
+ // Ignore the title; it's the window title on other platforms and ignorable.
+ NSAlert* alert = [[[NSAlert alloc] init] autorelease];
+ [alert setMessageText:base::SysUTF16ToNSString(message)];
+ [alert setAlertStyle:NSWarningAlertStyle];
+
+ [alert addButtonWithTitle:
+ l10n_util::GetNSString(IDS_CONFIRM_MESSAGEBOX_YES_BUTTON_LABEL)];
+ [alert addButtonWithTitle:
+ l10n_util::GetNSString(IDS_CONFIRM_MESSAGEBOX_NO_BUTTON_LABEL)];
+
+ NSInteger result = [alert runModal];
+ return result == NSAlertFirstButtonReturn;
+}
+
string16 GetVersionStringModifier() {
#if defined(GOOGLE_CHROME_BUILD)
// Use the main application bundle and not the framework bundle. Keystone
Property changes on: chrome/browser/platform_util_mac.mm
___________________________________________________________________
Name: svn:mergeinfo
+

Powered by Google App Engine
This is Rietveld 408576698