Bug 412972

Summary: "Overwrite", "Reload" and "Ignore changes" buttons of "Documents modified on disk" dialog should be disabled until at least one document is selected in it
Product: [Applications] kate Reporter: Patrick Silva <bugseforuns>
Component: applicationAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: justin.zobel
Priority: NOR    
Version: 19.12.1   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: screenshot showing "Documents modified on disk" with all buttons enabled even if no document is selected

Description Patrick Silva 2019-10-15 14:32:34 UTC
SUMMARY


1. open kate
2. save the document as test.txt
3. type anything but do NOT save the changes
4. open another text editor (I used Gedit)
5. type anything and save the document as test.txt to the same location (Confirm when asked if you want to replace the file previously saved with Kate)
6. back to Kate window (now we see a message on top warning that a file was created by another program) and try to close it (a dialog shows up asking what you want to do)
7. click on "Overwrite", "Reload" and "Ignore changes" buttons

OBSERVED RESULT
nothing happens

EXPECTED RESULT
"Overwrite", "Reload" and "Ignore changes" buttons work

Operating System: Arch Linux 
KDE Plasma Version: 5.17.0
KDE Frameworks Version: 5.63.0
Qt Version: 5.14.0 beta1
Comment 1 Patrick Silva 2020-01-29 13:53:40 UTC
Created attachment 125516 [details]
screenshot showing "Documents modified on disk" with all buttons enabled even if no document is selected

Humm, nothing happens if the buttons are clicked without I select the file before.
The buttons should be disabled when no file is selected in the files list.

Operating System: Arch Linux 
KDE Plasma Version: 5.17.90
KDE Frameworks Version: 5.66.0
Qt Version: 5.14.1
Comment 2 Justin Zobel 2020-10-30 03:44:29 UTC
Buttons indeed should be disabled (greyed out) until a file is selected.

Confirmed on git master.
Comment 3 Bug Janitor Service 2021-02-13 07:46:47 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/251
Comment 4 Jan Paul Batrina 2021-02-13 13:04:03 UTC
Git commit 8c55120414edf68f8e885ef5b2034df3cbc2e21c by Jan Paul Batrina.
Committed on 13/02/2021 at 09:29.
Pushed by cullmann into branch 'master'.

[KateMwModOnHdDialog] Only enable buttons when at least one file is checked

M  +33   -5    kate/katemwmodonhddialog.cpp
M  +2    -0    kate/katemwmodonhddialog.h

https://invent.kde.org/utilities/kate/commit/8c55120414edf68f8e885ef5b2034df3cbc2e21c