From c8c1e0ef3b229a82e74c70aeacc29f2ba021afbe Mon Sep 17 00:00:00 2001
From: svncommit <devs@roundcube.net>
Date: Tue, 27 Jun 2006 17:56:44 -0400
Subject: [PATCH] Renameable folders, mail-checking changes, other fixes (richs)

---
 skins/default/images/buttons/next_sel.png         |    0 
 skins/default/images/buttons/spellcheck_sel.png   |    0 
 program/include/main.inc                          |   22 ++-
 program/localization/de_CH/messages.inc           |    2 
 program/localization/de_CH/labels.inc             |    1 
 skins/default/templates/message.html              |   20 +-
 program/steps/settings/manage_folders.inc         |   68 +++++++++
 program/localization/el/labels.inc                |    1 
 skins/default/images/buttons/add_sel.png          |    0 
 program/localization/de_DE/labels.inc             |    1 
 index.php                                         |    2 
 skins/default/templates/mail.html                 |   17 +-
 program/localization/ja/labels.inc                |    1 
 program/localization/ru/messages.inc              |    2 
 program/localization/it/labels.inc                |    1 
 program/localization/cn/labels.inc                |    1 
 program/localization/fr/messages.inc              |    2 
 program/localization/ru/labels.inc                |    1 
 skins/default/images/buttons/add_contact_sel.png  |    0 
 program/localization/de_DE/messages.inc           |    2 
 CHANGELOG                                         |   13 +
 skins/default/images/buttons/attach_sel.png       |    0 
 program/localization/pt_BR/messages.inc           |    2 
 skins/default/templates/managefolders.html        |   11 +
 skins/default/images/buttons/reply_sel.png        |    0 
 config/main.inc.php.dist                          |    3 
 skins/default/images/buttons/drafts_sel.png       |    0 
 skins/default/images/buttons/forward_sel.png      |    0 
 skins/default/images/buttons/compose_sel.png      |    0 
 skins/default/images/buttons/source_sel.png       |    0 
 program/localization/ja/messages.inc              |    2 
 program/localization/en_US/messages.inc           |    2 
 skins/default/templates/compose.html              |   14 +-
 skins/default/images/buttons/delete_sel.png       |    0 
 program/js/app.js                                 |   96 ++++++++++++-
 program/localization/pt_PT/messages.inc           |    2 
 skins/default/common.css                          |    1 
 skins/default/images/buttons/contacts_sel.png     |    0 
 skins/default/images/buttons/download_sel.png     |    0 
 skins/default/images/buttons/send_sel.png         |    0 
 program/localization/en_GB/labels.inc             |    1 
 program/localization/it/messages.inc              |    2 
 skins/default/images/buttons/back_sel.png         |    0 
 program/localization/pt_BR/labels.inc             |    1 
 program/localization/cn/messages.inc              |    2 
 program/steps/mail/check_recent.inc               |   52 ++++---
 program/steps/mail/func.inc                       |    4 
 skins/default/templates/addressbook.html          |   16 +-
 program/include/rcube_imap.inc                    |   25 +++
 program/localization/en_GB/messages.inc           |    2 
 skins/default/images/buttons/previous_sel.png     |    0 
 skins/default/images/buttons/print_sel.png        |    0 
 program/localization/el/messages.inc              |    2 
 program/localization/fr/labels.inc                |    1 
 program/localization/pt_PT/labels.inc             |    1 
 program/localization/en_US/labels.inc             |    3 
 program/localization/es/labels.inc                |    1 
 program/localization/es/messages.inc              |    2 
 skins/default/images/buttons/edit_contact_sel.png |    0 
 skins/default/images/buttons/inbox_sel.png        |    0 
 skins/default/images/buttons/replyall_sel.png     |    0 
 61 files changed, 327 insertions(+), 78 deletions(-)

diff --git a/CHANGELOG b/CHANGELOG
index a384217..ced9dba 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,19 @@
 CHANGELOG RoundCube Webmail
 ---------------------------
 
+2006/06/26 (richs)
+----------
+- Added button to immediately check for new messages 
+- New message checking now displays status "Checking for new messages..."
+- New message checking now looks for unread messages in all mailboxes (Feature #1326401)
+- Task buttons now respond to clicks by darkening (as in other applications)
+- Fixed "Sender" column changing to "Recipient" for "Sent" and "Drafts" message lists
+- Added ability to sort messages by "Size"
+- Added ability to rename folders (Feature #1326396)
+- Added 'protect_default_folders' option to main.inc.php to prevent renames/deletes/unsubscribes of default folders
+- Corrected 5 typos of "INSTLL" to "INSTALL" in program/include/main.inc
+
+
 2006/06/25
 ----------
 - Changed behavior to include host-specific configuration (Bug #1483849)
diff --git a/config/main.inc.php.dist b/config/main.inc.php.dist
index dda852c..806ec1a 100644
--- a/config/main.inc.php.dist
+++ b/config/main.inc.php.dist
@@ -132,6 +132,9 @@
 // display these folders separately in the mailbox list
 $rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent', 'Junk', 'Trash');
 
+// protect the default folders from renames, deletes, and subscription changes
+$rcmail_config['protect_default_folders'] = TRUE;
+
 // Set TRUE if deleted messages should not be displayed
 // This will make the application run slower
 $rcmail_config['skip_deleted'] = FALSE;
diff --git a/index.php b/index.php
index 3349105..84e11ae 100644
--- a/index.php
+++ b/index.php
@@ -340,7 +340,7 @@
   if ($_action=='save-prefs')
     include('program/steps/settings/save_prefs.inc');  
 
-  if ($_action=='folders' || $_action=='subscribe' || $_action=='unsubscribe' || $_action=='create-folder' || $_action=='delete-folder')
+  if ($_action=='folders' || $_action=='subscribe' || $_action=='unsubscribe' || $_action=='create-folder' || $_action=='rename-folder' || $_action=='delete-folder')
     include('program/steps/settings/manage_folders.inc');
 
   }
diff --git a/program/include/main.inc b/program/include/main.inc
index 0a158dc..cc019af 100644
--- a/program/include/main.inc
+++ b/program/include/main.inc
@@ -289,11 +289,11 @@
 // check the given string and returns language properties
 function rcube_language_prop($lang, $prop='lang')
   {
-  global $INSTLL_PATH;
+  global $INSTALL_PATH;
   static $rcube_languages, $rcube_language_aliases, $rcube_charsets;
 
   if (empty($rcube_languages))
-    @include($INSTLL_PATH.'program/localization/index.inc');
+    @include($INSTALL_PATH.'program/localization/index.inc');
     
   // check if we have an alias for that language
   if (!isset($rcube_languages[$lang]) && isset($rcube_language_aliases[$lang]))
@@ -357,7 +357,7 @@
     $OUTPUT->set_charset($CONFIG['charset']);
 
   // add some basic label to client
-  rcube_add_label('loading');
+  rcube_add_label('loading','checkingmail');
   }
 
 
@@ -764,13 +764,13 @@
 
   if (!sizeof($sa_languages))
     {
-    @include($INSTLL_PATH.'program/localization/index.inc');
+    @include($INSTALL_PATH.'program/localization/index.inc');
 
-    if ($dh = @opendir($INSTLL_PATH.'program/localization'))
+    if ($dh = @opendir($INSTALL_PATH.'program/localization'))
       {
       while (($name = readdir($dh)) !== false)
         {
-        if ($name{0}=='.' || !is_dir($INSTLL_PATH.'program/localization/'.$name))
+        if ($name{0}=='.' || !is_dir($INSTALL_PATH.'program/localization/'.$name))
           continue;
 
         if ($label = $rcube_languages[$name])
@@ -1192,6 +1192,7 @@
         'identityform' => 'rcube_identity_form',
         'foldersubscription' => 'rcube_subscription_form',
         'createfolder' => 'rcube_create_folder_form',
+	'renamefolder' => 'rcube_rename_folder_form',
         'composebody' => 'rcmail_compose_body'
       );
 
@@ -1317,7 +1318,7 @@
                                 $attrib['id'],
                                 $attrib['type'],
                                 $attrib['imageact'] ? $skin_path.$attrib['imageact'] : $attrib['classact'],
-                                $attirb['imagesel'] ? $skin_path.$attirb['imagesel'] : $attrib['classsel'],
+                                $attrib['imagesel'] ? $skin_path.$attrib['imagesel'] : $attrib['classsel'],
                                 $attrib['imageover'] ? $skin_path.$attrib['imageover'] : ''));
 
     // make valid href to task buttons
@@ -1338,6 +1339,11 @@
     $attrib['onmouseout'] = sprintf("return %s.button_out('%s','%s')", $JS_OBJECT_NAME, $command, $attrib['id']);
     }
 
+  if ($command && $attrib['imagesel'])
+    {
+    $attrib['onmousedown'] = sprintf("return %s.button_sel('%s','%s')", $JS_OBJECT_NAME, $command, $attrib['id']);
+    $attrib['onmouseup'] = sprintf("return %s.button_out('%s','%s')", $JS_OBJECT_NAME, $command, $attrib['id']);
+    }
 
   $out = '';
 
@@ -1350,7 +1356,7 @@
     if ($attrib['label'])
       $btn_content .= ' '.$attrib['label'];
     
-    $link_attrib = array('href', 'onclick', 'onmouseover', 'onmouseout', 'title');
+    $link_attrib = array('href', 'onclick', 'onmouseover', 'onmouseout', 'onmousedown', 'onmouseup', 'title');
     }
   else if ($attrib['type']=='link')
     {
diff --git a/program/include/rcube_imap.inc b/program/include/rcube_imap.inc
index dccd64f..7ad4ad0 100644
--- a/program/include/rcube_imap.inc
+++ b/program/include/rcube_imap.inc
@@ -1262,9 +1262,30 @@
 
 
   // set a new name to an existing mailbox
-  function rename_mailbox($mbox_name, $new_name)
+  function rename_mailbox($mbox_name, $new_name, $subscribe=TRUE)
     {
-    // not implemented yet
+    $result = FALSE;
+
+    // replace backslashes
+    $name = preg_replace('/[\\\]+/', '-', $new_name);
+
+    $name_enc = UTF7EncodeString($new_name);
+
+    // reduce mailbox name to 100 chars
+    $name_enc = substr($name_enc, 0, 100);
+
+    $abs_name = $this->_mod_mailbox($name_enc);
+    $a_mailbox_cache = $this->get_cache('mailboxes');
+
+    if (strlen($abs_name) && (!is_array($a_mailbox_cache) || !in_array($abs_name, $a_mailbox_cache)))
+      $result = iil_C_RenameFolder($this->conn, $mbox_name, $abs_name);
+
+    // update mailboxlist cache
+    if ($result && $subscribe)
+      $this->unsubscribe($mbox_name);
+      $this->subscribe($name_enc);
+
+    return $result ? $name : FALSE;
     }
 
 
diff --git a/program/js/app.js b/program/js/app.js
index c0dac3f..c61c20a 100644
--- a/program/js/app.js
+++ b/program/js/app.js
@@ -123,7 +123,7 @@
           }
 
         // enable mail commands
