Bug 210907 - Allow immediate deleting of images without diverting through the "trash-folder" [patch]
Summary: Allow immediate deleting of images without diverting through the "trash-folde...
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Trash (show other bugs)
Version: 1.0.0
Platform: Compiled Sources Unspecified
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-17 20:41 UTC by kgw
Modified: 2017-07-23 08:45 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 1.0.0


Attachments
Patch to add deletion without trash via SHIFT+DEL and Toolbar in Lighttable (4.96 KB, patch)
2009-10-23 01:23 UTC, kgw
Details
Patch to add deletion without trash via SHIFT+DEL and Toolbar in Lighttable (4.75 KB, patch)
2009-10-23 01:59 UTC, kgw
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kgw 2009-10-17 20:41:20 UTC
Version:            (using KDE 4.3.2)
Installed from:    Compiled From Sources

When sorting my images on the light table I would like to delete the bad ones immediately for example by pressing CTRL-DEL from the filesystem, going through the trash folder is a tedious process (deleting many 30MB files quickly is resulting in a severe case of disk trashing) as the trash folder resides on another disk which is quite limited in space.
Comment 1 kgw 2009-10-17 20:42:45 UTC
Sorry, meant this to be a wish list item...
Comment 2 Andi Clemens 2009-10-17 20:54:15 UTC
Already implemented, like in every other KDE application, just press SHIFT+DEL.

Andi
Comment 3 kgw 2009-10-17 21:00:15 UTC
Sorry, but then this doesn't work! I just tried in the Light Table to delete an image by pressing SHIFT and DEL and it does nothing!
Comment 4 kgw 2009-10-23 01:23:12 UTC
Created attachment 37747 [details]
Patch to add deletion without trash via SHIFT+DEL and Toolbar in Lighttable
Comment 5 Andi Clemens 2009-10-23 01:34:06 UTC
The patch doesn't compile, in lighttablewindow.cpp you added a "3" in the copyright comment which makes the file invalid :-)

For me the patch is not working, due to the following errors:
1) The normal delete method (trash delete, Del key) is dead now
2) pressing Shift+Del will call the "trash delete" method :-)

Can anyone confirm?
Comment 6 kgw 2009-10-23 01:50:37 UTC
@Andi, sorry abouth the 3 sneaking into the patch... As to the other problems, it works for me...as for the DEL-key no longer working: You are correct, I just don't know why, I didn't remove the relevant code, I just added the proposed key sequence of SHIFT+DEL. The trash is not used when pressing SHIFT+DEL though...
Comment 7 kgw 2009-10-23 01:59:33 UTC
Created attachment 37750 [details]
Patch to add deletion without trash via SHIFT+DEL and Toolbar in Lighttable

Corrected Version, I had added two actions under the same name into the actionCollection ().
Comment 8 Andi Clemens 2009-10-25 02:03:52 UTC
SVN commit 1039943 by aclemens:

Add permanent delete action to the light table as well.

Kgw,
I have altered your patch a lot, it had code duplication that was actually not
necessary.
Can we close this bug now?

Andi

CCBUG:210907

 M  +33 -5     lighttablewindow.cpp  
 M  +6 -0      lighttablewindow.h  
 M  +2 -0      lighttablewindow_p.h  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1039943
Comment 9 kgw 2009-10-25 08:27:58 UTC
@Andi, I didn't quite understand the semantics of the dialog quite, will the two ways to delete result in different confirmation  dialogs? What I mean is, I might want to use the move to trash without and the delete file with confirmation. I might have gotten it wrong as well as I don't get the dialog anymore on both, but I don't know where to reset the question to appear at all... Besides this quibble the bug could be closed.
Comment 10 Andi Clemens 2009-10-25 10:51:09 UTC
(In reply to comment #9)
> @Andi, I didn't quite understand the semantics of the dialog quite, will the
> two ways to delete result in different confirmation  dialogs?

Yes, it will result in the same dialogs as in AlbumUI, one for delete, the other for trash action.

 What I mean is, I
> might want to use the move to trash without and the delete file with
> confirmation. I might have gotten it wrong as well as I don't get the dialog
> anymore on both, but I don't know where to reset the question to appear at
> all... Besides this quibble the bug could be closed.

Delete will always need confirmation, for the trash action you can set a checkbox for "Never ask again".
To revert this, go into Settings->Misc->Confirm move to trash

Ok I will close the bug now.

Andi
Comment 11 kgw 2009-10-25 11:10:34 UTC
@Andi, it may be fine for you that the Delete always needs confirmation, for me this is a big nuisance I want to get rid o, is there a way to configure the confirmation dialog to be optional like the move to trash is?
Comment 12 Andi Clemens 2009-10-25 11:23:13 UTC
No there is no config option and I guess there will be none.
We can not satisfy every user (:-)), and I can assure you that if this would be an option, we will get a lot of hate mails :-)

A permanent delete is a very destructive action, and most users don't want their images to vanish that easy.

Just imagine you press the key kombination for "permanently delete" and while you are doing this, you realize that this was a mistake. Boom... your images are gone.
Moving them to trash without confirmation is not a big deal, you can restore it again.

Or imagine you set this option once, but forget about it. Hitting "permanent delete" will not ask you again, and yes, although you might know what you are doing, others might not :-)

So from my point of view, this will not be implemented.
Gilles, Marcel,
your opinion?

Anyway just press Enter twice, shouldn't be that time consuming?

Andi
Comment 13 Andi Clemens 2009-10-25 12:59:32 UTC
I can add such an option, let's hope we get no bugreports like "please, warn user on permanent delete" :D
Comment 14 kgw 2009-10-25 13:16:14 UTC
@Andi: Don't. I'll patch it for my use, I agree with your reluctance to add this option...
Comment 15 Andi Clemens 2009-10-25 13:25:38 UTC
No, I'm adding it already.
Gilles and co think it might be useful.
The default is set to confirm, and I just saw that dolphin has such a "dangerous" checkbox, too.
Comment 16 Andi Clemens 2009-10-25 13:52:02 UTC
SVN commit 1040051 by aclemens:

Use "Do not ask again" option for permanent delete as well.
This is a global setting, not only true for lighttable.

CCBUG:210907

 M  +19 -5     digikam/albumsettings.cpp  
 M  +3 -0      digikam/albumsettings.h  
 M  +35 -10    libs/dialogs/deletedialog.cpp  
 M  +3 -2      libs/dialogs/deletedialog.h  
 M  +17 -15    utilities/setup/setupmisc.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=1040051