diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2018-02-21 13:10:00 +0530 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2018-02-21 17:51:38 +0100 |
commit | fdfc29078f64223148354551c1cb3b2169454350 (patch) | |
tree | 25838cdd4d3ee5f4f4ab8e442925f781b3762286 /include | |
parent | ba114965731dca5e2aba4484124c016ee390572b (diff) |
lokdialog: Allow Execute()ing first, silently cancels others
We want to be able to detect which dialogs are important and need to be
converted to async while not completely disallowing them. Allow only
first instance of such dialogs being Execute()d and warn when another
such instance tries to Execute().
Change-Id: I6742784fa95d9e3f9ff87ece294126d390ae9e9e
Reviewed-on: https://gerrit.libreoffice.org/50095
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/vcl/dialog.hxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/vcl/dialog.hxx b/include/vcl/dialog.hxx index f028b7cb57c9..b1bdfcfb1cea 100644 --- a/include/vcl/dialog.hxx +++ b/include/vcl/dialog.hxx @@ -42,6 +42,7 @@ private: std::unique_ptr<DialogImpl> mpDialogImpl; long mnMousePositioned; bool mbInExecute; + bool mbInSyncExecute; bool mbInClose; bool mbModalMode; bool mbPaintComplete; @@ -116,6 +117,8 @@ public: virtual short Execute(); bool IsInExecute() const { return mbInExecute; } + // Return true when dialog is synchronously executed (calling ::Execute()) + bool IsInSyncExecute() const { return mbInSyncExecute; }; virtual FactoryFunction GetUITestFactory() const override; |