diff options
author | Mustafa Quraish <mustafaq9@gmail.com> | 2022-01-04 21:35:55 -0500 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2022-01-05 12:08:20 +0100 |
commit | c03f271bbf76f4497f5290fb4ea2880cad232112 (patch) | |
tree | 3014d625736357a512b4740ef29832c0f2bcd78c /Userland/Applications/PixelPaint/MainWidget.h | |
parent | 915211252d8e8c9fad736dbd9a7693a9c560afbf (diff) | |
download | serenity-c03f271bbf76f4497f5290fb4ea2880cad232112.zip |
PixelPaint: Ask about unsaved changes for all tabs on close
Now, when trying to close the application, there is a separate prompt
for each open tab with unsaved changes. Each tab is closed after it is
handled appropriately (assuming the user didn't Cancel), this makes it
so that the message box is always asking about the currently active tab,
allowing the user to see that the image contains.
If at any point the user presses "Cancel", all remaining tabs are kept
open.
Diffstat (limited to 'Userland/Applications/PixelPaint/MainWidget.h')
-rw-r--r-- | Userland/Applications/PixelPaint/MainWidget.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Userland/Applications/PixelPaint/MainWidget.h b/Userland/Applications/PixelPaint/MainWidget.h index fc74b625b6..dc70b6df40 100644 --- a/Userland/Applications/PixelPaint/MainWidget.h +++ b/Userland/Applications/PixelPaint/MainWidget.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2021, Mustafa Quraish <mustafa@serenityos.org> + * Copyright (c) 2021-2022, Mustafa Quraish <mustafa@serenityos.org> * * SPDX-License-Identifier: BSD-2-Clause */ @@ -36,6 +36,8 @@ public: void open_image_fd(int fd, String const& path); void create_default_image(); + + bool request_close_editor(); bool request_close(); private: |