Add support for checkbox with dialog.showMessageBox

This adds the `checkboxLabel` and `checkboxChecked` options to display a
checkbox in the message box. Fixes #6048.
This commit is contained in:
Birunthan Mohanathas 2017-02-06 15:35:36 +00:00 committed by Kevin Sawicki
parent 9163b601a4
commit c8c11e68c6
10 changed files with 155 additions and 61 deletions

View file

@ -47,6 +47,8 @@ void ShowMessageBox(int type,
const std::string& title,
const std::string& message,
const std::string& detail,
const std::string& checkbox_label,
bool checkbox_checked,
const gfx::ImageSkia& icon,
atom::NativeWindow* window,
mate::Arguments* args) {
@ -56,8 +58,8 @@ void ShowMessageBox(int type,
peek,
&callback)) {
atom::ShowMessageBox(window, (atom::MessageBoxType)type, buttons,
default_id, cancel_id, options, title,
message, detail, icon, callback);
default_id, cancel_id, options, title, message, detail,
checkbox_label, checkbox_checked, icon, callback);
} else {
int chosen = atom::ShowMessageBox(window, (atom::MessageBoxType)type,
buttons, default_id, cancel_id,