-        this.enable_command('list', 'compose', 'add-contact', 'search', 'reset-search', true);
+        this.enable_command('list', 'checkmail', 'compose', 'add-contact', 'search', 'reset-search', true);
         
         if (this.env.action=='show')
           {
@@ -211,7 +211,7 @@
           this.enable_command('save', true);
           
         if (this.env.action=='folders')
-          this.enable_command('subscribe', 'unsubscribe', 'create-folder', 'delete-folder', true);
+          this.enable_command('subscribe', 'unsubscribe', 'create-folder', 'rename-folder', 'delete-folder', true);
           
         var identities_list = this.gui_objects.identitieslist;
         if (identities_list)
@@ -613,11 +613,17 @@
           {
           if (this.env.search_request<0 || (this.env.search_request && props != this.env.mailbox))
             this.reset_qsearch();
+
+	  // Reset message list header, unless returning from compose/read/etc
+	  if (this.env.mailbox != props && this.message_rows)
+	    this.clear_message_list_header();
+
           this.list_mailbox(props);
           }
         else if (this.task=='addressbook')
           this.list_contacts();
         break;
+
 
       case 'sort':
         // get the type of sorting
@@ -842,6 +848,9 @@
           //location.href = this.env.comm_path+'&_action=show&_uid='+this.env.prev_uid+'&_mbox='+this.env.mailbox;
         break;
       
+      case 'checkmail':
+        this.check_for_recent();
+        break;
       
       case 'compose':
         var url = this.env.comm_path+'&_action=compose';
@@ -1032,6 +1041,10 @@
         
       case 'create-folder':
         this.create_folder(props);
+        break;
+
+      case 'rename-folder':
+        this.rename_folder(props);
         break;
 
       case 'delete-folder':
@@ -1554,6 +1567,7 @@
   this.clear_message_list = function()
     {
     var table = this.gui_objects.messagelist;
+   
     var tbody = document.createElement('TBODY');
     table.insertBefore(tbody, table.tBodies[0]);
     table.removeChild(table.tBodies[1]);
@@ -1563,6 +1577,18 @@
     
     };
 
+  this.clear_message_list_header = function()
+    {
+    var table = this.gui_objects.messagelist;
+
+    var colgroup = document.createElement('COLGROUP');
+    table.removeChild(table.colgroup);
+    table.insertBefore(colgroup, table.thead);
+
+    var thead = document.createElement('THEAD');
+    table.removeChild(table.thead);
+    table.insertBefore(thead, table.tBodies[0]);
+    };
 
   this.expunge_mailbox = function(mbox)
     {
@@ -2584,6 +2610,21 @@
       form.elements['_folder_name'].focus();
     };
 
+  this.rename_folder = function(props)
+    {
+    var form;
+    if ((form = this.gui_objects.editform) && form.elements['_folder_oldname'] && form.elements['_folder_newname'])
+      {	
+      oldname = form.elements['_folder_oldname'].value;
+      newname = form.elements['_folder_newname'].value;
+      }
+
+    if (oldname && newname)
+      this.http_request('rename-folder', '_folder_oldname='+escape(oldname)+'&_folder_newname='+escape(newname));
+    else if (form.elements['_folder_newname'])
+      form.elements['_folder_newname'].focus();
+    };
+
 
   this.delete_folder = function(folder)
     {
@@ -2603,6 +2644,20 @@
     var row;
     if (id && (row = document.getElementById(id)))
       row.style.display = 'none';    
+
+    // remove folder from rename-folder list
+    var form;
+    if ((form = this.gui_objects.editform) && form.elements['_folder_oldname'])
+      {
+      for (var i=0;i<form.elements['_folder_oldname'].options.length;i++)
+        {
+        if (form.elements['_folder_oldname'].options[i].value == folder) 
+	  {
+          form.elements['_folder_oldname'].options[i] = null;
+	  break;
+          }
+        }
+      }
     };
 
 
@@ -2671,7 +2726,7 @@
 
      var tbody = this.gui_objects.subscriptionlist.tBodies[0];
      var id = tbody.childNodes.length+1;
-     
+    
      // clone a table row
      var row = this.clone_table_row(tbody.rows[0]);
      row.id = 'rcmrow'+id;
@@ -2690,9 +2745,14 @@
      if (row.cells[2].firstChild.tagName=='A')
        row.cells[2].firstChild.onclick = new Function(this.ref+".command('delete-folder','"+name+"')");
 
-    var form;
-    if ((form = this.gui_objects.editform) && form.elements['_folder_name'])
-      form.elements['_folder_name'].value = '';
+     var form;
+     if ((form = this.gui_objects.editform) && form.elements['_folder_name'])
+       form.elements['_folder_name'].value = '';
+ 
+     // add new folder to rename-folder list
+     if (form.elements['_folder_oldname'])
+       form.elements['_folder_oldname'].options[form.elements['_folder_oldname'].options.length] = new Option(name,name);
+
      };
 
 
