Bug 406305 - Add "Close file" button to inview notice about deleted file
Summary: Add "Close file" button to inview notice about deleted file
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: 18.04.3
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-07 16:01 UTC by Méven Car
Modified: 2019-04-15 07:58 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 19.08


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Méven Car 2019-04-07 16:01:17 UTC
SUMMARY

When a file opened in kate is deleted, kate suggest to "ignore" and keep the changes in the text view, "save as".
I would suggest to add a third option such as "Close file" to close the file discarding its content.
Since it was deleted on disk and that is perhaps what the user wants.

Currently when the user wants to delete the file, he has to Ctrl+w and confirm through a dialog or click in the panel to close the file, which is not very straightforward.
Comment 1 Nate Graham 2019-04-09 18:01:19 UTC
Yes please!
Comment 2 Lothar 2019-04-10 13:34:59 UTC
hm, to my surprise is such file here not treated as "orphaned"
Comment 3 Méven Car 2019-04-11 13:28:58 UTC
Patch proposal at https://phabricator.kde.org/D20467
Comment 4 Nate Graham 2019-04-11 17:18:41 UTC
Very nice!
Comment 5 Christoph Cullmann 2019-04-12 19:34:55 UTC
Git commit 2a0cf7044f75869644d8d1be92514e01c231b53e by Christoph Cullmann, on behalf of Méven Car.
Committed on 12/04/2019 at 19:36.
Pushed by cullmann into branch 'master'.

Allow to close a document whose file was deleted on disk

Summary:
There is no confirmation window about data lose.

Screenshot:
{F6766617}
FIXED-IN: 19.08

Test Plan: Manually tested

Reviewers: cullmann, #kate, #frameworks, dhaumann

Reviewed By: cullmann, #kate, dhaumann

Subscribers: dhaumann, ngraham, kwrite-devel, kde-frameworks-devel

Tags: #kate, #frameworks

Differential Revision: https://phabricator.kde.org/D20467

M  +6    -0    src/dialogs/katedialogs.cpp
M  +1    -0    src/dialogs/katedialogs.h
M  +13   -0    src/document/katedocument.cpp
M  +1    -0    src/document/katedocument.h

https://commits.kde.org/ktexteditor/2a0cf7044f75869644d8d1be92514e01c231b53e
Comment 6 Wyatt Childers 2019-04-14 15:15:14 UTC
I just saw this on the usability blog. I really think this should be changed to "close file" or something more explicit. When I saw the screenshot in the blog, my first thought was that the close button was for the notification -- which I thought was odd, which brought me here.
Comment 7 Méven Car 2019-04-14 15:24:08 UTC
(In reply to Wyatt Childers from comment #6)
> I just saw this on the usability blog. I really think this should be changed
> to "close file" or something more explicit. When I saw the screenshot in the
> blog, my first thought was that the close button was for the notification --
> which I thought was odd, which brought me here.

I see your point and I agree, in fact I hesitate when I did the feature.
"Close file" would be better than "Close".

Review : https://phabricator.kde.org/D20542
Comment 8 Méven Car 2019-04-15 07:58:48 UTC
Git commit e70ebb44a17d38eca393650477199977f8b29854 by Méven Car.
Committed on 15/04/2019 at 07:58.
Pushed by meven into branch 'master'.

Retitle button "Close" to "Close file" when a file has been removed on disk

Summary: CCBUG: 406305

Reviewers: #ktexteditor, ngraham, cullmann

Reviewed By: #ktexteditor, ngraham, cullmann

Subscribers: cullmann, kossebau, kwrite-devel, kde-frameworks-devel

Tags: #kate, #frameworks

Differential Revision: https://phabricator.kde.org/D20542

M  +1    -1    src/dialogs/katedialogs.cpp

https://commits.kde.org/ktexteditor/e70ebb44a17d38eca393650477199977f8b29854