6.0.0-beta1
7/5/25

[#7123] Can't turn on use_trash when no trash folder is set
Summary Can't turn on use_trash when no trash folder is set
Queue IMP
Queue Version HEAD
Type Bug
State Resolved
Priority 2. Medium
Owners Horde Developers (at) , slusarz (at) horde (dot) org
Requester chuck (at) horde (dot) org
Created 07/28/2008 (6186 days ago)
Due
Updated 08/05/2008 (6178 days ago)
Assigned 08/04/2008 (6179 days ago)
Resolved 08/05/2008 (6178 days ago)
Github Issue Link
Github Pull Request
Milestone
Patch No

History
08/05/2008 01:29:02 AM Chuck Hagenbuch Comment #9
State ⇒ Resolved
Reply to this comment
Looks good until we have that prefs rewrite. :) Thanks!
08/04/2008 07:52:17 PM Michael Slusarz Comment #7
State ⇒ Feedback
Reply to this comment
How about this?
07/29/2008 04:36:29 PM Chuck Hagenbuch Comment #5 Reply to this comment
Also, now I can't switch to a regular trash folder without editing 
prefs directly, because use_vtrash is checked, I can't uncheck it, and 
when I try to turn use_trash on, I'm told that I can't use both trash 
and vtrash and that vtrash will be used.
07/29/2008 04:31:26 PM Chuck Hagenbuch Comment #4 Reply to this comment
This sort of works, but is pretty bad user experience in my opinion. 
For one thing it forces two steps to enable move to trash; for 
another, the process for enabling virtual trash now looks like this:



- enable move to trash

- be told you can't delete messages until you select a trash folder

- go back to delmove pref group

- select use virtual trash

- be told that you can't use both virtual trash and a regular trash 
folder at the same time

- go back to make sure virtual trash was set, and you can't see the 
option anymore because use_trash was automatically set to false.



vtrash is in fact enabled now, but I wouldn't expect a user to trust 
that. Why are we hiding these preferences in the first place? It seems 
clear enough to me that if use trash isn't selected a trash folder 
won't be shown. Barring rewriting the prefs UI to allow dynamic 
enabling/disabling of prefs, I think we should just show them.
07/29/2008 05:19:58 AM Michael Slusarz Comment #3 Reply to this comment
How about this solution.  Instead of disabling trash if no Trash pref 
is set, we warn instead.  The delete code will prevent deletion until 
a Trash folder is selected so we are good there.


07/29/2008 05:18:51 AM CVS Commit Comment #2 Reply to this comment
Changes have been made in CVS for this ticket:

http://cvs.horde.org/diff.php/imp/lib/prefs.php?r1=1.51&r2=1.52&ty=u
07/28/2008 08:41:50 PM Chuck Hagenbuch Comment #1
State ⇒ Assigned
Patch ⇒ No
Milestone ⇒
Assigned to Horde DevelopersHorde Developers
Assigned to Michael Slusarz
Queue ⇒ IMP
Summary ⇒ Can't turn on use_trash when no trash folder is set
Type ⇒ Bug
Priority ⇒ 2. Medium
Reply to this comment
Because of this line at the bottom of imp/lib/prefs.php:



// Don't show Trash options if Trash is disabled.

if (!$GLOBALS['prefs']->getValue('use_trash')) {

     $GLOBALS['_prefs']['trashselect']['type'] = 
$GLOBALS['_prefs']['use_vtrash']['type'] = 
$GLOBALS['_prefs']['empty_trash_menu']['type'] = 'implicit';

}



And the check on use_trash that won't let you turn it on if there is 
no trash folder, it is impossible to turn on use_trash if you haven't 
previously selected a trash folder, and you can't select a trahs 
folder because that selection is hidden when use_trash is off.



I *think* the thing to do here would be to just always show the 
trashselect pref and go from there. Any other ideas?

Saved Queries