@@ -2795,6 +2855,26 @@
       }
     };
 
+  // mouse down on button
+  this.button_sel = function(command, id)
+    {
+    var a_buttons = this.buttons[command];
+    var button, img;
+
+    if(!a_buttons || !a_buttons.length)
+      return;
+
+    for(var n=0; n<a_buttons.length; n++)
+      {
+      button = a_buttons[n];
+      if(button.id==id && button.status=='act')
+        {
+        img = document.getElementById(button.id);
+        if (img && button.sel)
+          img.src = button.sel;
+        }
+      }
+    };
 
   // mouse out of button
   this.button_out = function(command, id)
@@ -3181,8 +3261,7 @@
       ctype = ctype_array[0];
     }
 
-    if (request_obj.__lock)
-      this.set_busy(false);
+    this.set_busy(false);
 
   console(request_obj.get_text());
 
@@ -3236,6 +3315,7 @@
   // send periodic request to check for recent messages
   this.check_for_recent = function()
     {
+    this.set_busy(true, 'checkingmail');
     var d = new Date();
     this.http_request('check-recent', '_t='+d.getTime());
     };
diff --git a/program/localization/cn/labels.inc b/program/localization/cn/labels.inc
index bf77734..62208fe 100644
--- a/program/localization/cn/labels.inc
+++ b/program/localization/cn/labels.inc
@@ -91,6 +91,7 @@
 $labels['today'] = '今天';
 
 // toolbar buttons
+$labels['checkmail']        = '检查新消息';
 $labels['writenewmessage']  = '写新邮件';
 $labels['replytomessage']   = '回复邮件';
 $labels['forwardmessage']   = '转发邮件';
diff --git a/program/localization/cn/messages.inc b/program/localization/cn/messages.inc
index edbe707..8ce103b 100644
--- a/program/localization/cn/messages.inc
+++ b/program/localization/cn/messages.inc
@@ -37,6 +37,8 @@
 
 $messages['loadingdata'] = '读取数据...';
 
+$messages['checkingmail'] = '检查新消息...';
+
 $messages['sendingmessage'] = '正在发送邮件...';
 
 $messages['messagesent'] = '邮件发送成功';
diff --git a/program/localization/de_CH/labels.inc b/program/localization/de_CH/labels.inc
index 9141564..2b73ed0 100644
--- a/program/localization/de_CH/labels.inc
+++ b/program/localization/de_CH/labels.inc
@@ -91,6 +91,7 @@
 $labels['today'] = 'Heute';
 
 // toolbar buttons // Symbolleisten-Tipps
+$labels['checkmail']        = 'Überprüfung auf neue Anzeigen';
 $labels['writenewmessage']  = 'Neue Nachricht schreiben';
 $labels['replytomessage']   = 'Antwort verfassen';
 $labels['replytoallmessage'] = 'Antwort an Absender und alle Empfänger';
diff --git a/program/localization/de_CH/messages.inc b/program/localization/de_CH/messages.inc
index 57c1513..0484b5d 100644
--- a/program/localization/de_CH/messages.inc
+++ b/program/localization/de_CH/messages.inc
@@ -34,6 +34,8 @@
 
 $messages['loading'] = $messages['loadingdata'] = 'Daten werden geladen...';
 
+$messages['checkingmail'] = 'Überprüfung auf neue Anzeigen...';
+
 $messages['sendingmessage'] = 'Nachricht wird gesendet...';
 
 $messages['messagesent'] = 'Nachricht erfolgreich gesendet';
diff --git a/program/localization/de_DE/labels.inc b/program/localization/de_DE/labels.inc
index ac74b30..1aab071 100644
--- a/program/localization/de_DE/labels.inc
+++ b/program/localization/de_DE/labels.inc
@@ -92,6 +92,7 @@
 $labels['today'] = 'Heute';
 
 // toolbar buttons // Symbolleisten-Tipps
+$labels['checkmail']        = 'Überprüfung auf neue Anzeigen';
 $labels['writenewmessage']  = 'Neue Nachricht schreiben';
 $labels['replytomessage']   = 'Antwort verfassen';
 $labels['replytoallmessage'] = 'Antwort an Absender und alle Empfänger';
diff --git a/program/localization/de_DE/messages.inc b/program/localization/de_DE/messages.inc
index 622cd0d..f084b16 100644
--- a/program/localization/de_DE/messages.inc
+++ b/program/localization/de_DE/messages.inc
@@ -36,6 +36,8 @@
 
 $messages['loading'] = $messages['loadingdata'] = 'Daten werden geladen...';
 
+$messages['checkingmail'] = 'Überprüfung auf neue Anzeigen...';
+
 $messages['sendingmessage'] = 'Nachricht wird gesendet...';
 
 $messages['messagesent'] = 'Nachricht erfolgreich gesendet';
diff --git a/program/localization/el/labels.inc b/program/localization/el/labels.inc
index 37b42c1..ff99364 100755
--- a/program/localization/el/labels.inc
+++ b/program/localization/el/labels.inc
@@ -97,6 +97,7 @@
 $labels['today'] = 'Σήμερα';
 
 // toolbar buttons
+$labels['checkmail']        = 'Έλεγχος για τα νέα μηνύματα';
 $labels['writenewmessage']  = 'Δημιουργία νέου μηνύματος';
 $labels['replytomessage']   = 'Απάντηση μηνύματος';
 $labels['forwardmessage']   = 'Προώθηση μηνύματος';
diff --git a/program/localization/el/messages.inc b/program/localization/el/messages.inc
index 0d01054..c3612be 100755
--- a/program/localization/el/messages.inc
+++ b/program/localization/el/messages.inc
@@ -38,6 +38,8 @@
 
 $messages['loadingdata'] = 'Φόρτωση δεδομένων...';
 
+$messages['checkingmail'] = 'Έλεγχος για τα νέα μηνύματα...';
+
 $messages['sendingmessage'] = 'Αποστολή μηνύματος...';
 
 $messages['messagesent'] = 'Το μήνυμα στάλθηκε επιτυχώς';
diff --git a/program/localization/en_GB/labels.inc b/program/localization/en_GB/labels.inc
index 3365f92..fc7a93f 100644
--- a/program/localization/en_GB/labels.inc
+++ b/program/localization/en_GB/labels.inc
@@ -91,6 +91,7 @@
 $labels['today'] = 'Today';
 
 // toolbar buttons
+$labels['checkmail']        = 'Check for new messages';
 $labels['writenewmessage']  = 'Create a new message';
 $labels['replytomessage']   = 'Reply to the message';
 $labels['replytoallmessage'] = 'Reply to sender and all recipients';
diff --git a/program/localization/en_GB/messages.inc b/program/localization/en_GB/messages.inc
index de4e901..262e300 100644
--- a/program/localization/en_GB/messages.inc
+++ b/program/localization/en_GB/messages.inc
@@ -36,6 +36,8 @@
 
 $messages['loadingdata'] = 'Loading data...';
 
+$messages['checkingmail'] = 'Checking for new messages...';
+
 $messages['messagesent'] = 'Message sent successfully';
 
 $messages['savingmessage'] = 'Saving message...';
diff --git a/program/localization/en_US/labels.inc b/program/localization/en_US/labels.inc
index c5cbaa4..436dacf 100644
--- a/program/localization/en_US/labels.inc
+++ b/program/localization/en_US/labels.inc
@@ -90,6 +90,7 @@
 $labels['today'] = 'Today';
 
 // toolbar buttons
+$labels['checkmail']        = 'Check for new messages';
 $labels['writenewmessage']  = 'Create a new message';
 $labels['replytomessage']   = 'Reply to the message';
 $labels['replytoallmessage'] = 'Reply to sender and all recipients';
