Bug 279647 - Message box is shown for each single file after Reload All
Summary: Message box is shown for each single file after Reload All
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-08 11:05 UTC by Marcel Wiesweg
Modified: 2012-10-24 17:03 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.10.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel Wiesweg 2011-08-08 11:05:13 UTC
Version:           unspecified (using KDE 4.7.0) 
OS:                Linux

When a file was changed on disk, kate now shows again (did not in 4.6) a message box asking to reload when the file is accessed. When many files changed, File / Reload All comes handy to skip this tedious process.

Now in 4.7, after Reload All, a message box is shown for each single changed file (file changed on disk, Reload, Ignore, Cancel?), which contradicts the idea of Reload All. (and with 500 open files, only killing kate helps)

Reproducible: Always

Steps to Reproduce:
Changes many files on disk
File -> Reload All

Actual Results:  
One message box for each file

Expected Results:  
No message box at all

OS: Linux (x86_64) release 3.0.0-1-desktop
Compiler: gcc
Comment 1 Dominik Haumann 2011-08-08 12:37:08 UTC
Can you please go to Settings > Configure Kate > General settings page. Is
  [x] Warn about files modified by foreign processes
activated?

If not, can you activate it and retest? Then you should get one single dialog.
Please report back here as soon as possible. Thanks!
Comment 2 Marcel Wiesweg 2011-08-08 15:46:49 UTC
Yes, when I activate it I get one single dialog at the time when the files are changed. But I may not want this dialog either.

Desired behavior: When activating File -> Reload All, I have explicitly chosen to Reload, that means no dialog is necessary for files changed on disk because I already gave the answer. Of course, a dialog is needed for unsaved changes in the editor.

Second problem I just discovered: When files are deleted, there is one message box per deleted file with Reload All as well, even with the above mentioned option enabled. There should be one aggregated error box just as at application startup.
Comment 3 Dominik Haumann 2011-08-09 08:10:34 UTC
Please report only one issue per report. So the second problem you describe is unrelated here, please don't mix issues.
Comment 4 Dominik Haumann 2011-08-11 09:05:45 UTC
Ok then, but if you are not aware that the file changed and simply invoke the action reload all, you might lose data. So I propose to let it stay this way.

Christoph and other Kate developers?
Comment 5 Marcel Wiesweg 2011-08-13 12:05:40 UTC
I see two aspects to consider:
1) If 500 files changed, you will have to answer 500 message boxes, which would need about 20 minutes. So if any dialog, it should be aggregated. This is the "BUG" part here
2) What indication is there to activate Reload All? Either, you want to throw away changes in the editor, or you want to reload files from disk. In the first case, without the slightest doubt, there must be a strong confirmation dialog. In the second case, I argue there need not be a dialog, because I just selected Reload All; but I could accept a concept where I have to confirm. But, as said in point 1, not 500 times. This is the "WISH" part which could by your decision be closed as WONTFIX.
Comment 6 Dominik Haumann 2011-08-13 19:01:50 UTC
Ok, getting 500 messages boxes is certainly never what you want. Maybe we should make the dialog for all files mandatory, not an option? What do you think?
Comment 7 Paul Eggleton 2012-02-28 15:33:24 UTC
Re comment #6, seems reasonable to me, FWIW. I see this a lot when switching between git branches since I tend to keep quite a lot of files open in my Kate session.
Comment 8 Paul Eggleton 2012-09-08 19:40:27 UTC
I have sent a patch for this: https://git.reviewboard.kde.org/r/106383/
Comment 9 Dominik Haumann 2012-10-24 17:02:48 UTC
Git commit b9c87b449c8965ec0ea8d74d065394bc6a88146f by Dominik Haumann.
Committed on 24/10/2012 at 19:03.
Pushed by dhaumann into branch 'master'.

fix reload all when docs are modified

Thanks to Paul Eggleton for the initial patch.

REVIEW: 106383

M  +8    -2    kate/app/katedocmanager.cpp

http://commits.kde.org/kate/b9c87b449c8965ec0ea8d74d065394bc6a88146f