Index: privatemsg.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/privatemsg/privatemsg.module,v
retrieving revision 1.70.2.30.2.91.2.64.2.38
diff -u -p -r1.70.2.30.2.91.2.64.2.38 privatemsg.module
--- privatemsg.module	7 Dec 2009 18:43:48 -0000	1.70.2.30.2.91.2.64.2.38
+++ privatemsg.module	7 Dec 2009 19:11:59 -0000
@@ -166,7 +166,7 @@ function privatemsg_menu() {
     'page arguments'   => array('privatemsg_new', 2, 3, NULL),
     'access callback'  => 'privatemsg_user_access',
     'access arguments' => array('write privatemsg'),
-    'type'             => MENU_LOCAL_TASK,
+    'type'             => MENU_LOCAL_ACTION,
     'weight'           => -3,
     'menu_name'        => 'user-menu',
   );
@@ -215,6 +215,22 @@ function privatemsg_menu() {
 }
 
 /**
+ * Implements hook_menu_local_tasks_alter().
+ */
+function privatemsg_menu_local_tasks_alter(&$data, $router_item, $root_path) {
+  // Add action link to 'node/add' on 'admin/content' page.
+  if (substr($root_path, 0, 9) == 'messages/') {
+    $item = menu_get_item('messages/new');
+    if ($item['access']) {
+      $data['actions']['output'][] = array(
+        '#theme' => 'menu_local_action',
+        '#link' => $item,
+      );
+    }
+  }
+}
+
+/**
  * Privatemsg  wrapper for user_access.
  *
  * Never allows anonymous user access as that doesn't makes sense.
