Index: modules/block/block.module
===================================================================
RCS file: /cvs/drupal/drupal/modules/block/block.module,v
retrieving revision 1.345
diff -u -p -r1.345 block.module
--- modules/block/block.module	12 Jun 2009 09:02:55 -0000	1.345
+++ modules/block/block.module	22 Jun 2009 22:57:49 -0000
@@ -135,21 +135,21 @@ function block_menu() {
     'title' => 'JavaScript List Form',
     'page callback' => 'block_admin_display_js',
     'access arguments' => array('administer blocks'),
-    'type' => MENU_CALLBACK,
+    'hidden' => MENU_LINK_DISABLED,
   );
   $items['admin/build/block/configure'] = array(
     'title' => 'Configure block',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('block_admin_configure'),
     'access arguments' => array('administer blocks'),
-    'type' => MENU_CALLBACK,
+    'hidden' => MENU_LINK_DISABLED,
   );
   $items['admin/build/block/delete'] = array(
     'title' => 'Delete block',
     'page callback' => 'drupal_get_form',
     'page arguments' => array('block_box_delete'),
     'access arguments' => array('administer blocks'),
-    'type' => MENU_CALLBACK,
+    'hidden' => MENU_LINK_DISABLED,
   );
   $items['admin/build/block/add'] = array(
     'title' => 'Add block',
@@ -172,6 +172,43 @@ function block_menu() {
   return $items;
 }
 
+/** 
+ * Implementaiton of hook_menu_local_task()
+ */
+function block_menu_local_task($item) {
+  $tasks = array();
+  
+  if (count($item['link_map']) >= 3 && $item['link_map'][0] === 'admin' && $item['link_map'][1] === 'build' && $item['link_map'][2] === 'block') {
+    if (user_access('administer blocks')) {
+      $tasks["admin/build/block"] = array(
+        'title' => 'List',
+        'description' => 'Configure what block content appears in your site\'s sidebars and other regions.',
+        'weight' => -10,
+      );
+
+      $tasks["admin/build/block/add"] = array(
+        'title' => 'Add block',
+      );
+    }
+    
+    if (!isset($item['link_map'][3]) || $item['link_map'][3] !== 'add') {
+      $default = variable_get('theme_default', 'garland');
+      foreach (list_themes() as $key => $theme) {
+        if (_block_themes_access($theme)) {
+          $tasks['admin/build/block/list/' . $key] = array(
+            'title' => check_plain($theme->info['name']),
+            'default' => ($key == $default),
+            'weight' => $key == $default ? -10 : 0,
+            'parent' => 'admin/build/block',
+          );
+        }
+      }
+    }
+  }
+  
+  return $tasks;
+}
+
 /**
  * Menu item access callback - only admin or enabled themes can be accessed.
  */
