summaryrefslogtreecommitdiff
path: root/DevTools/VisualBuilder/VBForm.cpp
diff options
context:
space:
mode:
authorAndreas Kling <awesomekling@gmail.com>2019-07-16 21:32:10 +0200
committerAndreas Kling <awesomekling@gmail.com>2019-07-16 21:41:13 +0200
commita17fbd98e735e66a559f71583987b507aea483ba (patch)
treeb716bfcad32045c640eaa5f9e179983a2ed233f0 /DevTools/VisualBuilder/VBForm.cpp
parent62335c5f0c9b22ee99dee24d62f0ab8391f11098 (diff)
downloadserenity-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.cpp6
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;
}