@@ -208,6 +209,8 @@
 $labels['subscribed']  = 'Subscribed';
 $labels['create']  = 'Create';
 $labels['createfolder']  = 'Create new folder';
+$labels['rename'] = 'Rename';
+$labels['renamefolder'] = 'Rename existing folder';
 $labels['deletefolder']  = 'Delete folder';
 $labels['managefolders']  = 'Manage folders';
 
diff --git a/program/localization/en_US/messages.inc b/program/localization/en_US/messages.inc
index d4f3643..a5ffc09 100644
--- a/program/localization/en_US/messages.inc
+++ b/program/localization/en_US/messages.inc
@@ -36,6 +36,8 @@
 
 $messages['loadingdata'] = 'Loading data...';
 
+$messages['checkingmail'] = 'Checking for new messages...';
+
 $messages['sendingmessage'] = 'Sending message...';
 
 $messages['messagesent'] = 'Message sent successfully';
diff --git a/program/localization/es/labels.inc b/program/localization/es/labels.inc
index 1b648d5..3b28244 100644
--- a/program/localization/es/labels.inc
+++ b/program/localization/es/labels.inc
@@ -94,6 +94,7 @@
 $labels['today'] = 'Hoy';
 
 // toolbar buttons
+$labels['checkmail']        = 'Comprobación para saber si hay nuevos mensajes';
 $labels['writenewmessage']  = 'Crear nuevo mensaje';
 $labels['replytomessage']   = 'Responder al mensaje';
 $labels['forwardmessage']   = 'Reenviar mensaje';
diff --git a/program/localization/es/messages.inc b/program/localization/es/messages.inc
index 551ee75..675bc84 100644
--- a/program/localization/es/messages.inc
+++ b/program/localization/es/messages.inc
@@ -43,6 +43,8 @@
 
 $messages['loadingdata'] = 'Cargando datos...';
 
+$messages['checkingmail'] = 'Comprobación para saber si hay nuevos mensajes...';
+
 $messages['sendingmessage'] = 'Enviando mensaje...';
 
 $messages['messagesent'] = 'Mensaje enviado correctamente';
diff --git a/program/localization/fr/labels.inc b/program/localization/fr/labels.inc
index 27a4f50..2fb2d6e 100644
--- a/program/localization/fr/labels.inc
+++ b/program/localization/fr/labels.inc
@@ -91,6 +91,7 @@
 $labels['today'] = 'Aujourd\'hui';
 
 // toolbar buttons
+$labels['checkmail']        = 'Vérification les nouveaux messages';
 $labels['writenewmessage']  = 'Créer un nouveau message';
 $labels['replytomessage']   = 'Répondre au message';
 $labels['replytoallmessage'] = 'Répondre à tous';
diff --git a/program/localization/fr/messages.inc b/program/localization/fr/messages.inc
index b8c2475..b084710 100644
--- a/program/localization/fr/messages.inc
+++ b/program/localization/fr/messages.inc
@@ -36,6 +36,8 @@
 
 $messages['loadingdata'] = 'Chargement des données en cours...';
 
+$messages['checkingmail'] = 'Vérification les nouveaux messages...';
+
 $messages['sendingmessage'] = 'Message en cours d\'envoi...';
 
 $messages['messagesent'] = 'Message envoyé';
diff --git a/program/localization/it/labels.inc b/program/localization/it/labels.inc
index b2d2726..0a080ea 100644
--- a/program/localization/it/labels.inc
+++ b/program/localization/it/labels.inc
@@ -91,6 +91,7 @@
 $labels['today'] = 'Oggi';
 
 // toolbar buttons
+$labels['checkmail']        = 'Controllando per vedere se c'è nuovi messaggi';
 $labels['writenewmessage']  = 'Scrivi un nuovo messaggio';
 $labels['replytomessage']   = 'Rispondi al messaggio';
 $labels['replytoallmessage'] = 'Rispondi a tutti';
diff --git a/program/localization/it/messages.inc b/program/localization/it/messages.inc
index 7afec1c..ae3c818 100644
--- a/program/localization/it/messages.inc
+++ b/program/localization/it/messages.inc
@@ -36,6 +36,8 @@
 
 $messages['loadingdata'] = 'Caricamento dati...';
 
+$messages['checkingmail'] = 'Controllando per vedere se c'è nuovi messaggi...';
+
 $messages['sendingmessage'] = 'Invio messaggio in corso...';
 
 $messages['messagesent'] = 'Messaggio inviato correttamente';
diff --git a/program/localization/ja/labels.inc b/program/localization/ja/labels.inc
index 11a50ae..3732185 100644
--- a/program/localization/ja/labels.inc
+++ b/program/localization/ja/labels.inc
@@ -91,6 +91,7 @@
 $labels['today'] = '今日';
 
 // toolbar buttons
+$labels['checkmail']        = '新しいメッセージがあるように確認';
 $labels['writenewmessage']  = '新規メッセージを作成する';
 $labels['replytomessage']   = 'メッセージを返信する';
 $labels['replytoallmessage'] = '送信者とすべての受信者に返信する';
diff --git a/program/localization/ja/messages.inc b/program/localization/ja/messages.inc
index 3dcca72..4847bd4 100644
--- a/program/localization/ja/messages.inc
+++ b/program/localization/ja/messages.inc
@@ -36,6 +36,8 @@
 
 $messages['loadingdata'] = 'データを読み込み中です...';
 
+$messages['checkingmail'] = '新しいメッセージがあるように確認...';
+
 $messages['sendingmessage'] = 'メッセージの送信中です...';
 
 $messages['messagesent'] = 'メッセージの送信に成功しました。';
diff --git a/program/localization/pt_BR/labels.inc b/program/localization/pt_BR/labels.inc
index a396b64..1b9e641 100644
--- a/program/localization/pt_BR/labels.inc
+++ b/program/localization/pt_BR/labels.inc
@@ -90,6 +90,7 @@
 $labels['today'] = 'Hoje';
 
 // toolbar buttons
+$labels['checkmail']        = 'Verificar para ver se há mensagens novas';
 $labels['writenewmessage']  = 'Criar nova mensagem';
 $labels['replytomessage']   = 'Responder';
 $labels['replytoallmessage'] = 'Responder para todos';
diff --git a/program/localization/pt_BR/messages.inc b/program/localization/pt_BR/messages.inc
index ae3b702..fb33bcf 100644
--- a/program/localization/pt_BR/messages.inc
+++ b/program/localization/pt_BR/messages.inc
@@ -34,6 +34,8 @@
 
 $messages['loadingdata'] = 'Carregando informações...';
 
+$messages['checkingmail'] = 'Verificar para ver se há mensagens novas...';
+
 $messages['messagesent'] = 'Mensagem enviada';
 
 $messages['savingmessage'] = 'Mensagem do Saving...';
diff --git a/program/localization/pt_PT/labels.inc b/program/localization/pt_PT/labels.inc
index e692210..2a26c54 100644
--- a/program/localization/pt_PT/labels.inc
+++ b/program/localization/pt_PT/labels.inc
@@ -89,6 +89,7 @@
 $labels['today'] = 'Hoje';
 
 // toolbar buttons
+$labels['checkmail']        = 'Verificar para ver se há mensagens novas';
 $labels['writenewmessage']  = 'Criar nova mensagem';
 $labels['replytomessage']   = 'Responder';
 $labels['replytoallmessage'] = 'Responder para todos';
diff --git a/program/localization/pt_PT/messages.inc b/program/localization/pt_PT/messages.inc
index 377f965..b204ea4 100644
--- a/program/localization/pt_PT/messages.inc
+++ b/program/localization/pt_PT/messages.inc
@@ -35,6 +35,8 @@
 
 $messages['loadingdata'] = 'Carregando Informações...';
 
+$messages['checkingmail'] = 'Verificar para ver se há mensagens novas...';
+
 $messages['sendingmessage'] = 'A enviar mensagem...';
 
 $messages['messagesent'] = 'Mensagem enviada';
