Hi, Automatic updates are not our favorites, are they? :) We like to have control over what happens. BUT... Master Documents are a different matter... cause they are document organizers... their mere existence is about linking subdocuments into them... Being asked for the 20th time "do you want to update the links?" is annoying... then having to look for the "update links" menu item is frustrating... It'd be great if we could set this option: yes, update the links or ask me... This option we already have... but it refers to any document... not master documents It'd be great to be able to set this for master documents, specifically... . . . possible further steps: It could be automatic for master documents... BUT perhaps only on opening... when it is already open, there could be notifications in Navigator, perhaps.. about which document has been updated since the last update.. BUT being able to make it automatic for master documents when opening it, and only then, would be a GREAT thing already!! - - - thank you for developing Writer and Libreoffice - - -
The update usually comes on cost of performance, and you don't want to disable the question in all use cases. But how about adding the option "[ ] Don't ask again during the session" to the dialog. Meaning the next time you start Writer it is necessary again to click yes or no. Olivier, you are a heavy master-document user (not heavy, sorry, but regular user *g*). Have you experienced the same issue as Peter?
I like "[ ] Don't ask again during the session". I don't know how each user work with MDs. If you open and close MDs 20 times a day, it will be annoying (anything will be annoying 20x a day) I my case I open once and refresh links once I need. Either from the Navigator or from Tools - Update. The latest does not ask for confirmation. I think the prompt is useful. There are times where you don't want to rebuild your document and want to make a small fix. May be you want to see the previous version before updating the links. YMMV.
LinkManager::UpdateAllLinks() shows the question with STR_QUERY_UPDATE_LINKS. The function is used in various scenarios across all modules and we must not disable it globally. But there is a bAskUpdate option! And since the function is used only a few times in sw/, I suggest to find the right code pointer per debugger. Not sure if the weld::MessageDialog can have a checkbox, might require some UI based dialog. The checkbox would be hidden unless it's a master document, and the dialog in this condition if the checkbox was checked before (or rather unchecked with "[x] Show this message").
Created attachment 199966 [details] Proposed MessageBox with a check box I have been investigating on this. Adding a checkbox to MessageBox in general seems to be possible, but this requires modifying MessageBox class and relative implementations in all UI frameworks (GTK, Qt, etc.). I'm working on this modification as a prerequisite patch, and if that is merged, I can then further work on this.
(In reply to Anthony Qiu from comment #4) > Created attachment 199966 [details] > Proposed MessageBox with a check box > > I have been investigating on this. Adding a checkbox to MessageBox in typo: MessageBox -> MessageDialog (In reply to Heiko Tietze from comment #3) > LinkManager::UpdateAllLinks() shows the question with > STR_QUERY_UPDATE_LINKS. The function is used in various scenarios across all > modules and we must not disable it globally. But there is a bAskUpdate > option! And since the function is used only a few times in sw/, I suggest to > find the right code pointer per debugger. I observed that among all instances calling LinkManager::UpdateAllLinks(): - When user manually click "Update Links" in Navigator (F5), it triggers SwGlobalTree::ExecuteContextMenuAction(). In this case, the parameter bAskUpdate is set to true, causing the dialog to always appear. - For operations that invoke DocumentLinksAdministrationManager::UpdateLinks(), it appears possible to suppress the dialog by adjusting `Tools > Options > LibreOffice Writer > General > Update Links when Loading`. Changing this from "On request" to another option may be able to prevent the dialog from appearing, it looks like SwLoadOptPage::FillItemSet() syncs this option with LinkUpdateMode in DocumentSettingManager. However, this interpretation is based solely on reading the codebase; I'm new to this community and haven't yet found how to reproduce this behavior and may require some help. Given these observations, besides adding a checkbox, it might also be beneficial to include instructions in the dialog, guiding users to adjust relevant settings in Options to reduce the frequency of this dialog appearing.
(In reply to Anthony Qiu from comment #4) > Created attachment 199966 [details] > Proposed MessageBox with a check box Marking a checkbox in order to not run an action is disadviced. Rather turn it into something like "[x] Show this dialog" on by default and if the user unchecks the box it wont be shown anymore. (In reply to Anthony Qiu from comment #5) > ...it triggers SwGlobalTree::ExecuteContextMenuAction() Please share a patch and let's talk about the technical details on Gerrit.