Hi,
I made a small patch that implements 'shift-delete': Delete messages immediately without moving them to the Trash folder. This helps people who are over quota and therefore cannot copy any messages to the Trash folder.
The key_press method of rcube_list_widget simply sets the shiftkey property whenever a key is pressed.
It works only with the shift key and the del key, not with the delete button. I haven't looked at that yet, don't even know if it's possible because my browser seems to handle shift-click it's own way.
Please comment.
Robin
Robin Elfrink wrote:
I made a small patch that implements 'shift-delete': Delete messages immediately without moving them to the Trash folder. This helps people who are over quota and therefore cannot copy any messages to the Trash folder.
I should learn my MUA to automatically attach the appropriate file whenever I mention one.
Sorry.
Robin
--- program/localization/en_US/messages.inc (revision 368) +++ program/localization/en_US/messages.inc (working copy) @@ -68,6 +68,8 @@
$messages['deletecontactconfirm'] = 'Do you really want to delete the selected contact(s)?';
+$messages['deletemessagesconfirm'] = 'Do you really want to delete the selected message(s)?';
$messages['deletefolderconfirm'] = 'Do you really want to delete this folder?';
$messages['purgefolderconfirm'] = 'Do you really want to delete all messages in this folder?'; Index: program/js/list.js =================================================================== --- program/js/list.js (revision 368) +++ program/js/list.js (working copy) @@ -32,6 +32,8 @@ this.rows = []; this.selection = [];
@@ -504,6 +506,8 @@ if (this.focused != true) return true;
--- program/js/app.js (revision 368) +++ program/js/app.js (working copy) @@ -1314,7 +1314,14 @@
// if there is a trash mailbox defined and we're not currently in it:
if (this.env.trash_mailbox && String(this.env.mailbox).toLowerCase()!=String(this.env.trash_mailbox).toLowerCase())
this.move_messages(this.env.trash_mailbox);
// if shift was pressed delete it immediately
if (this.message_list.shiftKey)
{
if (confirm(this.get_label('deletemessagesconfirm')))
this.permanently_remove_messages();
}
else
this.move_messages(this.env.trash_mailbox);
// if there is a trash mailbox defined but we *are* in it:
else if (this.env.trash_mailbox && String(this.env.mailbox).toLowerCase() == String(this.env.trash_mailbox).toLowerCase())
this.permanently_remove_messages();Can anyone open up Robin's two emails from 9:19 and 9:51 within roundmail?
I get a blank screen and in the log I get:
[15-Nov-2006 09:37:34] PHP Catchable fatal error: Object of class rcube_message_part could not be converted to string in /var/www/round/trunk/roundcubemail/program/steps/mail/func.inc on line 1086
Thanks, Matt
Matt Kaatman a écrit :
Can anyone open up Robin's two emails from 9:19 and 9:51 within roundmail?
I can, both of them. Not sure if I am at the last SVN (updated like a week ago), though.
Aurélien
Matt Kaatman wrote:
Can anyone open up Robin's two emails from 9:19 and 9:51 within roundmail?
I get a blank screen and in the log I get:
Weird.
Well, forget those two anyway. I didn't preload the confirmation message. Here's a new patch. I'll stop posting half patches for now. sorry, again.
I'll attach the patch, and copy&paste it as well since it's not that big, so you can at least read it :)
Robin
--- program/localization/nl_NL/messages.inc (revision 368) +++ program/localization/nl_NL/messages.inc (working copy) @@ -68,6 +68,8 @@
$messages['deletecontactconfirm'] = 'Weet u zeker dat u de geselecteerde contactperso(o)n/en wilt verwijderen?';
+$messages['deletemessagesconfirm'] = 'Weet u zeker dat u de geselecteerde bericht(en) wilt verwijderen?';
$messages['deletefolderconfirm'] = 'Weet u zeker dat u deze map wilt verwijderen?';
$messages['purgefolderconfirm'] = 'Weet u zeker dat u alle berichten in deze map wilt verwijderen?'; Index: program/localization/en_US/messages.inc =================================================================== --- program/localization/en_US/messages.inc (revision 368) +++ program/localization/en_US/messages.inc (working copy) @@ -68,6 +68,8 @@
$messages['deletecontactconfirm'] = 'Do you really want to delete the selected contact(s)?';
+$messages['deletemessagesconfirm'] = 'Do you really want to delete the selected message(s)?';
$messages['deletefolderconfirm'] = 'Do you really want to delete this folder?';
$messages['purgefolderconfirm'] = 'Do you really want to delete all messages in this folder?'; Index: program/js/list.js =================================================================== --- program/js/list.js (revision 368) +++ program/js/list.js (working copy) @@ -32,6 +32,8 @@ this.rows = []; this.selection = [];
@@ -504,6 +506,8 @@ if (this.focused != true) return true;
event.keyCode : document.getElementById ? e.keyCode : 0; var mod_key = rcube_event.get_modifier(e); switch (keyCode) Index: program/js/app.js =================================================================== --- program/js/app.js (revision 368) +++ program/js/app.js (working copy) @@ -1314,7 +1314,14 @@
// if there is a trash mailbox defined and we're not currently in it:
if (this.env.trash_mailbox &&
String(this.env.mailbox).toLowerCase()!=String(this.env.trash_mailbox).toLowerCase())
this.move_messages(this.env.trash_mailbox);
// if shift was pressed delete it immediately
if (this.message_list.shiftkey)
{
if (confirm(this.get_label('deletemessagesconfirm')))
this.permanently_remove_messages();
}
else
this.move_messages(this.env.trash_mailbox);
// if there is a trash mailbox defined but we *are* in it:
else if (this.env.trash_mailbox &&String(this.env.mailbox).toLowerCase() == String(this.env.trash_mailbox).toLowerCase()) this.permanently_remove_messages(); Index: program/steps/mail/func.inc =================================================================== --- program/steps/mail/func.inc (revision 368) +++ program/steps/mail/func.inc (working copy) @@ -79,6 +79,7 @@
// add some labels to client rcube_add_label('purgefolderconfirm');
// $mboxlist_start = rcube_timer();
--- program/localization/nl_NL/messages.inc (revision 368) +++ program/localization/nl_NL/messages.inc (working copy) @@ -68,6 +68,8 @@
$messages['deletecontactconfirm'] = 'Weet u zeker dat u de geselecteerde contactperso(o)n/en wilt verwijderen?';
+$messages['deletemessagesconfirm'] = 'Weet u zeker dat u de geselecteerde bericht(en) wilt verwijderen?';
$messages['deletefolderconfirm'] = 'Weet u zeker dat u deze map wilt verwijderen?';
$messages['purgefolderconfirm'] = 'Weet u zeker dat u alle berichten in deze map wilt verwijderen?'; Index: program/localization/en_US/messages.inc =================================================================== --- program/localization/en_US/messages.inc (revision 368) +++ program/localization/en_US/messages.inc (working copy) @@ -68,6 +68,8 @@
$messages['deletecontactconfirm'] = 'Do you really want to delete the selected contact(s)?';
+$messages['deletemessagesconfirm'] = 'Do you really want to delete the selected message(s)?';
$messages['deletefolderconfirm'] = 'Do you really want to delete this folder?';
$messages['purgefolderconfirm'] = 'Do you really want to delete all messages in this folder?'; Index: program/js/list.js =================================================================== --- program/js/list.js (revision 368) +++ program/js/list.js (working copy) @@ -32,6 +32,8 @@ this.rows = []; this.selection = [];
@@ -504,6 +506,8 @@ if (this.focused != true) return true;
--- program/js/app.js (revision 368) +++ program/js/app.js (working copy) @@ -1314,7 +1314,14 @@
// if there is a trash mailbox defined and we're not currently in it:
if (this.env.trash_mailbox && String(this.env.mailbox).toLowerCase()!=String(this.env.trash_mailbox).toLowerCase())
this.move_messages(this.env.trash_mailbox);
// if shift was pressed delete it immediately
if (this.message_list.shiftkey)
{
if (confirm(this.get_label('deletemessagesconfirm')))
this.permanently_remove_messages();
}
else
this.move_messages(this.env.trash_mailbox);
// if there is a trash mailbox defined but we *are* in it:
else if (this.env.trash_mailbox && String(this.env.mailbox).toLowerCase() == String(this.env.trash_mailbox).toLowerCase())
this.permanently_remove_messages();--- program/steps/mail/func.inc (revision 368) +++ program/steps/mail/func.inc (working copy) @@ -79,6 +79,7 @@
// add some labels to client rcube_add_label('purgefolderconfirm');
// $mboxlist_start = rcube_timer();
I found my problem. Line 1086 of func.inc was: $$part->ctype_parameters['charset'] = $MESSAGE['headers']->charset;
Changing it to: (remove one $) $part->ctype_parameters['charset'] = $MESSAGE['headers']->charset;
Corrected the error and I can now view messages I previously couldn't.
Matt Kaatman wrote:
Can anyone open up Robin's two emails from 9:19 and 9:51 within roundmail?
I get a blank screen and in the log I get:
[15-Nov-2006 09:37:34] PHP Catchable fatal error: Object of class rcube_message_part could not be converted to string in /var/www/round/trunk/roundcubemail/program/steps/mail/func.inc on line 1086
Thanks, Matt