diff --git a/program/localization/ru/labels.inc b/program/localization/ru/labels.inc
index a434b05..6994037 100755
--- a/program/localization/ru/labels.inc
+++ b/program/localization/ru/labels.inc
@@ -91,6 +91,7 @@
 $labels['today'] = 'Сегодня';
 
 // toolbar buttons
+$labels['checkmail']        = 'Проверять для новых сообщений';
 $labels['writenewmessage']  = 'Новое сообщение';
 $labels['replytomessage']   = 'Ответить';
 $labels['replytoallmessage'] = 'Ответить всем';
diff --git a/program/localization/ru/messages.inc b/program/localization/ru/messages.inc
index 393d246..0d1f69f 100755
--- a/program/localization/ru/messages.inc
+++ b/program/localization/ru/messages.inc
@@ -36,6 +36,8 @@
 
 $messages['loadingdata'] = 'Загрузка данных...';
 
+$messages['checkingmail'] = 'Проверять для новых сообщений...';
+
 $messages['sendingmessage'] = 'Отправка сообщения...';
 
 $messages['messagesent'] = 'Сообщение отправлено';
diff --git a/program/steps/mail/check_recent.inc b/program/steps/mail/check_recent.inc
index 8a563c4..e51cbf8 100644
--- a/program/steps/mail/check_recent.inc
+++ b/program/steps/mail/check_recent.inc
@@ -9,40 +9,48 @@
  | Licensed under the GNU GPL                                            |
  |                                                                       |
  | PURPOSE:                                                              |
- |   Check for recent messages                                           |
+ |   Check for recent messages, in all mailboxes                         |
  |                                                                       |
  +-----------------------------------------------------------------------+
  | Author: Thomas Bruederli <roundcube@gmail.com>                        |
  +-----------------------------------------------------------------------+
 
- $Id$
+ $Id: check_recent.inc 233 2006-06-26 17:31:20Z richs $
 
 */
 
 $REMOTE_REQUEST = TRUE;
-$mbox_name = $IMAP->get_mailbox_name();
 
-if ($recent_count = $IMAP->messagecount(NULL, 'RECENT', TRUE))
+$a_mailboxes = $IMAP->list_mailboxes();
+
+foreach ($a_mailboxes as $mbox_name)
   {
-  $count = $IMAP->messagecount();
-  $unread_count = $IMAP->messagecount(NULL, 'UNSEEN', TRUE);
-    
-  $commands = sprintf("this.set_unread_count('%s', %d, true);\n", addslashes($mbox_name), $unread_count);
-  $commands .= sprintf("this.set_env('messagecount', %d);\n", $count);
-  $commands .= sprintf("this.set_rowcount('%s');\n", rcmail_get_messagecount_text());
-  $commands .= sprintf("this.set_quota('%s');\n", $IMAP->get_quota());
- 
-  // add new message headers to list
-  $a_headers = array();
-  for ($i=$recent_count, $id=$count-$recent_count+1; $i>0; $i--, $id++)
-    $a_headers[] = $IMAP->get_headers($id, NULL, FALSE);
-    
-  $commands .= rcmail_js_message_list($a_headers, TRUE);
+  if ($mbox_name == $IMAP->get_mailbox_name())
+    {
+    if ($recent_count = $IMAP->messagecount(NULL, 'RECENT', TRUE))
+      {
+      $count = $IMAP->messagecount();
+      $unread_count = $IMAP->messagecount(NULL, 'UNSEEN', TRUE);
+
+      $commands .= sprintf("this.set_unread_count('%s', %d, true);\n", addslashes($mbox_name), $unread_count);
+      $commands .= sprintf("this.set_env('messagecount', %d);\n", $count);
+      $commands .= sprintf("this.set_rowcount('%s');\n", rcmail_get_messagecount_text());
+      $commands .= sprintf("this.set_quota('%s');\n", $IMAP->get_quota());
+
+      // add new message headers to list
+      $a_headers = array();
+      for ($i=$recent_count, $id=$count-$recent_count+1; $i>0; $i--, $id++)
+        $a_headers[] = $IMAP->get_headers($id, NULL, FALSE);
+
+      $commands .= rcmail_js_message_list($a_headers, TRUE);
+      }
+    }
+  else
+    {
+    if ($IMAP->messagecount($mbox_name, 'RECENT'))
+      $commands .= sprintf("this.set_unread_count('%s', %d);\n", addslashes($mbox_name), $IMAP->messagecount($mbox_name, 'UNSEEN'));
+    }
   }
-
-if (strtoupper($mbox_name)!='INBOX' && $IMAP->messagecount('INBOX', 'RECENT'))
-  $commands = sprintf("this.set_unread_count('INBOX', %d);\n", $IMAP->messagecount('INBOX', 'UNSEEN'));
-
 
 rcube_remote_response($commands);
 ?>
diff --git a/program/steps/mail/func.inc b/program/steps/mail/func.inc
index 8eff11c..eac4e37 100644
--- a/program/steps/mail/func.inc
+++ b/program/steps/mail/func.inc
@@ -304,10 +304,10 @@
 
   // define list of cols to be displayed
   $a_show_cols = is_array($CONFIG['list_cols']) ? $CONFIG['list_cols'] : array('subject');
-  $a_sort_cols = array('subject', 'date', 'from', 'to');
+  $a_sort_cols = array('subject', 'date', 'from', 'to', 'size');
   
   // show 'to' instead of from in sent messages
-  if (strtolower($IMAP->get_mailbox_name())=='sent' && ($f = array_search('from', $a_show_cols))
+  if (($IMAP->get_mailbox_name()==$CONFIG['sent_mbox'] || $IMAP->get_mailbox_name()==$CONFIG['drafts_mbox']) && ($f = array_search('from', $a_show_cols))
       && !array_search('to', $a_show_cols))
     $a_show_cols[$f] = 'to';
   
diff --git a/program/steps/settings/manage_folders.inc b/program/steps/settings/manage_folders.inc
index 86b9bb7..dd321f0 100644
--- a/program/steps/settings/manage_folders.inc
+++ b/program/steps/settings/manage_folders.inc
@@ -19,7 +19,7 @@
 
 */
 
-// init IAMP connection
+// init IMAP connection
 rcmail_imap_init(TRUE);
 
 
@@ -60,6 +60,27 @@
     rcube_remote_response($commands);
     }
   else if (!$create)
+    show_message('errorsaving', 'error');
+  }
+
+// rename a mailbox
+else if ($_action=='rename-folder')
+  {
+  if (!empty($_GET['_folder_oldname']) && !empty($_GET['_folder_newname']))
+    $rename = $IMAP->rename_mailbox(get_input_value('_folder_oldname', RCUBE_INPUT_GET), trim(get_input_value('_folder_newname', RCUBE_INPUT_GET)), TRUE);
+
+  if ($rename && $REMOTE_REQUEST)
+    {
+    $commands = sprintf("this.add_folder_row('%s');", rep_specialchars_output($rename, 'js')); 
+    $commands .= sprintf("this.remove_folder_row('%s')", rep_specialchars_output($_GET['_folder_oldname'], 'js'));
+    rcube_remote_response($commands);
+    }
+  else if (!$rename && $REMOTE_REQUEST)
+    {
+    $commands = show_message('errorsaving', 'error');
+    rcube_remote_response($commands);
+    }
+  else if (!$rename)
     show_message('errorsaving', 'error');
   }
 
@@ -120,6 +141,9 @@
   // create list of available folders
   foreach ($a_unsubscribed as $i => $folder)
     {
+    if ($CONFIG['protect_default_folders'] == TRUE && in_array($folder,$CONFIG['default_imap_folders']))
+      continue;
+
     $zebra_class = $i%2 ? 'even' : 'odd';
     $folder_js = rep_specialchars_output($folder, 'js');
     $a_js_folders['rcmrow'.($i+1)] = $folder_js;
@@ -176,10 +200,50 @@
   return $out;
   }
 
