Index: modules/toolbar/toolbar.css
===================================================================
RCS file: /cvs/drupal/drupal/modules/toolbar/toolbar.css,v
retrieving revision 1.5
diff -u -r1.5 toolbar.css
--- modules/toolbar/toolbar.css	17 Oct 2009 00:51:53 -0000	1.5
+++ modules/toolbar/toolbar.css	17 Oct 2009 19:41:59 -0000
@@ -41,6 +41,7 @@
 
 div#toolbar .collapsed {
   display: none;
+  visibility: hidden;
 }  
 
 div#toolbar div.shadow {
@@ -84,7 +85,7 @@
   left: 10px;
 }
 
-div#toolbar div.toolbar-menu span.toggle {
+div#toolbar div.toolbar-menu a.toggle {
   position: absolute;
   right: 10px;
   cursor: pointer;
@@ -95,7 +96,7 @@
   height: 25px;
 }
 
-div#toolbar div.toolbar-menu span.toggle-active {
+div#toolbar div.toolbar-menu a.toggle-active {
   background-position:  -25px -60px;
 }
 
Index: modules/toolbar/toolbar.js
===================================================================
RCS file: /cvs/drupal/drupal/modules/toolbar/toolbar.js,v
retrieving revision 1.7
diff -u -r1.7 toolbar.js
--- modules/toolbar/toolbar.js	17 Oct 2009 00:51:53 -0000	1.7
+++ modules/toolbar/toolbar.js	17 Oct 2009 21:26:58 -0000
@@ -7,11 +7,11 @@
 Drupal.behaviors.admin = {
   attach: function(context) {
 
-    // Set the intial state of the toolbar.
+    // Set the initial state of the toolbar.
     $('#toolbar', context).once('toolbar', Drupal.admin.toolbar.init);
 
     // Toggling toolbar drawer.
-    $('#toolbar span.toggle', context).once('toolbar-toggle').click(function() {
+    $('#toolbar a.toggle', context).once('toolbar-toggle').click(function() {
       Drupal.admin.toolbar.toggle();
       return false;
     });
@@ -44,8 +44,12 @@
  * Collapse the admin toolbar.
  */
 Drupal.admin.toolbar.collapse = function() {
+  var toggle_text = Drupal.t('Open the drawer');
   $('#toolbar div.toolbar-drawer').addClass('collapsed');
-  $('#toolbar span.toggle').removeClass('toggle-active');
+  $('#toolbar a.toggle')
+    .removeClass('toggle-active')
+    .attr('title',  toggle_text)
+    .html(toggle_text);
   $('body').removeClass('toolbar-drawer');
   $.cookie(
     'Drupal.admin.toolbar.collapsed', 
@@ -58,8 +62,12 @@
  * Expand the admin toolbar.
  */
 Drupal.admin.toolbar.expand = function() {
+  var toggle_text = Drupal.t('Close the drawer');
   $('#toolbar div.toolbar-drawer').removeClass('collapsed');
-  $('#toolbar span.toggle').addClass('toggle-active');
+  $('#toolbar a.toggle')
+    .addClass('toggle-active')
+    .attr('title',  toggle_text)
+    .html(toggle_text);
   $('body').addClass('toolbar-drawer');
   $.cookie(
     'Drupal.admin.toolbar.collapsed', 
@@ -72,7 +80,7 @@
  * Toggle the admin toolbar.
  */
 Drupal.admin.toolbar.toggle = function() {
-  if ($('#toolbar .toolbar-drawer').is('.collapsed')) {
+  if ($('#toolbar div.toolbar-drawer').hasClass('collapsed')) {
     Drupal.admin.toolbar.expand();
   }
   else {
Index: modules/toolbar/toolbar.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/toolbar/toolbar.module,v
retrieving revision 1.14
diff -u -r1.14 toolbar.module
--- modules/toolbar/toolbar.module	17 Oct 2009 00:51:53 -0000	1.14
+++ modules/toolbar/toolbar.module	17 Oct 2009 21:30:11 -0000
@@ -27,10 +27,78 @@
     'template' => 'toolbar',
     'path' => drupal_get_path('module', 'toolbar'),
   );
+  $items['toolbar_toggle'] = array(
+    'arguments' => array(
+      'collapsed' => NULL,
+      'attributes' => array(),
+    ),
+  );
+  return $items;
+}
+
+/**
+ * Implement hook_menu().
+ */
+function toolbar_menu() {
+  $items['toolbar/toggle'] = array(
+    'title' => 'Toggle drawer visibility',
+    'type' => MENU_CALLBACK,
+    'page callback' => 'toolbar_toggle_page',
+    'access arguments' => array('access toolbar'),
+  );
   return $items;
 }
 
 /**
+ * Menu callback; toggles the visibility of the toolbar drawer.
+ */
+function toolbar_toggle_page() {
+  global $base_path;
+  // Toggle the value in the cookie.
+  setcookie('Drupal.admin.toolbar.collapsed', !_toolbar_is_collapsed(), NULL, $base_path);
+  // Redirect the user from where he used the toggle element.
+  drupal_goto();
+}
+
+/**
+ * Formats an element used to toggle the visibility of the shortcut links.
+ * 
+ * @param $collapsed
+ *   A boolean value indicating the current state of the visibility of the
+ *   shortcut links.
+ * @param $attributes
+ *   An associative array of HTML attributes.
+ * @return
+ *   An HTML string representing the element for toggling.
+ *
+ * @ingroup themable
+ */
+function theme_toolbar_toggle($variables) {
+  if ($variables['collapsed']) {
+    $toggle_text = t('Open the drawer');
+    return '<a href="' . url('toolbar/toggle', array('query' => drupal_get_destination())) . '" title="' . $toggle_text . '"' .  drupal_attributes($variables['attributes']) . '>' . $toggle_text . '</a>';
+  }
+  else {
+    $toggle_text = t('Close the drawer');
+    $variables['attributes']['class'][] = 'toggle-active';
+    return '<a href="' . url('toolbar/toggle', array('query' => drupal_get_destination())) . '" title="' . $toggle_text . '"' .  drupal_attributes($variables['attributes']) . '>' . $toggle_text . '</a>';
+  }
+}
+
+/**
+ * Determines if the shortcut links are currently collapsed, if they are not it
+ * means they are expanded.
+ * 
+ * @return
+ *   TRUE when the shortcut links are collapsed, FALSE when they are expanded.
+ */
+function _toolbar_is_collapsed() {
+  // PHP converts dots into underscores in cookie names to avoid problems with
+  // its parser, so we use a converted cookie name.
+  return isset($_COOKIE['Drupal_admin_toolbar_collapsed']) ? $_COOKIE['Drupal_admin_toolbar_collapsed'] : 0;
+}
+
+/**
  * Implement hook_page_build().
  * 
  * Add admin toolbar to the page_top region automatically.
@@ -49,7 +117,10 @@
  */
 function toolbar_preprocess_html(&$vars) {
   if (user_access('access toolbar')) {
-    $vars['classes_array'][] = 'toolbar toolbar-drawer';
+    $vars['classes_array'][] = 'toolbar';
+    if (!_toolbar_is_collapsed()) {
+      $vars['classes_array'][] = 'toolbar-drawer';
+    }
   }
 }
 
@@ -78,11 +149,13 @@
   );
 
   // Retrieve the admin menu from the database.
+  $main_menu = menu_load('management');
   $links = toolbar_menu_navigation_links(toolbar_get_menu_tree());
   $build['toolbar_menu'] = array(
     '#theme' => 'links',
     '#links' => $links,
     '#attributes' => array('id' => 'toolbar-menu'),
+    '#heading' => array('text' => $main_menu['title'], 'level' => 'h2', 'class' => 'element-invisible'),
   );
 
   // Add logout & user account links
@@ -101,6 +174,24 @@
     ),
     '#attributes' => array('id' => 'toolbar-user'),
   );
+
+  // Add an anchor to be able to toggle the visibility of the drawer.
+  $build['toolbar_toggle'] = array(
+    '#theme' => 'toolbar_toggle',
+    '#collapsed' => _toolbar_is_collapsed(),
+    '#attributes' => array('class' => array('toggle')),
+  );
+
+  // Prepare the drawer links CSS classes.
+  $toolbar_drawer_classes = array(
+    'toolbar-drawer',
+    'clearfix',
+  );
+  if(_toolbar_is_collapsed()) {
+    $toolbar_drawer_classes[] = 'collapsed';
+  }
+  $build['toolbar_drawer_classes'] = implode(' ', $toolbar_drawer_classes);
+
   return $build;
 }
 
Index: modules/toolbar/toolbar.tpl.php
===================================================================
RCS file: /cvs/drupal/drupal/modules/toolbar/toolbar.tpl.php,v
retrieving revision 1.5
diff -u -r1.5 toolbar.tpl.php
--- modules/toolbar/toolbar.tpl.php	17 Oct 2009 00:51:53 -0000	1.5
+++ modules/toolbar/toolbar.tpl.php	17 Oct 2009 21:21:53 -0000
@@ -16,14 +16,14 @@
 ?>
 <div id="toolbar" class="clearfix">
   <div class="toolbar-menu clearfix">
+    <?php print render($toolbar['toolbar_user']); ?>
+    <?php print render($toolbar['toolbar_menu']); ?>
     <?php if ($toolbar['toolbar_drawer']):?>
-      <span class="toggle toggle-active"><?php print t('Open'); ?></span>
+      <?php print render($toolbar['toolbar_toggle']); ?>
     <?php endif; ?>
-    <?php print render($toolbar['toolbar_menu']); ?>
-    <?php print render($toolbar['toolbar_user']); ?>
   </div>
 
-  <div class="toolbar-drawer clearfix">
+  <div class="<?php echo $toolbar['toolbar_drawer_classes']; ?>">
     <?php print render($toolbar['toolbar_drawer']); ?>
   </div>
 
