diff options
Diffstat (limited to 'Applications/QuickShow')
-rw-r--r-- | Applications/QuickShow/QSWidget.cpp | 6 | ||||
-rw-r--r-- | Applications/QuickShow/main.cpp | 13 |
2 files changed, 9 insertions, 10 deletions
diff --git a/Applications/QuickShow/QSWidget.cpp b/Applications/QuickShow/QSWidget.cpp index d440e62748..8a92a1b0d8 100644 --- a/Applications/QuickShow/QSWidget.cpp +++ b/Applications/QuickShow/QSWidget.cpp @@ -98,14 +98,14 @@ void QSWidget::navigate(Directions direction) size_t index = current_index.value(); if (direction == Directions::Back) { if (index == 0) { - GUI::MessageBox::show(String::format("This is the first file.", index), "Cannot open image", GUI::MessageBox::Type::Error, GUI::MessageBox::InputType::OK, window()); + GUI::MessageBox::show(window(), String::format("This is the first file.", index), "Cannot open image", GUI::MessageBox::Type::Error); return; } index--; } else if (direction == Directions::Forward) { if (index == m_files_in_same_dir.size() - 1) { - GUI::MessageBox::show(String::format("This is the last file.", index), "Cannot open image", GUI::MessageBox::Type::Error, GUI::MessageBox::InputType::OK, window()); + GUI::MessageBox::show(window(), String::format("This is the last file.", index), "Cannot open image", GUI::MessageBox::Type::Error); return; } @@ -249,7 +249,7 @@ void QSWidget::load_from_file(const String& path) { auto bitmap = Gfx::Bitmap::load_from_file(path); if (!bitmap) { - GUI::MessageBox::show(String::format("Failed to open %s", path.characters()), "Cannot open image", GUI::MessageBox::Type::Error, GUI::MessageBox::InputType::OK, window()); + GUI::MessageBox::show(window(), String::format("Failed to open %s", path.characters()), "Cannot open image", GUI::MessageBox::Type::Error); return; } diff --git a/Applications/QuickShow/main.cpp b/Applications/QuickShow/main.cpp index 99f28540ea..2d00285421 100644 --- a/Applications/QuickShow/main.cpp +++ b/Applications/QuickShow/main.cpp @@ -138,11 +138,11 @@ int main(int argc, char** argv) if (path.is_empty()) return; - auto msgbox_result = GUI::MessageBox::show(String::format("Really delete %s?", path.characters()), + auto msgbox_result = GUI::MessageBox::show(window, + String::format("Really delete %s?", path.characters()), "Confirm deletion", GUI::MessageBox::Type::Warning, - GUI::MessageBox::InputType::OKCancel, - window); + GUI::MessageBox::InputType::OKCancel); if (msgbox_result == GUI::MessageBox::ExecCancel) return; @@ -152,11 +152,10 @@ int main(int argc, char** argv) if (unlink_result < 0) { int saved_errno = errno; - GUI::MessageBox::show(String::format("unlink(%s) failed: %s", path.characters(), strerror(saved_errno)), + GUI::MessageBox::show(window, + String::format("unlink(%s) failed: %s", path.characters(), strerror(saved_errno)), "Delete failed", - GUI::MessageBox::Type::Error, - GUI::MessageBox::InputType::OK, - window); + GUI::MessageBox::Type::Error); return; } |