+function rcube_rename_folder_form($attrib)
+  {
+  global $CONFIG, $IMAP, $JS_OBJECT_NAME;
+
+  list($form_start, $form_end) = get_form_tags($attrib, 'rename-folder');
+  unset($attrib['form']);
+
+  // return the complete edit form as table
+  $out = "$form_start\n";
+
+  $a_unsubscribed = $IMAP->list_unsubscribed();
+  $select_folder = new select(array('name' => '_folder_oldname', 'id' => 'rcmfd_oldfolder'));
+
+  foreach ($a_unsubscribed as $i => $folder)
+    {
+    if ($CONFIG['protect_default_folders'] == TRUE && in_array($folder,$CONFIG['default_imap_folders'])) 
+      continue;
+
+    $select_folder->add($folder);
+    }
+
+  $out .= $select_folder->show();
+
+  $out .= " to ";
+  $inputtwo = new textfield(array('name' => '_folder_newname'));
+  $out .= $inputtwo->show();
+
+  if (get_boolean($attrib['button']))
+    {
+    $button = new input_field(array('type' => 'button',
+                                    'value' => rcube_label('rename'),
+                                    'onclick' => "$JS_OBJECT_NAME.command('rename-folder',this.form)"));
+    $out .= $button->show();
+    }
+
+  $out .= "\n$form_end";
+
+  return $out;
+  }
+
 
 // add some labels to client
 rcube_add_label('deletefolderconfirm');
 
 
 parse_template('managefolders');
-?>
\ No newline at end of file
+?>
diff --git a/skins/default/common.css b/skins/default/common.css
index d133bec..6cec3cf 100755
--- a/skins/default/common.css
+++ b/skins/default/common.css
@@ -39,6 +39,7 @@
 a, a:active, a:visited
 {
   color: #000000;
+  outline: none;
 }
 
 a.button, a.button:visited, a.tab, a.tab:visited, a.axislist
diff --git a/skins/default/images/buttons/add_contact_sel.png b/skins/default/images/buttons/add_contact_sel.png
new file mode 100644
index 0000000..effa91a
--- /dev/null
+++ b/skins/default/images/buttons/add_contact_sel.png
Binary files differ
diff --git a/skins/default/images/buttons/add_sel.png b/skins/default/images/buttons/add_sel.png
new file mode 100644
index 0000000..a6d8197
--- /dev/null
+++ b/skins/default/images/buttons/add_sel.png
Binary files differ
diff --git a/skins/default/images/buttons/attach_sel.png b/skins/default/images/buttons/attach_sel.png
new file mode 100644
index 0000000..81a4700
--- /dev/null
+++ b/skins/default/images/buttons/attach_sel.png
Binary files differ
diff --git a/skins/default/images/buttons/back_sel.png b/skins/default/images/buttons/back_sel.png
new file mode 100644
index 0000000..b25acbf
--- /dev/null
+++ b/skins/default/images/buttons/back_sel.png
Binary files differ
diff --git a/skins/default/images/buttons/compose_sel.png b/skins/default/images/buttons/compose_sel.png
new file mode 100644
index 0000000..2efd8cb
--- /dev/null
+++ b/skins/default/images/buttons/compose_sel.png
Binary files differ
diff --git a/skins/default/images/buttons/contacts_sel.png b/skins/default/images/buttons/contacts_sel.png
new file mode 100644
index 0000000..20df77c
--- /dev/null
+++ b/skins/default/images/buttons/contacts_sel.png
Binary files differ
diff --git a/skins/default/images/buttons/delete_sel.png b/skins/default/images/buttons/delete_sel.png
new file mode 100644
index 0000000..b4c32c1
--- /dev/null
+++ b/skins/default/images/buttons/delete_sel.png
Binary files differ
diff --git a/skins/default/images/buttons/download_sel.png b/skins/default/images/buttons/download_sel.png
new file mode 100644
index 0000000..cfc44b3
--- /dev/null
+++ b/skins/default/images/buttons/download_sel.png
Binary files differ
diff --git a/skins/default/images/buttons/drafts_sel.png b/skins/default/images/buttons/drafts_sel.png
new file mode 100644
index 0000000..34419b8
--- /dev/null
+++ b/skins/default/images/buttons/drafts_sel.png
Binary files differ
diff --git a/skins/default/images/buttons/edit_contact_sel.png b/skins/default/images/buttons/edit_contact_sel.png
new file mode 100644
index 0000000..616d583
--- /dev/null
+++ b/skins/default/images/buttons/edit_contact_sel.png
Binary files differ
diff --git a/skins/default/images/buttons/forward_sel.png b/skins/default/images/buttons/forward_sel.png
new file mode 100644
index 0000000..90f67bb
--- /dev/null
+++ b/skins/default/images/buttons/forward_sel.png
Binary files differ
diff --git a/skins/default/images/buttons/inbox_sel.png b/skins/default/images/buttons/inbox_sel.png
new file mode 100644
index 0000000..89d661e
--- /dev/null
+++ b/skins/default/images/buttons/inbox_sel.png
Binary files differ
diff --git a/skins/default/images/buttons/next_sel.png b/skins/default/images/buttons/next_sel.png
new file mode 100644
index 0000000..77cb1b1
--- /dev/null
+++ b/skins/default/images/buttons/next_sel.png
Binary files differ
diff --git a/skins/default/images/buttons/previous_sel.png b/skins/default/images/buttons/previous_sel.png
new file mode 100644
index 0000000..d102a53
--- /dev/null
+++ b/skins/default/images/buttons/previous_sel.png
Binary files differ
diff --git a/skins/default/images/buttons/print_sel.png b/skins/default/images/buttons/print_sel.png
new file mode 100644
index 0000000..0ddaa31
--- /dev/null
+++ b/skins/default/images/buttons/print_sel.png
Binary files differ
diff --git a/skins/default/images/buttons/reply_sel.png b/skins/default/images/buttons/reply_sel.png
new file mode 100644
index 0000000..76f5eac
--- /dev/null
+++ b/skins/default/images/buttons/reply_sel.png
Binary files differ
diff --git a/skins/default/images/buttons/replyall_sel.png b/skins/default/images/buttons/replyall_sel.png
new file mode 100644
index 0000000..483436c
--- /dev/null
+++ b/skins/default/images/buttons/replyall_sel.png
Binary files differ
diff --git a/skins/default/images/buttons/send_sel.png b/skins/default/images/buttons/send_sel.png
new file mode 100644
index 0000000..fc3d133
--- /dev/null
+++ b/skins/default/images/buttons/send_sel.png
Binary files differ
diff --git a/skins/default/images/buttons/source_sel.png b/skins/default/images/buttons/source_sel.png
new file mode 100644
index 0000000..4749317
--- /dev/null
+++ b/skins/default/images/buttons/source_sel.png
Binary files differ
diff --git a/skins/default/images/buttons/spellcheck_sel.png b/skins/default/images/buttons/spellcheck_sel.png
new file mode 100644
index 0000000..8c24d6f
--- /dev/null
+++ b/skins/default/images/buttons/spellcheck_sel.png
Binary files differ
diff --git a/skins/default/templates/addressbook.html b/skins/default/templates/addressbook.html
index 96b5fbc..dcf9656 100644
--- a/skins/default/templates/addressbook.html
+++ b/skins/default/templates/addressbook.html
@@ -11,18 +11,18 @@
 <roundcube:include file="/includes/header.html" />
 
 <div id="abooktoolbar">
