Bug 199640

Summary: widget trashcan right click to empty disables plasma panel/desktop
Product: [Unmaintained] plasma4 Reporter: SlashDevDsp <slashdevdsp>
Component: widget-trashcanAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: aseigo, asraniel, caionnew, cfeck
Priority: NOR Keywords: junior-jobs
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Implements the sugested fix in the TODO ,using a non modal messagebox

Description SlashDevDsp 2009-07-10 04:58:34 UTC
Version:            (using Devel)
Compiler:          g++ 4.3 
OS:                Linux
Installed from:    Compiled sources

widget trashcan is an example here.

1. add widgets 'trashcan' to the panel
2. delete some file from dolphin by 'move to trash'
3. right click on trashcan widget in the panel -> empty trashcan
4. up comes a window asking "do you want to empty the trash? All items will be deleted"
5. the desktop/panel/other widgets cannot be activated - greyed out <- should not happen!

It seems that MANY of the widgets have similar problems when they display a dialog/error that disable the panel, desktop and widgets. eg: https://bugs.kde.org/show_bug.cgi?id=199633 showing the same problem.

it seems this is a general issue with many of the widget dialogs
Comment 1 Aaron J. Seigo 2009-07-10 15:38:07 UTC
yes, a modal dialog will (surprise) disable access to other parts of the application, in this case plasma-desktop. such dialogs need to be found and made non-modal.
Comment 2 disabled account 2010-06-08 03:21:39 UTC
Confirmed in KDE SC 4.5 Beta 1.
Comment 3 simion314 2011-06-01 16:53:27 UTC
Created attachment 60544 [details]
Implements the sugested fix in the TODO ,using a non modal messagebox

I implemented the fix using the  suggested API in the TODO, i had some problems creating a dev environment for testing this more but it compiles and it should work
Comment 4 Beat Wolf 2011-11-21 22:53:32 UTC
please submit this patch to https://git.reviewboard.kde.org or else it will just get lost. thank you
Comment 5 Aaron J. Seigo 2011-11-22 07:40:20 UTC
Git commit 062717662e473bd7b0affc15070aa43fa16c5f05 by Aaron Seigo.
Committed on 22/11/2011 at 08:38.
Pushed by aseigo into branch 'master'.

make the confirmation dialog non-modal

BUG:199640

M  +65   -60   plasma/desktop/applets/trash/trash.cpp
M  +11   -10   plasma/desktop/applets/trash/trash.h

http://commits.kde.org/kde-workspace/062717662e473bd7b0affc15070aa43fa16c5f05
Comment 6 Aaron J. Seigo 2011-11-22 07:41:42 UTC
note that the patch as submitted didn't actually fix the problem -> you need to pass NoExec and set the dialog to be not modal. for completeness, a pointer (guarded by QWeakPointer, preferably) to the dialog needs to be kept so that if the user selects the action again, the same dialog is brought up (instead of spawning multiple dialogs)