diff -urp --strip-trailing-cr ../category/category.admin.inc ./category.admin.inc
--- ../category/category.admin.inc	2009-08-05 06:52:53.000000000 +0200
+++ ./category.admin.inc	2009-09-21 23:36:39.000000000 +0200
@@ -60,7 +60,7 @@ function category_overview_containers(&$
     }
     $form[$container->cid]['edit'] = array('#value' => l(t('edit container'), "node/$container->cid/edit", array('query' => $destination)));
     $form[$container->cid]['list'] = array('#value' => l(t('list categories'), "admin/content/category/$container->cid"));
-    $form[$container->cid]['add'] = array('#value' => l(t('add categories'), "admin/content/category/$container->cid/add/category"));
+    $form[$container->cid]['add'] = array('#value' => l(t('add categories'), "admin/content/category/$container->cid/add"));
   }
 
   // Only make this form include a submit button and weight if more than one
@@ -679,68 +679,46 @@ function theme_category_overview_categor
 }
 
 /**
- * Menu callback; presents a list of all node types with container behavior,
+ * Menu callback; presents a list of all node types with necessary behavior,
  * and for each one, outputs a link to its 'node add' page. If there is only
- * one node type with container behavior, then the user is immediately
- * redirected to the 'node add' page for that node type.
+ * one node type with that behavior, then the user is immediately redirected
+ * to the 'node add' page for that node type.
  */
-function category_add_container_page() {
-  $items = array();
-  $destination = 'admin/content/category';
-  $url = NULL;
-  foreach (node_get_types() as $type) {
-    $behavior = variable_get('category_behavior_'. $type->type, 0);
-    if (!empty($behavior) && $behavior == 'container') {
-      $url = 'node/add/'. str_replace('_', '-', $type->type);
-      $items[] = l($type->name, $url, array('query' => array('destination' => $destination)));
-    }
-  }
-
-  if (empty($items)) {
-    category_no_node_types();
+function category_add_page($cnid = NULL) {
+  if (!isset($cnid)) {
+    $behavior = 'container';
+    $query = array('destination' => 'admin/content/category');
   }
-  if (count($items) == 1) {
-    drupal_goto($url, 'destination='. $destination);
+  else {
+    $behavior = 'category';
+    $query = array('destination' => 'admin/content/category/'. $cnid, 'parent' => $cnid);
   }
-  return theme('item_list', $items);
-}
+  $types = _category_category_type_options($cnid);
 
-/**
- * Prints a warning message, indicating that there are no node types with
- * category or container behavior available.
- */
-function category_no_node_types($behavior = 'container') {
-  drupal_set_message(t('There are no content types with @behavior behavior available'. ($behavior == 'category' ? ' for use with this container' : '') .'. In order to create a @behavior, you must first go to the !content-types page, and assign @behavior behavior to one or more of your content types.', array('!content-types' => l(t('administer content types'), 'admin/content/types'), '@behavior' => $behavior)), 'warning');
-}
+  // For category additions, highlight the default node type selected for
+  // this container, and put it to the top of the list.
+  if ($behavior == 'category' && $container = category_get_container($cnid)) {
+    $default_type = $container->default_category_type;
+    if (isset($types[$default_type])) {
+      $name = $types[$default_type] .' '. t('(default)');
+      unset($types[$default_type]);
+      $types = array($default_type => $name) + $types;
+    }
+  }
 
-/**
- * Menu callback; presents a list of all node types with container behavior,
- * and for each one, outputs a link to its 'node add' page. If there is only
- * one node type with container behavior, then the user is immediately
- * redirected to the 'node add' page for that node type.
- */
-function category_add_category_page($cnid) {
+  // Build the list of links.
   $items = array();
-  $destination = 'admin/content/category/'. $cnid;
   $url = NULL;
-  foreach (node_get_types() as $type) {
-    $behavior = variable_get('category_behavior_'. $type->type, 0);
-    if (!empty($behavior) && $behavior == 'category') {
-      $allowed_containers = variable_get('category_allowed_containers_'. $type->type, array());
-      if (empty($allowed_containers) || in_array($cnid, $allowed_containers)) {
-        $url = 'node/add/'. str_replace('_', '-', $type->type);
-        $items[] = l($type->name, $url, array('query' => array('destination' => $destination, 'parent' => $cnid)));
-      }
-    }
+  foreach ($types as $type => $name) {
+    $url = 'node/add/'. str_replace('_', '-', $type);
+    $items[] = l($name, $url, array('query' => $query));
   }
 
-  if (empty($items)) {
-    category_no_node_types('category');
-  }
+  // Redirect if only one item is available, otherwise render the list.
   if (count($items) == 1) {
-    drupal_goto($url, 'destination='. $destination .'&parent='. $cnid);
+    drupal_goto($url, $query);
   }
-  return theme('item_list', $items);
+  return theme('item_list', $items, t('Please choose a content type for the new %item:', array('%item' => $behavior)));
 }
 
 function category_wrapper_admin_page() {
diff -urp --strip-trailing-cr ../category/category.install ./category.install
--- ../category/category.install	2009-08-05 06:58:56.000000000 +0200
+++ ./category.install	2009-09-20 21:14:39.000000000 +0200
@@ -332,6 +332,13 @@ function category_schema() {
         'size' => 'tiny',
         'description' => 'Whether or not free tagging is enabled for the container. (0 = disabled, 1 = enabled)',
       ),
+      'default_category_type' => array(
+        'type' => 'varchar',
+        'length' => 32,
+        'not null' => TRUE,
+        'default' => 'category',
+        'description' => 'Node type to be used for newly created categories within this container, if no user input given (such as freetagging and legacy Taxonomy operations).',
+      ),
       'hidden_cont' => array(
         'type' => 'int',
         'unsigned' => TRUE,
@@ -559,3 +566,21 @@ function category_update_6003() {
   db_create_table($ret, 'cache_category', $schema);
   return $ret;
 }
+
+/**
+ * Add a new column to {category_cont} table, to store newly added per-container setting
+ * of default node type for various shortcut category creations.
+ */
+function category_update_6004() {
+  $ret = array();
+
+  $new_field = array(
+    'type' => 'varchar',
+    'length' => 32,
+    'not null' => TRUE,
+    'default' => 'category',
+  );
+  db_add_field($ret, 'category_cont', 'default_category_type', $new_field);
+
+  return $ret;
+}
diff -urp --strip-trailing-cr ../category/category.module ./category.module
--- ../category/category.module	2009-08-05 06:52:53.000000000 +0200
+++ ./category.module	2009-09-21 22:20:18.000000000 +0200
@@ -61,71 +61,34 @@ function category_link($type, $node = NU
   // 'Add child' links, a la book.module.
   if ($type == 'node' && isset($node->category) && !$teaser) {
     if ($node->status == 1 && $node->category['depth'] < MENU_MAX_DEPTH) {
-      foreach (node_get_types() as $node_type) {
-        $behavior = variable_get('category_behavior_'. $node_type->type, 0);
-        if (!empty($behavior) && node_access('create', $node_type->type)) {
-          $allowed_containers = variable_get(
-          'category_allowed_containers_'. $node_type->type, array());
-          $print_link = FALSE;
-          if ($node->category['behavior'] == 'container') {
-            // If the current node is a container, and if the node type of the
-            // link is a container, then always print a link.
-            if ($behavior == 'container') {
-              $print_link = TRUE;
-            }
-            else {
-              // If the current node is a container, but the node type of the
-              // link is a category, then print a link only if the current node
-              // is an allowed container for the node type in question.
-              if (empty($allowed_containers) || in_array($node->nid, $allowed_containers)) {
-                $print_link = TRUE;
-              }
-            }
-          }
-          else {
-            // If the current node is a category, and if the node type of the
-            // link is a container, then always print a link.
-            if ($behavior == 'container') {
-              $print_link = TRUE;
-            }
-            else {
-              $container = category_get_container($node->category['cnid']);
-              if (!$container->tags) {
-                // If the current node is a category, and the node type of the
-                // link is also a category, then print a link only if the
-                // container of the current node is an allowed container for
-                // the node type in question.
-                if ($container->hierarchy && (empty($allowed_containers) || in_array($node->category['cnid'], $allowed_containers))) {
-                  $print_link = TRUE;
-                }
-                // If the current node and the node type of the link are both
-                // categories, but the container of the current node is NOT an
-                // allowed container for the node type, then print a link only
-                // if one of the allowed containers for the node type in
-                // question has the container of the current node as an allowed
-                // parent.
-
-                // Now say that backwards. ;-)
-                else {
-                  foreach ($allowed_containers as $allowed_cnid) {
-                    $allowed_container = category_get_container($allowed_cnid);
-                    if (!empty($allowed_container->allowed_parent) && $allowed_container->allowed_parent == $container->cid) {
-                      $print_link = TRUE;
-                      break;
-                    }
-                  }
-                }
-              }
-            }
-          }
 
-          if ($print_link) {
-            $links['category_add_'. $node_type->type] = array(
-              'title' => t('Add child @type', array('@type' => drupal_strtolower($node_type->name))),
-              'href' => 'node/add/'. str_replace('_', '-', check_plain($node_type->type)),
-              'query' => 'parent='. $node->nid,
-            );
-          }
+      // Always show 'Add child [container]' links
+      $types = _category_category_type_options();
+
+      if ($node->category['behavior'] == 'category') {
+        // Show 'Add child [category]' links on a category node only when we're
+        // not inside a free-tagging container. Show locally allowed types only
+        // if hierarchy is not disabled on the container. Show also types
+        // allowed through distant parenting.
+        $container = category_get_container($node->category['cnid']);
+        if (!$container->tags) {
+          $local = !empty($container->hierarchy);
+          $types += _category_category_type_options($node->category['cnid'], $local, TRUE);
+        }
+      }
+      else {
+        // Always show 'Add child [category]' links on a container node.
+        $types += _category_category_type_options($node->nid, TRUE, FALSE);
+      }
+
+      // Build links for the collected node types, if accessible to current user.
+      foreach ($types as $type => $name) {
+        if (node_access('create', $type)) {
+          $links['category_add_'. $type] = array(
+            'title' => t('Add child @type', array('@type' => drupal_strtolower($name))),
+            'href' => 'node/add/'. str_replace('_', '-', check_plain($type)),
+            'query' => 'parent='. $node->nid,
+          );
         }
       }
     }
@@ -186,6 +149,71 @@ function category_link($type, $node = NU
 }
 
 /**
+ * Retrieve a list of applicable node types for various links and selections
+ * leading to creation of new categories and containers, based on behavior
+ * and allowed container settings for the existing types. If no usable node
+ * types for a container exists, a warning is printed (except that we didn't
+ * really look with that container in mind).
+ *
+ * @param $cnid
+ *   Container to create the new categories in, or NULL if a container is
+ *   going to be created.
+ * @param $local
+ *   For categories creation: Whether to retrieve node types allowed as
+ *   categories in the specified container locally.
+ * @param $distant
+ *   For categories creation: Whether to retrieve node types allowed as
+ *   categories through the allowed distant parent setting (via another
+ *   allowed containers for given node type).
+ * @return
+ *   Array of human-readable node type names, keyed by machine-readable names.
+ */
+function _category_category_type_options($cnid = NULL, $local = TRUE, $distant = FALSE) {
+  $options = array();
+  $mode = is_null($cnid) ? 'container' : 'category';
+
+  foreach (node_get_types() as $type) {
+    $behavior = variable_get('category_behavior_'. $type->type, 0);
+    if (!empty($behavior) && $behavior == $mode) {
+      $allowed_containers = variable_get('category_allowed_containers_'. $type->type, array());
+
+      if ($mode == 'container') {
+        // Looking for node types with container behavior: Include them all.
+        $options[$type->type] = $type->name;
+      }
+      elseif ($local && (empty($allowed_containers) || in_array($cnid, $allowed_containers))) {
+        // Looking for node types with category behavior, allowed in local container:
+        // Include the ones permitted by $allowed_containers
+        $options[$type->type] = $type->name;
+      }
+      elseif ($distant) {
+        // This node type didn't match any of the above conditions. If looking also for
+        // node types (category behavior) allowed through potential distant parenting,
+        // check that against all containers allowed for this node type.
+        foreach ($allowed_containers as $allowed_cnid) {
+          $allowed_container = category_get_container($allowed_cnid);
+          if (!empty($allowed_container->allowed_parent) && $allowed_container->allowed_parent == $cnid) {
+            $options[$type->type] = $type->name;
+            break;
+          }
+        }
+      }
+    }
+  }
+
+  // Show a warning about misconfiguration, if we have zero applicable node types,
+  // although the search included locally allowed types. This means that there are
+  // either no types with container behavior, or no types with category behavior
+  // and given container allowed. Only print the message for users being able to
+  // fix the configuration of node types.
+  if (empty($options) && $local && user_access('administer content types')) {
+    drupal_set_message(t('There are no content types with @behavior behavior available for use with this container. To allow for creation of @behavior items, you need to go to the !content-types page, and assign @behavior behavior to one or more of your content types.', array('!content-types' => l(t('administer content types'), 'admin/content/types'), '@behavior' => $mode)), 'warning');
+  }
+
+  return $options;
+}
+
+/**
  * For containers not maintained by category.module, give the maintaining
  * module a chance to provide a path for categories in that container.
  *
@@ -225,7 +253,7 @@ function category_menu() {
   );
   $items['admin/content/category/add'] = array(
     'title' => 'Add container',
-    'page callback' => 'category_add_container_page',
+    'page callback' => 'category_add_page',
     'access arguments' => array('administer categories'),
     'type' => MENU_LOCAL_TASK,
     'weight' => -9,
@@ -256,7 +284,7 @@ function category_menu() {
   );
   $items['admin/content/category/%/add'] = array(
     'title' => 'Add category',
-    'page callback' => 'category_add_category_page',
+    'page callback' => 'category_add_page',
     'page arguments' => array(3),
     'access arguments' => array('administer categories'),
     'type' => MENU_LOCAL_TASK,
@@ -771,9 +799,10 @@ function category_node_save($node, $cate
         }
 
         if (!$typed_cat_cid) {
+          $container = category_get_container($cnid);       
           $tag_node = new stdClass();
           $tag_node->title = $typed_cat;
-          $tag_node->type = 'category';
+          $tag_node->type = $container->default_category_type;
           $tag_node->category['cnid'] = $cnid;
           $tag_node->category['parents'][0] = $cnid;
           $node_options = variable_get('node_options_'. $tag_node->type, array('status', 'promote'));
@@ -840,7 +869,7 @@ function category_node_delete_revision($
 function category_node_type($op, $info) {
   if ($op == 'update' && !empty($info->old_type) && $info->type != $info->old_type) {
     db_query("UPDATE {category_cont_node_types} SET type = '%s' WHERE type = '%s'", $info->type, $info->old_type);
-
+    db_query("UPDATE {category_cont} SET default_category_type = '%s' WHERE default_category_type = '%s'", $info->type, $info->old_type);
     $allowed_containers = variable_get('category_allowed_containers_'. $info->old_type, array());
     variable_del('category_allowed_containers_'. $info->old_type);
     if (!empty($allowed_containers)) {
@@ -854,6 +883,7 @@ function category_node_type($op, $info) 
     }
   }
   elseif ($op == 'delete') {
+    db_query("UPDATE {category_cont} SET default_category_type = '%s' WHERE default_category_type = '%s'", 'category', $info->type);
     db_query("DELETE FROM {category_cont_node_types} WHERE type = '%s'", $info->type);
     variable_del('category_allowed_containers_'. $info->type);
     variable_del('category_behavior_'. $info->type);
@@ -1555,6 +1585,26 @@ function _category_add_form_elements(&$f
       '#description' => t('Select content types to categorize using this container.'),
     );
 
+    $category_type_options = _category_category_type_options(empty($node->nid) ? 0 : $node->nid);
+    if (count($category_type_options) == 1) {
+      // Hide the "default content type for new categories" selector, if there's
+      // only just one option available.
+      $form['category']['content_types']['default_category_type'] = array(
+        '#type' => 'value',
+        '#value' => key($category_type_options),
+      );
+    }
+    else {
+      $form['category']['content_types']['default_category_type'] = array(
+        '#type' => 'select',
+        '#title' => t('Default content type for new categories'),
+        '#default_value' => isset($node->category['default_category_type']) ? $node->category['default_category_type'] : 'category',
+        '#options' => $category_type_options,
+        '#description' => t('Choose the content type to use when creating a new category without full user input, such as freetagging categories, or legacy Taxonomy operations.'),
+        '#required' => TRUE,
+      );
+    }
+
     $form['category']['tagging'] = array(
       '#type' => 'fieldset',
       '#title' => t('Tagging'),
@@ -1565,7 +1615,7 @@ function _category_add_form_elements(&$f
       '#type' => 'checkbox',
       '#title' => t('Tags'),
       '#default_value' => $node->category['tags'],
-      '#description' => t('Categories in this container are created by users when submitting posts by typing a comma separated list.'),
+      '#description' => t('Categories in this container are created by users when submitting posts by typing a comma separated list. Default content type selected for this container will be used for these newly created categories.'),
     );
     $form['category']['tagging']['multiple'] = array(
       '#type' => 'checkbox',
diff -urp --strip-trailing-cr ../category/wrappers/taxonomy/taxonomy.module.php ./wrappers/taxonomy/taxonomy.module.php
--- ../category/wrappers/taxonomy/taxonomy.module.php	2009-08-05 06:52:54.000000000 +0200
+++ ./wrappers/taxonomy/taxonomy.module.php	2009-09-20 21:27:29.000000000 +0200
@@ -959,8 +959,9 @@ function _taxonomy_term_into_category($t
     $node = node_load($term['tid']);
   }
 
+  $container = category_get_container($term['vid']);       
   $node->nid = $term['tid'];
-  $node->type = 'category';
+  $node->type = $container->default_category_type;
   $node->title = $term['name'];
   $node->body = $term['description'];
   $node->category['cnid'] = $term['vid'];
