summaryrefslogtreecommitdiff
path: root/uui/inc
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/inc
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/inc')
-rw-r--r--uui/inc/strings.hrc21
1 files changed, 17 insertions, 4 deletions
diff --git a/uui/inc/strings.hrc b/uui/inc/strings.hrc
index 364175298db7..096d7ef977a1 100644
--- a/uui/inc/strings.hrc
+++ b/uui/inc/strings.hrc
@@ -30,8 +30,9 @@
#define STR_PASSWORD_MISMATCH NC_("STR_PASSWORD_MISMATCH", "The confirmation password did not match the password. Set the password again by entering the same password in both boxes.")
#define STR_ALREADYOPEN_TITLE NC_("STR_ALREADYOPEN_TITLE", "Document in Use")
-#define STR_ALREADYOPEN_MSG NC_("STR_ALREADYOPEN_MSG", "Document file '$(ARG1)' is locked for editing by yourself on a different system since $(ARG2)\n\nOpen document read-only, or ignore own file locking and open the document for editing.")
+#define STR_ALREADYOPEN_MSG NC_("STR_ALREADYOPEN_MSG", "Document file '$(ARG1)' is locked for editing by yourself on a different system since $(ARG2)\n\nOpen document read-only, or ignore own file locking and open the document for editing.\nSelect Notify to open read-only and get notified when the document becomes editable.")
#define STR_ALREADYOPEN_READONLY_BTN NC_("STR_ALREADYOPEN_READONLY_BTN", "Open ~Read-Only")
+#define STR_ALREADYOPEN_READONLY_NOTIFY_BTN NC_("STR_ALREADYOPEN_READONLY_NOTIFY_BTN", "~Notify")
#define STR_ALREADYOPEN_OPEN_BTN NC_("STR_ALREADYOPEN_OPEN_BTN", "~Open")
#define STR_ALREADYOPEN_SAVE_MSG NC_("STR_ALREADYOPEN_SAVE_MSG", "Document file '$(ARG1)' is locked for editing by yourself on a different system since $(ARG2)\n\nClose document on other system and retry saving or ignore own file locking and save current document.")
#define STR_ALREADYOPEN_RETRY_SAVE_BTN NC_("STR_ALREADYOPEN_RETRY_SAVE_BTN", "~Retry Saving")
@@ -42,13 +43,15 @@
#define STR_WARNING_INCOMPLETE_ENCRYPTION_TITLE NC_("STR_WARNING_INCOMPLETE_ENCRYPTION_TITLE", "Non-Encrypted Streams")
#define STR_LOCKFAILED_TITLE NC_("STR_LOCKFAILED_TITLE", "Document Could Not Be Locked")
-#define STR_LOCKFAILED_MSG NC_("STR_LOCKFAILED_MSG", "The lock file could not be created for exclusive access by %PRODUCTNAME, due to missing permission to create a lock file on that file location or lack of free disk space.")
+#define STR_LOCKFAILED_MSG NC_("STR_LOCKFAILED_MSG", "The lock file could not be created for exclusive access by %PRODUCTNAME, due to missing permission to create a lock file on that file location or lack of free disk space.\n\nSelect Notify to open read-only and get notified when the document becomes editable.")
#define STR_LOCKFAILED_OPENREADONLY_BTN NC_("STR_LOCKFAILED_OPENREADONLY_BTN", "Open ~Read-Only")
+#define STR_LOCKFAILED_OPENREADONLY_NOTIFY_BTN NC_("STR_LOCKFAILED_OPENREADONLY_NOTIFY_BTN", "~Notify")
#define STR_OPENLOCKED_TITLE NC_("STR_OPENLOCKED_TITLE", "Document in Use")
-#define STR_OPENLOCKED_MSG NC_("STR_OPENLOCKED_MSG", "Document file '$(ARG1)' is locked for editing by:\n\n$(ARG2)\n\nOpen document read-only or open a copy of the document for editing.$(ARG3)")
+#define STR_OPENLOCKED_MSG NC_("STR_OPENLOCKED_MSG", "Document file '$(ARG1)' is locked for editing by:\n\n$(ARG2)\n\nOpen document read-only or open a copy of the document for editing.\nSelect Notify to open read-only and get notified when the document becomes editable.$(ARG3)")
#define STR_OPENLOCKED_ALLOWIGNORE_MSG NC_("STR_OPENLOCKED_ALLOWIGNORE_MSG", "\nYou may also ignore the file locking and open the document for editing.")
#define STR_OPENLOCKED_OPENREADONLY_BTN NC_("STR_OPENLOCKED_OPENREADONLY_BTN", "Open ~Read-Only")
+#define STR_OPENLOCKED_OPENREADONLY_NOTIFY_BTN NC_("STR_OPENLOCKED_OPENREADONLY_NOTIFY_BTN", "~Notify")
#define STR_OPENLOCKED_OPENCOPY_BTN NC_("STR_OPENLOCKED_OPENCOPY_BTN", "Open ~Copy")
#define STR_UNKNOWNUSER NC_("STR_UNKNOWNUSER", "Unknown User")
@@ -73,7 +76,17 @@
#define STR_ERROR_PASSWORDS_NOT_IDENTICAL NC_("STR_ERROR_PASSWORDS_NOT_IDENTICAL", "The password confirmation does not match.")
#define STR_LOCKCORRUPT_TITLE NC_("STR_LOCKCORRUPT_TITLE", "Lock file is corrupted")
-#define STR_LOCKCORRUPT_MSG NC_("STR_LOCKCORRUPT_MSG", "The lock file is corrupted and probably empty. Opening the document read-only and closing it again removes the corrupted lock file.")
+#define STR_LOCKCORRUPT_MSG NC_("STR_LOCKCORRUPT_MSG", "The lock file is corrupted and probably empty. Opening the document read-only and closing it again removes the corrupted lock file.\n\nSelect Notify to open read-only and get notified when the document becomes editable.")
#define STR_LOCKCORRUPT_OPENREADONLY_BTN NC_("STR_LOCKCORRUPT_OPENREADONLY_BTN", "Open ~Read-Only")
+#define STR_LOCKCORRUPT_OPENREADONLY_NOTIFY_BTN NC_("STR_LOCKCORRUPT_OPENREADONLY_NOTIFY_BTN", "~Notify")
+
+#define STR_RELOADEDITABLE_TITLE NC_("STR_RELOADEDITABLE_TITLE", "Document is now editable")
+#define STR_RELOADEDITABLE_MSG NC_("STR_RELOADEDITABLE_MSG", "Document file '$(ARG1)' is now editable \n\nReload this document for editing?")
+#define STR_RELOADEDITABLE_BTN NC_("STR_RELOADEDITABLE_BTN", "~Reload")
+
+#define STR_READONLYOPEN_TITLE NC_("STR_READONLYOPEN_TITLE", "Document is read-only")
+#define STR_READONLYOPEN_MSG NC_("STR_READONLYOPEN_MSG", "Document file '$(ARG1)' is read-only.\n\nOpen read-only or select Notify to open read-only and get notified when the document becomes editable.")
+#define STR_READONLYOPEN_BTN NC_("STR_READONLYOPEN_BTN", "Open ~Read-Only")
+#define STR_READONLYOPEN_NOTIFY_BTN NC_("STR_READONLYOPEN_NOTIFY_BTN", "~Notify")
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */