summaryrefslogtreecommitdiff
path: root/cocoa/gui.m
diff options
context:
space:
mode:
Diffstat (limited to 'cocoa/gui.m')
-rw-r--r--cocoa/gui.m12
1 files changed, 12 insertions, 0 deletions
diff --git a/cocoa/gui.m b/cocoa/gui.m
index 351b6e5fa..78b4147a6 100644
--- a/cocoa/gui.m
+++ b/cocoa/gui.m
@@ -52,6 +52,17 @@ NSString * const kAlwaysCloseMultipleTabs = @"AlwaysCloseMultipleTabs";
struct browser_window;
+static nserror cocoa_warn_user(const char *warning, const char *detail)
+{
+ NSRunAlertPanel( NSLocalizedString( @"Warning", @"Warning title" ),
+ NSLocalizedString( @"Warning %s%s%s", @"Warning message" ),
+ NSLocalizedString( @"OK", @"" ), nil, nil,
+ warning, detail != NULL ? ": " : "",
+ detail != NULL ? detail : "" );
+ return NSERROR_OK;
+}
+
+
static struct gui_window *
gui_window_create(struct browser_window *bw,
struct gui_window *existing,
@@ -299,6 +310,7 @@ struct gui_window_table *cocoa_window_table = &window_table;
static struct gui_misc_table browser_table = {
.schedule = cocoa_schedule,
+ .warning = cocoa_warn_user,
.launch_url = gui_launch_url,
.cert_verify = gui_cert_verify,