-<roundcube:button command="add" imageAct="/images/buttons/add_contact_act.png" imagePas="/images/buttons/add_contact_pas.png" width="32" height="32" title="newcontact" />
-<roundcube:button command="delete" imageAct="/images/buttons/delete_act.png" imagePas="/images/buttons/delete_pas.png" width="32" height="32" title="deletecontact" />
-<roundcube:button command="compose" imageAct="/images/buttons/compose_act.png" imagePas="/images/buttons/compose_pas.png" width="32" height="32" title="composeto" />
-<roundcube:button command="print" imageAct="/images/buttons/print_act.png" imagePas="/images/buttons/print_pas.png" width="32" height="32" title="print" />
-<roundcube:button command="export" imageAct="/images/buttons/download_act.png" imagePas="/images/buttons/download_pas.png" width="32" height="32" title="export" />
-<roundcube:button command="ldappublicsearch" imageAct="/images/buttons/contacts_act.png" imagePas="/images/buttons/contacts_pas.png" width="32" height="32" title="ldapsearch" />
+<roundcube:button command="add" imageSel="/images/buttons/add_contact_sel.png" imageAct="/images/buttons/add_contact_act.png" imagePas="/images/buttons/add_contact_pas.png" width="32" height="32" title="newcontact" />
+<roundcube:button command="delete" imageSel="/images/buttons/delete_sel.png" imageAct="/images/buttons/delete_act.png" imagePas="/images/buttons/delete_pas.png" width="32" height="32" title="deletecontact" />
+<roundcube:button command="compose" imageSel="/images/buttons/compose_sel.png" imageAct="/images/buttons/compose_act.png" imagePas="/images/buttons/compose_pas.png" width="32" height="32" title="composeto" />
+<roundcube:button command="print" imageSel="/images/buttons/print_sel.png" imageAct="/images/buttons/print_act.png" imagePas="/images/buttons/print_pas.png" width="32" height="32" title="print" />
+<roundcube:button command="export" imageSel="/images/buttons/download_sel.png" imageAct="/images/buttons/download_act.png" imagePas="/images/buttons/download_pas.png" width="32" height="32" title="export" />
+<roundcube:button command="ldappublicsearch" imageSel="/images/buttons/contacts_sel.png" imageAct="/images/buttons/contacts_act.png" imagePas="/images/buttons/contacts_pas.png" width="32" height="32" title="ldapsearch" />
 </div>
 
 <div id="abookcountbar">
-<roundcube:button command="previouspage" imageAct="/images/buttons/previous_act.png" imagePas="/images/buttons/previous_pas.png" width="11" height="11" title="previouspage" />
+<roundcube:button command="previouspage" imageSel="/images/buttons/previous_sel.png" imageAct="/images/buttons/previous_act.png" imagePas="/images/buttons/previous_pas.png" width="11" height="11" title="previouspage" />
 &nbsp;<roundcube:object name="recordsCountDisplay" />&nbsp;
-<roundcube:button command="nextpage" imageAct="/images/buttons/next_act.png" imagePas="/images/buttons/next_pas.png" width="11" height="11" title="nextpage" />
+<roundcube:button command="nextpage" imageSel="/images/buttons/next_sel.png" imageAct="/images/buttons/next_act.png" imagePas="/images/buttons/next_pas.png" width="11" height="11" title="nextpage" />
 </div>
 
 <div id="addresslist">
diff --git a/skins/default/templates/compose.html b/skins/default/templates/compose.html
index 0544d7a..ab8b0ce 100644
--- a/skins/default/templates/compose.html
+++ b/skins/default/templates/compose.html
@@ -38,12 +38,12 @@
 <form name="form" action="./" method="post">
 
 <div id="messagetoolbar">
-<roundcube:button command="list" image="/images/buttons/back_act.png" width="32" height="32" title="backtolist" />
-<roundcube:button command="send" imageAct="/images/buttons/send_act.png" imagePas="/images/buttons/send_pas.png" width="32" height="32" title="sendmessage" />
-<!--<roundcube:button command="contacts" imageAct="/images/buttons/contacts_act.png" imagePas="/images/buttons/contacts_pas.png" width="32" height="32" title="addressbook" />-->
-<roundcube:button command="spellcheck" imageAct="/images/buttons/spellcheck_act.png" imagePas="/images/buttons/spellcheck_pas.png" width="32" height="32" title="checkspelling" />
-<roundcube:button command="add-attachment" imageAct="/images/buttons/attach_act.png" imagePas="/images/buttons/attach_pas.png" width="32" height="32" title="addattachment" />
-<roundcube:button command="savedraft" imageAct="/images/buttons/drafts_act.png" imagePas="/images/buttons/drafts_pas.png" width="32" height="32" title="savemessage" />
+<roundcube:button command="list" image="/images/buttons/back_act.png" imageSel="/images/buttons/back_sel.png" imageAct="/images/buttons/back_act.png" width="32" height="32" title="backtolist" />
+<roundcube:button command="send" imageSel="/images/buttons/send_sel.png" imageAct="/images/buttons/send_act.png" imagePas="/images/buttons/send_pas.png" width="32" height="32" title="sendmessage" />
+<!--<roundcube:button command="contacts" imageSel="/images/buttons/contacts_sel.png" imageAct="/images/buttons/contacts_act.png" imagePas="/images/buttons/contacts_pas.png" width="32" height="32" title="addressbook" />-->
+<roundcube:button command="spellcheck" imageSel="/images/buttons/spellcheck_sel.png" imageAct="/images/buttons/spellcheck_act.png" imagePas="/images/buttons/spellcheck_pas.png" width="32" height="32" title="checkspelling" />
+<roundcube:button command="add-attachment" imageSel="/images/buttons/attach_sel.png" imageAct="/images/buttons/attach_act.png" imagePas="/images/buttons/attach_pas.png" width="32" height="32" title="addattachment" />
+<roundcube:button command="savedraft" imageSel="/images/buttons/drafts_sel.png" imageAct="/images/buttons/drafts_act.png" imagePas="/images/buttons/drafts_pas.png" width="32" height="32" title="savemessage" />
 
 <div id="priority-selector">
 <roundcube:label name="priority" />:&nbsp;<roundcube:object name="prioritySelector" form="form" />
@@ -113,7 +113,7 @@
 <div id="compose-attachments">
 <div><roundcube:label name="attachments" /></div>
 <roundcube:object name="composeAttachmentList" />
-<p><roundcube:button command="add-attachment" imagePas="/images/buttons/add_pas.png" imageAct="/images/buttons/add_act.png" width="23" height="18" title="addattachment" />
+<p><roundcube:button command="add-attachment" imagePas="/images/buttons/add_pas.png" imageSel="/images/buttons/add_sel.png" imageAct="/images/buttons/add_act.png" width="23" height="18" title="addattachment" />
 </div>
 
 </form>
diff --git a/skins/default/templates/mail.html b/skins/default/templates/mail.html
index 2e8f38b..c2e5316 100644
--- a/skins/default/templates/mail.html
+++ b/skins/default/templates/mail.html
@@ -11,12 +11,13 @@
 <roundcube:include file="/includes/header.html" />
 
 <div id="messagetoolbar">
