mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 19:07:35 +00:00
LibGUI: Add optional unmodified timestamp to "unsaved changes" dialogs
This allows us to show "last saved N seconds ago" when asking the user what to do. :^)
This commit is contained in:
parent
c4cc796f86
commit
e5e109a556
2 changed files with 15 additions and 7 deletions
|
@ -1,11 +1,12 @@
|
|||
/*
|
||||
* Copyright (c) 2018-2020, Andreas Kling <kling@serenityos.org>
|
||||
* Copyright (c) 2018-2022, Andreas Kling <kling@serenityos.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Time.h>
|
||||
#include <LibGUI/Dialog.h>
|
||||
|
||||
namespace GUI {
|
||||
|
@ -32,7 +33,7 @@ public:
|
|||
|
||||
static int show(Window* parent_window, StringView text, StringView title, Type type = Type::None, InputType input_type = InputType::OK);
|
||||
static int show_error(Window* parent_window, StringView text);
|
||||
static int ask_about_unsaved_changes(Window* parent_window, StringView path);
|
||||
static int ask_about_unsaved_changes(Window* parent_window, StringView path, Optional<Time> last_unmodified_timestamp = {});
|
||||
|
||||
private:
|
||||
explicit MessageBox(Window* parent_window, StringView text, StringView title, Type type = Type::None, InputType input_type = InputType::OK);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue