diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-07-16 21:32:10 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-07-16 21:41:13 +0200 |
commit | a17fbd98e735e66a559f71583987b507aea483ba (patch) | |
tree | b716bfcad32045c640eaa5f9e179983a2ed233f0 /DevTools/VisualBuilder/VBForm.cpp | |
parent | 62335c5f0c9b22ee99dee24d62f0ab8391f11098 (diff) | |
download | serenity-a17fbd98e735e66a559f71583987b507aea483ba.zip |
LibGUI: Add input types to GMessageBox.
Currently the two available input types are:
- GMessageBox::InputType::OK (default)
- GMessageBox::InputType::OKCancel
Based on your choice, GMessageBox::exec() will return ExecOK or ExecCancel.
Diffstat (limited to 'DevTools/VisualBuilder/VBForm.cpp')
-rw-r--r-- | DevTools/VisualBuilder/VBForm.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/DevTools/VisualBuilder/VBForm.cpp b/DevTools/VisualBuilder/VBForm.cpp index bb095d6ca0..6cec82cbbc 100644 --- a/DevTools/VisualBuilder/VBForm.cpp +++ b/DevTools/VisualBuilder/VBForm.cpp @@ -294,7 +294,7 @@ void VBForm::load_from_file(const String& path) { CFile file(path); if (!file.open(CIODevice::ReadOnly)) { - GMessageBox::show(String::format("Could not open '%s' for reading", path.characters()), "Error", GMessageBox::Type::Error, window()); + GMessageBox::show(String::format("Could not open '%s' for reading", path.characters()), "Error", GMessageBox::Type::Error, GMessageBox::InputType::OK, window()); return; } @@ -302,7 +302,7 @@ void VBForm::load_from_file(const String& path) auto form_json = JsonValue::from_string(file_contents); if (!form_json.is_object()) { - GMessageBox::show(String::format("Could not parse '%s'", path.characters()), "Error", GMessageBox::Type::Error, window()); + GMessageBox::show(String::format("Could not parse '%s'", path.characters()), "Error", GMessageBox::Type::Error, GMessageBox::InputType::OK, window()); return; } @@ -329,7 +329,7 @@ void VBForm::write_to_file(const String& path) { CFile file(path); if (!file.open(CIODevice::WriteOnly)) { - GMessageBox::show(String::format("Could not open '%s' for writing", path.characters()), "Error", GMessageBox::Type::Error, window()); + GMessageBox::show(String::format("Could not open '%s' for writing", path.characters()), "Error", GMessageBox::Type::Error, GMessageBox::InputType::OK, window()); return; } |