Add |options| for ShowMessageBox
This commit is contained in:
parent
72eb87a631
commit
da724d65d7
6 changed files with 18 additions and 3 deletions
|
@ -42,6 +42,7 @@ namespace {
|
||||||
void ShowMessageBox(int type,
|
void ShowMessageBox(int type,
|
||||||
const std::vector<std::string>& buttons,
|
const std::vector<std::string>& buttons,
|
||||||
int cancel_id,
|
int cancel_id,
|
||||||
|
int options,
|
||||||
const std::vector<std::string>& texts,
|
const std::vector<std::string>& texts,
|
||||||
const gfx::ImageSkia& icon,
|
const gfx::ImageSkia& icon,
|
||||||
atom::NativeWindow* window,
|
atom::NativeWindow* window,
|
||||||
|
@ -59,11 +60,11 @@ void ShowMessageBox(int type,
|
||||||
peek,
|
peek,
|
||||||
&callback)) {
|
&callback)) {
|
||||||
atom::ShowMessageBox(window, (atom::MessageBoxType)type, buttons, cancel_id,
|
atom::ShowMessageBox(window, (atom::MessageBoxType)type, buttons, cancel_id,
|
||||||
title, message, detail, icon, callback);
|
options, title, message, detail, icon, callback);
|
||||||
} else {
|
} else {
|
||||||
int chosen = atom::ShowMessageBox(window, (atom::MessageBoxType)type,
|
int chosen = atom::ShowMessageBox(window, (atom::MessageBoxType)type,
|
||||||
buttons, cancel_id, title, message,
|
buttons, cancel_id, options, title,
|
||||||
detail, icon);
|
message, detail, icon);
|
||||||
args->Return(chosen);
|
args->Return(chosen);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -104,6 +104,7 @@ module.exports =
|
||||||
binding.showMessageBox messageBoxType,
|
binding.showMessageBox messageBoxType,
|
||||||
options.buttons,
|
options.buttons,
|
||||||
options.cancelId,
|
options.cancelId,
|
||||||
|
0,
|
||||||
[options.title, options.message, options.detail],
|
[options.title, options.message, options.detail],
|
||||||
options.icon,
|
options.icon,
|
||||||
window,
|
window,
|
||||||
|
|
|
@ -27,12 +27,18 @@ enum MessageBoxType {
|
||||||
MESSAGE_BOX_TYPE_QUESTION,
|
MESSAGE_BOX_TYPE_QUESTION,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum MessageBoxOptions {
|
||||||
|
MESSAGE_BOX_NONE = 0,
|
||||||
|
MESSAGE_BOX_NO_LINKS = 1 << 0,
|
||||||
|
};
|
||||||
|
|
||||||
typedef base::Callback<void(int code)> MessageBoxCallback;
|
typedef base::Callback<void(int code)> MessageBoxCallback;
|
||||||
|
|
||||||
int ShowMessageBox(NativeWindow* parent_window,
|
int ShowMessageBox(NativeWindow* parent_window,
|
||||||
MessageBoxType type,
|
MessageBoxType type,
|
||||||
const std::vector<std::string>& buttons,
|
const std::vector<std::string>& buttons,
|
||||||
int cancel_id,
|
int cancel_id,
|
||||||
|
int options,
|
||||||
const std::string& title,
|
const std::string& title,
|
||||||
const std::string& message,
|
const std::string& message,
|
||||||
const std::string& detail,
|
const std::string& detail,
|
||||||
|
@ -42,6 +48,7 @@ void ShowMessageBox(NativeWindow* parent_window,
|
||||||
MessageBoxType type,
|
MessageBoxType type,
|
||||||
const std::vector<std::string>& buttons,
|
const std::vector<std::string>& buttons,
|
||||||
int cancel_id,
|
int cancel_id,
|
||||||
|
int options,
|
||||||
const std::string& title,
|
const std::string& title,
|
||||||
const std::string& message,
|
const std::string& message,
|
||||||
const std::string& detail,
|
const std::string& detail,
|
||||||
|
|
|
@ -162,6 +162,7 @@ int ShowMessageBox(NativeWindow* parent,
|
||||||
MessageBoxType type,
|
MessageBoxType type,
|
||||||
const std::vector<std::string>& buttons,
|
const std::vector<std::string>& buttons,
|
||||||
int cancel_id,
|
int cancel_id,
|
||||||
|
int options,
|
||||||
const std::string& title,
|
const std::string& title,
|
||||||
const std::string& message,
|
const std::string& message,
|
||||||
const std::string& detail,
|
const std::string& detail,
|
||||||
|
@ -174,6 +175,7 @@ void ShowMessageBox(NativeWindow* parent,
|
||||||
MessageBoxType type,
|
MessageBoxType type,
|
||||||
const std::vector<std::string>& buttons,
|
const std::vector<std::string>& buttons,
|
||||||
int cancel_id,
|
int cancel_id,
|
||||||
|
int options,
|
||||||
const std::string& title,
|
const std::string& title,
|
||||||
const std::string& message,
|
const std::string& message,
|
||||||
const std::string& detail,
|
const std::string& detail,
|
||||||
|
|
|
@ -95,6 +95,7 @@ int ShowMessageBox(NativeWindow* parent_window,
|
||||||
MessageBoxType type,
|
MessageBoxType type,
|
||||||
const std::vector<std::string>& buttons,
|
const std::vector<std::string>& buttons,
|
||||||
int cancel_id,
|
int cancel_id,
|
||||||
|
int options,
|
||||||
const std::string& title,
|
const std::string& title,
|
||||||
const std::string& message,
|
const std::string& message,
|
||||||
const std::string& detail,
|
const std::string& detail,
|
||||||
|
@ -127,6 +128,7 @@ void ShowMessageBox(NativeWindow* parent_window,
|
||||||
MessageBoxType type,
|
MessageBoxType type,
|
||||||
const std::vector<std::string>& buttons,
|
const std::vector<std::string>& buttons,
|
||||||
int cancel_id,
|
int cancel_id,
|
||||||
|
int options,
|
||||||
const std::string& title,
|
const std::string& title,
|
||||||
const std::string& message,
|
const std::string& message,
|
||||||
const std::string& detail,
|
const std::string& detail,
|
||||||
|
|
|
@ -163,6 +163,7 @@ int ShowMessageBox(NativeWindow* parent,
|
||||||
MessageBoxType type,
|
MessageBoxType type,
|
||||||
const std::vector<std::string>& buttons,
|
const std::vector<std::string>& buttons,
|
||||||
int cancel_id,
|
int cancel_id,
|
||||||
|
int options,
|
||||||
const std::string& title,
|
const std::string& title,
|
||||||
const std::string& message,
|
const std::string& message,
|
||||||
const std::string& detail,
|
const std::string& detail,
|
||||||
|
@ -190,6 +191,7 @@ void ShowMessageBox(NativeWindow* parent,
|
||||||
MessageBoxType type,
|
MessageBoxType type,
|
||||||
const std::vector<std::string>& buttons,
|
const std::vector<std::string>& buttons,
|
||||||
int cancel_id,
|
int cancel_id,
|
||||||
|
int options,
|
||||||
const std::string& title,
|
const std::string& title,
|
||||||
const std::string& message,
|
const std::string& message,
|
||||||
const std::string& detail,
|
const std::string& detail,
|
||||||
|
|
Loading…
Reference in a new issue