| Summary: | Add trash can configuration dialog to set limits | ||
|---|---|---|---|
| Product: | TDE | Reporter: | Darrell <darrella> |
| Component: | tdebase | Assignee: | Michele Calgaro <michele.calgaro> |
| Status: | RESOLVED FIXED | ||
| Severity: | enhancement | CC: | bugwatch, deloptes, michele.calgaro |
| Priority: | P5 | ||
| Version: | R14.1.x [Trinity] | ||
| Hardware: | Other | ||
| OS: | Linux | ||
| Compiler Version: | TDE Version String: | ||
| Application Version: | Application Name: | ||
| Bug Depends on: | 2717 | ||
| Bug Blocks: | 2247 | ||
| Attachments: |
Non working patch to add trash configuration dialog
Cmake patch to build Cmake patch to build2 final patch for trashbin size limit patch for the debian tdebase-tdeio-plugins-trinity.install patch for the debian tdebase-tdeio-plugins-trinity.install final working patch for trashbin size limit with proper step calc |
||
|
Description
Darrell
2014-02-10 19:09:32 CST
Created attachment 2692 [details]
Cmake patch to build
Hi I solved the build problem, but I had to manually copy
tdepassivepopupstack.h
tdecryptographiccarddevice.h
in /opt/trinity/include/ in order to build.
I have not tested the enhancement provided here
It does not work this way. I think your CMake rules are wrong but I don't know what exactly there is wrong. Good that there is the old Makefile.am. I will try to fix it and come back with a solution. Created attachment 2693 [details]
Cmake patch to build2
this is much better and includes a build target for the testtrach executable, however still not working - I don't see the wonderful options promised
Created attachment 2697 [details]
final patch for trashbin size limit
The only problem I see now is that when you use the controls on the percent input, the defined step by 1 misbehaves if the value is < 1. IMO a function should be hooked to set the step if < 1 or > 1.
Created attachment 2698 [details]
patch for the debian tdebase-tdeio-plugins-trinity.install
This provides the service file for the ktrash size limit properties in the deb file
This obviously can not go in 14.0.0, I change the version to 14.1 Created attachment 2699 [details]
patch for the debian tdebase-tdeio-plugins-trinity.install
Sorry, forgot to add most important - the libraries for the plugin.
For reference, from ML email.
-----------------------------------------
This plugin (library) is service.
In the .desktop file I write now
[Desktop Entry]
Type=Service
Name=Trash Properties Page
Name[bg]=Свойства на кошчето
X-TDE-Library=ktrashpropsdlgplugin
X-TDE-ServiceTypes=KPropsDlg/Plugin,media/builtin-trash
the file goes in
/opt/trinity/share/services/ktrashpropsdlgplugin.desktop
After this run
tdebuildsycoca
Now right click and select properties on the trashbin and watch
in .xsession-err...
tdeio (KSycoca): Trying to open tdesycoca
from /var/tmp/tdecache-emanoil/tdesycoca
tdeio (TDETrader): query for ThumbCreator : returning 14 offers
tdeio (TDETrader): query for media/builtin-trash : returning 0 offers
tdeio (TDEIOJob): stat file:///opt/trinity/share/apps/kdesktop/Desktop/Trash
tdeio_file: FileProtocol::stat details=2
tdeio (TDETrader): query for ThumbCreator : returning 14 offers
tdeio (TDETrader): query for media/builtin-trash : returning 1 offers
Emanoil, I have tested the patches. tdebase builds and install correctly, the size limit plugin dialog is displayed and I can set the options. But it does not seems to be doing anything: I set the option to warn me if the trash limit is exceed, but nothing happens. I also try the other two options (delete oldest/delete largest) but the result was the same. Is it working on your system? If not, there is more work to be done. Good job anyway in getting the patch to at least build and install. Yes indeed. However in the code I do not see anything that would check size and issue a warning. There is functionality missing behind and you are right to be of some use it needs further dev. Wouldn't be better if we open another bug for it and close this one? See this function in the code bool TrashImpl::adaptTrashSize( const TQString& origPath, int trashId ) It looks like the size of trash is checked against the limit, but obviously for some reasons it does not do anything. I don't think we need a new bug report. This one is about adding the trash limit functionality, so we just continue here. When it is working 100% we will push it to git repository yes agree. I doubt it has ever worked. I'll play with it and come back. Thanks for pointing me the function there. regards bool TrashImpl::adaptTrashSize( const TQString& origPath, int trashId )
{
TDEConfig config( "ktrashrc" );
should read
TDEConfig config( "trashrc" );
However I would like to fix the problem with the percent/size step value before releasing the final patch.
> However I would like to fix the problem with the percent/size step value
> before releasing the final patch.
Thinking about this, the best way would be to add one more checkbox and give the user the choice among:
- delete file older than...
- size limit in %
- size limit specified in fixed amount (for example 1 GB, 537 MB, ...)
One checkbox + one combobox for size (KB, MB, GB,) + numeric edit field for the quantity selection.
That would make the patch really good, even better than the original
Created attachment 2701 [details]
final working patch for trashbin size limit with proper step calc
Hi
After thinking a while I decided to first fix this step calc and see what the responses would be. I just tested it and it looks really nice (at least for me).
What Michele suggested would take some more time which I prefer to spend on other items.
Let me know if you like the version ATM. I think it is sufficient.
enjoy
Thanks Emanoil, the code is working now, good job. The code will definitely be added to R14.1. Memo for future: after pushing above patches, the following things are also required: - add option to allow setting a fixed size for the trash - add entry point to trash configuration in TDE. Currently the only method I found is to enable the trash icon on the desktop and right click on it. There should be also another way to set trash option which do not require showing icons on desktop It is also necessary to improve the feedback message displayed when trying to trash a file that is bigger than the maximum size allowed for Trash. Currently a message saying that the file is too big to be trashed is displayed, but it is not explained why it is too big. The message should say something like "too big to be trashed because it exceed the maximum size allowed for the trash bin" or something like that. Comment on attachment 2701 [details]
final working patch for trashbin size limit with proper step calc
Pushed to GIT in commit ee3091b (R!4.1 only)
Many thanks to Tobias Koenig for the original patch and to Darrell and Emanoil for working on it.
Comment on attachment 2699 [details]
patch for the debian tdebase-tdeio-plugins-trinity.install
Extended to all supported Debian/Ubuntu distro and pushed to GIT in commit fe6bc03 (R14.1 only)
Emanoil, I have assumed that all the changes you made to get the original patch from Tobias to work are your own work, so I have signed off the patch with your name as well. Let me know if that was not the case or if you have already settle the CLA with Tim. Commit 6110a52 cleans up previous patch a bit and fix the error message when a file is too big to be trashed (see comment 17). I have started working at adding an option to set a fixed size limit (instead of a percentual one), but first I will have to fix some bugs in KDoubleSpin Hi Michele, I completely forgot about this SLA. I put it on the todo and will follow next (in the weekend) Regarding the question: Yes the work on the patch is my own work. Thanks for the patience and help Ok, thanks for the feedback Emanoil. And many thanks for contributing to TDE ;-) I have signed the CLA. Is it possible to commit directly to the tree. I guess I have to read about the rules. Is there a guide? Should I ask this question in the user list? Hi Emanoil, I sent you email. Any question, let's discuss there if needed. Also you can use the IRC channel if you want Commit b688738 adds support for "fixed size trash". The user can now specify the size of the trash bin in a fixed value (from 0 bytes to 1024 TBytes). Still some work left to be done before closing the bug, needs to make the trash option window more accessible. I think we can close this. I built from git and all seems to be working perfectly - not that I use this functionality that often though. >> Still some work left to be done before closing the bug, needs to make the >> trash option window more accessible. > I think we can close this. I built from git and all seems to be working > perfectly - not that I use this functionality that often though. Not really. The functionality is there but needs to make it more accessible because now it is quite hidden. I need to have some time for TDE to complete this. Will be done sooner or later :-) Back to work on this bug. The plan is to: 1) create a TCC module for trash configuration, under "System administration" category 2) in Konqueror main page there is a "trash" entry. Right click and properties should bring up the TCC module for config 3) from Konqueror location bar, typing "trash:" will show the trash bin contents. Right click on the right pane -> properties should also bring up the config page 4) add a link to the TCC config page to the trash applet in kicker 5) maintain the link also in the right click popup menu from the "trash" icon on the desktop Points 3-4-5 implemented in commit 48635e63 (tdebase) and 1977d22b7 (packaging:DEB). Point 2 is invalid, since none of the links in the page have a right-click properties entry. Point 1 still to be done. Commits 691c9204, c53dbf95 and 85e0371c finally complete the work on this. Two more commits related to this. 563adb52 (tdebase) and f8387c313 (DEB packaging) |