-<roundcube:button command="compose" imageAct="/images/buttons/compose_act.png" imagePas="/images/buttons/compose_pas.png" width="32" height="32" title="writenewmessage" />
-<roundcube:button command="reply" imageAct="/images/buttons/reply_act.png" imagePas="/images/buttons/reply_pas.png" width="32" height="32" title="replytomessage" />
-<roundcube:button command="reply-all" imageAct="/images/buttons/replyall_act.png" imagePas="/images/buttons/replyall_pas.png" width="32" height="32" title="replytoallmessage" />
-<roundcube:button command="forward" imageAct="/images/buttons/forward_act.png" imagePas="/images/buttons/forward_pas.png" width="32" height="32" title="forwardmessage" />
-<roundcube:button command="delete" imageAct="/images/buttons/delete_act.png" imagePas="/images/buttons/delete_pas.png" width="32" height="32" title="deletemessage" />
-<roundcube:button command="print" imageAct="/images/buttons/print_act.png" imagePas="/images/buttons/print_pas.png" width="32" height="32" title="printmessage" />
+<roundcube:button command="checkmail" imageSel="/images/buttons/inbox_sel.png" imageAct="/images/buttons/inbox_act.png" imagePas="/images/buttons/inbox_pas.png" width="32" height="32" title="checkmail" />
+<roundcube:button command="compose" imageSel="/images/buttons/compose_sel.png" imageAct="/images/buttons/compose_act.png" imagePas="/images/buttons/compose_pas.png" width="32" height="32" title="writenewmessage" />
+<roundcube:button command="reply" imageSel="/images/buttons/reply_sel.png" imageAct="/images/buttons/reply_act.png" imagePas="/images/buttons/reply_pas.png" width="32" height="32" title="replytomessage" />
+<roundcube:button command="reply-all" imageSel="/images/buttons/replyall_sel.png" imageAct="/images/buttons/replyall_act.png" imagePas="/images/buttons/replyall_pas.png" width="32" height="32" title="replytoallmessage" />
+<roundcube:button command="forward" imageSel="/images/buttons/forward_sel.png" imageAct="/images/buttons/forward_act.png" imagePas="/images/buttons/forward_pas.png" width="32" height="32" title="forwardmessage" />
+<roundcube:button command="delete" imageSel="/images/buttons/delete_sel.png" imageAct="/images/buttons/delete_act.png" imagePas="/images/buttons/delete_pas.png" width="32" height="32" title="deletemessage" />
+<roundcube:button command="print" imageSel="/images/buttons/print_sel.png" imageAct="/images/buttons/print_act.png" imagePas="/images/buttons/print_pas.png" width="32" height="32" title="printmessage" />
 </div>
 
 <div id="quicksearchbar">
@@ -24,9 +25,9 @@
 </div>
 
 <div id="messagecountbar">
-<roundcube:button command="previouspage" imageAct="/images/buttons/previous_act.png" imagePas="/images/buttons/previous_pas.png" width="11" height="11" title="previousmessages" />
+<roundcube:button command="previouspage" imageSel="/images/buttons/previous_sel.png" imageAct="/images/buttons/previous_act.png" imagePas="/images/buttons/previous_pas.png" width="11" height="11" title="previousmessages" />
 &nbsp;<roundcube:object name="messageCountDisplay" />&nbsp;
-<roundcube:button command="nextpage" imageAct="/images/buttons/next_act.png" imagePas="/images/buttons/next_pas.png" width="11" height="11" title="nextmessages" />
+<roundcube:button command="nextpage" imageSel="/images/buttons/next_sel.png" imageAct="/images/buttons/next_act.png" imagePas="/images/buttons/next_pas.png" width="11" height="11" title="nextmessages" />
 </div>
 
 <div id="mailboxlist-header"><roundcube:label name="mailboxlist" /></div>
diff --git a/skins/default/templates/managefolders.html b/skins/default/templates/managefolders.html
index e3d6be0..a94d738 100644
--- a/skins/default/templates/managefolders.html
+++ b/skins/default/templates/managefolders.html
@@ -28,6 +28,17 @@
 <roundcube:button command="create-folder" type="input" class="button" label="create" />
 </div>
 </div>
+
+<div class="settingsbox">
+<div class="boxtitle"><roundcube:label name="renamefolder" /></div>
+
+<div class="settingspart">
+<roundcube:label name="foldername" />:&nbsp;
+<roundcube:object name="renamefolder" form="subscriptionform" />
+<roundcube:button command="rename-folder" type="input" class="button" label="rename" />
+</div>
+</div>
+
 </div>
 
 </form>
diff --git a/skins/default/templates/message.html b/skins/default/templates/message.html
index d0540e7..f802b5a 100644
--- a/skins/default/templates/message.html
+++ b/skins/default/templates/message.html
@@ -11,20 +11,20 @@
 <roundcube:include file="/includes/header.html" />
 
 <div id="messagecountbar">
-<roundcube:button command="previousmessage" imageAct="/images/buttons/previous_act.png" imagePas="/images/buttons/previous_pas.png" width="11" height="11" title="previousmessages" />
+<roundcube:button command="previousmessage" imageSel="/images/buttons/previous_sel.png" imageAct="/images/buttons/previous_act.png" imagePas="/images/buttons/previous_pas.png" width="11" height="11" title="previousmessages" />
 &nbsp;<roundcube:object name="messageCountDisplay" />&nbsp;
-<roundcube:button command="nextmessage" imageAct="/images/buttons/next_act.png" imagePas="/images/buttons/next_pas.png" width="11" height="11" title="nextmessages" />
+<roundcube:button command="nextmessage" imageSel="/images/buttons/next_sel.png" imageAct="/images/buttons/next_act.png" imagePas="/images/buttons/next_pas.png" width="11" height="11" title="nextmessages" />
 </div>
 
 <div id="messagetoolbar">
-<roundcube:button command="list" image="/images/buttons/back_act.png" width="32" height="32" title="backtolist" />
-<roundcube:button command="compose" imageAct="/images/buttons/compose_act.png" imagePas="/images/buttons/compose_pas.png" width="32" height="32" title="writenewmessage" />
-<roundcube:button command="reply" imageAct="/images/buttons/reply_act.png" imagePas="/images/buttons/reply_pas.png" width="32" height="32" title="replytomessage" />
-<roundcube:button command="reply-all" imageAct="/images/buttons/replyall_act.png" imagePas="/images/buttons/replyall_pas.png" width="32" height="32" title="replytoallmessage" />
-<roundcube:button command="forward" imageAct="/images/buttons/forward_act.png" imagePas="/images/buttons/forward_pas.png" width="32" height="32" title="forwardmessage" />
-<roundcube:button command="delete" imageAct="/images/buttons/delete_act.png" imagePas="/images/buttons/delete_pas.png" width="32" height="32" title="deletemessage" />
-<roundcube:button command="print" imageAct="/images/buttons/print_act.png" imagePas="/images/buttons/print_pas.png" width="32" height="32" title="printmessage" />
-<roundcube:button command="viewsource" imageAct="/images/buttons/source_act.png" imagePas="/images/buttons/source_pas.png" width="32" height="32" title="viewsource" />
+<roundcube:button command="list" image="/images/buttons/back_act.png" imageSel="/images/buttons/back_sel.png" imageAct="/images/buttons/back_act.png" width="32" height="32" title="backtolist" />
+<roundcube:button command="compose" imageSel="/images/buttons/compose_sel.png" imageAct="/images/buttons/compose_act.png" imagePas="/images/buttons/compose_pas.png" width="32" height="32" title="writenewmessage" />
+<roundcube:button command="reply" imageSel="/images/buttons/reply_sel.png" imageAct="/images/buttons/reply_act.png" imagePas="/images/buttons/reply_pas.png" width="32" height="32" title="replytomessage" />
+<roundcube:button command="reply-all" imageSel="/images/buttons/replyall_sel.png" imageAct="/images/buttons/replyall_act.png" imagePas="/images/buttons/replyall_pas.png" width="32" height="32" title="replytoallmessage" />
+<roundcube:button command="forward" imageSel="/images/buttons/forward_sel.png" imageAct="/images/buttons/forward_act.png" imagePas="/images/buttons/forward_pas.png" width="32" height="32" title="forwardmessage" />
+<roundcube:button command="delete" imageSel="/images/buttons/delete_sel.png" imageAct="/images/buttons/delete_act.png" imagePas="/images/buttons/delete_pas.png" width="32" height="32" title="deletemessage" />
+<roundcube:button command="print" imageSel="/images/buttons/print_sel.png" imageAct="/images/buttons/print_act.png" imagePas="/images/buttons/print_pas.png" width="32" height="32" title="printmessage" />
+<roundcube:button command="viewsource" imageSel="/images/buttons/source_sel.png" imageAct="/images/buttons/source_act.png" imagePas="/images/buttons/source_pas.png" width="32" height="32" title="viewsource" />
 <roundcube:object name="mailboxlist" type="select" noSelection="moveto" maxlength="25" onchange="rcmail.command('moveto', this.options[this.selectedIndex].value)" class="mboxlist" />
 </div>
 

--
Gitblit v1.9.1