summaryrefslogtreecommitdiff
path: root/uui/source/lockfailed.cxx
diff options
context:
space:
mode:
authorMatt K <mattkse@gmail.com>2021-02-26 10:24:38 -0600
committerMike Kaganski <mike.kaganski@collabora.com>2021-05-27 12:31:38 +0200
commit95eb088802562b75f8b299908160145c7e88d763 (patch)
treedbabada569f125ca900906463a697b1e606dbae5 /uui/source/lockfailed.cxx
parentee1407608c0d228e4705215e9700af3200511cc8 (diff)
tdf#47065 Add new file open UI options and implement a new thread
Add new UI options when opening a locked or non-writeable document to allow the user to be notified when such a document becomes editable . If the user selects "Notify", then that document is added to a list of open documents to be checked by a thread every 60 seconds for read/write access and whether lock file is available/obtainable. If access is allowed for a document, then show UI dialog to the user asking to Reload that document. If Reload is selected by the user then that document is reloaded with read/write access. The checking thread is spawned only once no matter how many "Notify" documents there are. The thread is spawned if not already running when a new "Notify" document is opened, and it terminates when all "Notify" documents have been closed or the application terminates. Also update badstatics clang plugin to ignore new global variables introduced. Change-Id: I7555ce6f5df79c2c87216e0129ef3b2883c7d921 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111654 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'uui/source/lockfailed.cxx')
-rw-r--r--uui/source/lockfailed.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/uui/source/lockfailed.cxx b/uui/source/lockfailed.cxx
index 8254b19e509b..340cc9638806 100644
--- a/uui/source/lockfailed.cxx
+++ b/uui/source/lockfailed.cxx
@@ -29,6 +29,7 @@ LockFailedQueryBox::LockFailedQueryBox(weld::Window* pParent, const std::locale&
{
m_xQueryBox->set_title(Translate::get(STR_LOCKFAILED_TITLE, rLocale));
m_xQueryBox->add_button(Translate::get(STR_LOCKFAILED_OPENREADONLY_BTN, rLocale), RET_OK);
+ m_xQueryBox->add_button(Translate::get(STR_LOCKFAILED_OPENREADONLY_NOTIFY_BTN, rLocale), RET_RETRY);
m_xQueryBox->add_button(GetStandardText(StandardButtonType::Cancel), RET_CANCEL);
m_xQueryBox->set_default_response(RET_OK);
}