Index: context_ui/context_ui.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/context/context_ui/context_ui.module,v
retrieving revision 1.5
diff -u -p -r1.5 context_ui.module
--- context_ui/context_ui.module	17 Jul 2008 16:57:19 -0000	1.5
+++ context_ui/context_ui.module	23 Jul 2008 13:16:59 -0000
@@ -34,11 +34,11 @@ function context_ui_theme() {
 
   $items['context_devel'] = array(
     'arguments' => array('form' => array()),
-    /* 'file' => '', */
+    'file' => 'context_ui_devel.inc',
   );
   $items['context_devel_recurse'] = array(
     'arguments' => array('form' => array()),
-    /* 'file' => '', */
+    'file' => 'context_ui_devel.inc',
   );
 
   return $items;
@@ -71,92 +71,6 @@ function context_ui_block($op = 'list', 
 }
 
 /**
- * hook_context_items().
- */
-function context_ui_context_items() {
-  $items = array();
-
-  // Content Types
-  $nodetypes = array();
-  foreach (node_get_types() as $type) {
-    $nodetypes[$type->type] = t($type->name);  // @todo: this t() is wrong
-  }
-  $items['node'] = array(
-    'title' => t('Content Types'),
-    'description' => t('Set this context when viewing a node page or using the add/edit form of one of these content types.'),
-    'options' => $nodetypes,
-  );
-
-  // Views
-  if (module_exists('views')) {
-    $items['views'] = array(
-      'title' => t('Views'),
-      'description' => t('Set this context when displaying the page of one of these views.'),
-      'options' => _context_ui_get_views(),
-    );
-  }
-
-  // Menu
-  if (module_exists('menu')) {
-    // $item = array('link_title' => '', 'mlid' => 0, 'plid' => 0, 'menu_name' => 'navigation', 'weight' => 0, 'link_path' => '', 'options' => array(), 'module' => 'menu', 'expanded' => 0, 'hidden' => 0, 'has_children' => 0);
-    // @note: NULL value seems to work here, but it is not documented that it should work
-    $menus = menu_parent_options(array_reverse(menu_get_menus()), NULL);
-
-    // this is required because root menu names are displayed inside <> and will not de displayed otherwise
-    foreach ($menus as $key => $name) {
-      if (substr($menus[$key], 0, 1) == '<') {
-        $menus[$key] = '<strong>'. check_plain($menus[$key]) .'</strong>';
-      }
-    }
-
-    $items['menu'] = array(
-      'title' => t('Menus'),
-      'description' => t('Display the selected menu items as active when this context is set.'),
-      'options' => $menus,
-      'widget' => 'select',
-    );
-  }
-
-  $items['user'] = array(
-    'title' => t('User Pages'),
-    'description' => t('Set this context when a user with selected role(s) is viewed'),
-    'options' => user_roles(true),
-    'widget' => 'select',
-  );
-
-  if (module_exists('nodequeue')) {
-    $result = db_query("SELECT qid, title FROM {nodequeue_queue}");
-    $options = array();
-    while ($nq = db_fetch_object($result)) {
-      $options[$nq->qid] = $nq->title;
-    }
-    $items['nodequeue'] = array(
-      'title' => t('Nodequeue'),
-      'description' => t('Set this context when a node in the selected nodequeue(s) is viewed.'),
-      'options' => $options,
-      'widget' => 'select',
-    );
-  }
-
-  // Outline
-  if (module_exists('outline')) {
-    $result = db_query("SELECT volume_id, title FROM {outline_volume}");
-    $options = array();
-    while ($vol = db_fetch_object($result)) {
-      $options[$vol->volume_id] = $vol->title;
-    }
-    $items['outline'] = array(
-      'title' => t('Outline'),
-      'description' => t('Set this context when a node in the selected volumes(s) is viewed.'),
-      'options' => $options,
-      'widget' => 'select',
-    );
-  }
-
-  return $items;
-}
-
-/**
  * Implementation of hook_menu().
  */
 function context_ui_menu() {
@@ -239,60 +153,6 @@ function context_ui_help($path, $arg) {
 }
 
 /**
- * Implementation of hook_nodeapi().
- */
-function context_ui_nodeapi(&$node, $op, $teaser, $page) {
-  if ($op == 'view' && $page && arg(0) == 'node') {
-    // Implementation of context_ui_set for node.
-    context_ui_set('node', $node->type);
-
-    // Implementation of context_ui_set for nodequeue.
-    if (module_exists('nodequeue')) {
-      $result = db_query("SELECT qid FROM {nodequeue_nodes} WHERE nid = %d", $node->nid);
-      while ($qid = db_fetch_object($result)) {
-        context_ui_set('nodequeue', $qid->qid);
-      }
-    }
-
-    // implementation of context_ui_set for outline
-    if (module_exists('outline') && $vol = $node->volume_id) {
-      context_ui_set('outline', $vol);
-    }
-  }
-}
-
-/**
- * Implementation of hook_form_alter().
- */
-function context_ui_form_alter(&$form, $form_state, $form_id) {
-  if (isset($form['#node']) && arg(0) != 'admin') { // Prevent this from firing on admin pages... damn form driven apis...
-    context_ui_set('node', $form['#node']->type);
-  }
-  else if ($form_id == 'comment_form' && $nid = $form['nid']['#value']) {
-    $node = node_load($nid);
-    context_ui_set('node', $node->type);
-  }
-}
-
-/**
- * Implementation of hook_views_pre_query().
- */
-function context_ui_views_pre_view($display_id, $args) {
-  if ($display_id->type == 'Normal') {
-    context_ui_set('views', $display_id->name);
-  }
-}
-
-/**
- * Implementation of hook_user().
- */
-function context_ui_user($op, &$edit, &$account, $category = NULL) {
-  if ($op == 'view') {
-    context_ui_set('user', array_keys($account->roles));
-  }
-}
-
-/**
  * Invokes hook_context_define() to collect all contexts provided in code by modules.
  *
  * @param $space
@@ -864,49 +724,6 @@ function context_ui_export(&$form_state,
 }
 
 /**
- * Takes a retrieved context array and returns a themed out tree representation of that context.
- */
-function theme_context_devel($context) {
-  $output = '';
-  foreach ($context as $space => $a) {
-    $output .= "<div class='context-devel-space'>$space</div>";
-    $output .= "<div class='context-devel-tree'>". theme_context_devel_recurse($a) ."</div>";
-  }
-  return $output;
-}
-
-/**
- * Helper function to theme_context_devel that recurses down context arrays and themes accordingly.
- */
-function theme_context_devel_recurse($value) {
-  $output = '';
-  if (is_array($value) || is_object($value)) {
-    if (is_array($value)) {
-      $type = 'array';
-    }
-    else if (is_object($value)) {
-      $type = 'object';
-    }
-    foreach ((array)$value as $key => $a) {
-      $output .= "<div class='context-devel-wrapper'><label><small>$type</small>$key</label>". theme('context_devel_recurse', $a) ."</div>";
-    }
-  }
-  else {
-    if (is_string($value)) {
-      $type = 'string';
-    }
-    else if (is_int($value)) {
-      $type = 'int';
-    }
-    else if (is_bool($value)) {
-      $type = 'bool';
-    }
-    $output .= "<div class='context-devel-wrapper'><label><small>$type</small>$value</label></div>";
-  }
-  return $output;
-}
-
-/**
  * Alters the menu to reflect any active contexts. Called from context_ui_set().
  */
 function context_ui_menu_set_location($context) {
Index: context_ui/context_ui_admin.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/context/context_ui/context_ui_admin.inc,v
retrieving revision 1.4
diff -u -p -r1.4 context_ui_admin.inc
--- context_ui/context_ui_admin.inc	17 Jul 2008 16:57:19 -0000	1.4
+++ context_ui/context_ui_admin.inc	23 Jul 2008 12:00:17 -0000
@@ -305,23 +305,6 @@ function context_ui_form_submit($form, &
   $form_state['redirect'] = 'admin/build/context';
 }
 
-/*
- * Helper function to generate a list of database and module provided views.
- */
-function _context_ui_get_views() {
-  $enabled_views = array();
-  
-  $views = views_get_all_views();
-  
-  foreach ($views as $view) {
-    if (!isset($views[$view->name]->disabled) || !$views[$view->name]->disabled) {
-      $enabled_views[$view->name] = $view->name;
-    }
-  }
-  ksort($enabled_views);
-  return $enabled_views;
-}
-
 /**
  * Helper function to generate a list of blocks from a specified region. If provided a context object,
  * will generate a full list of blocks for that region distinguishing between system blocks and
Index: context_ui/context_ui_devel.inc
===================================================================
RCS file: context_ui/context_ui_devel.inc
diff -N context_ui/context_ui_devel.inc
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ context_ui/context_ui_devel.inc	23 Jul 2008 13:03:16 -0000
@@ -0,0 +1,45 @@
+<?php
+// $Id$
+
+/**
+ * Takes a retrieved context array and returns a themed out tree representation of that context.
+ */
+function theme_context_devel($context) {
+  $output = '';
+  foreach ($context as $space => $a) {
+    $output .= "<div class='context-devel-space'>$space</div>";
+    $output .= "<div class='context-devel-tree'>". theme_context_devel_recurse($a) ."</div>";
+  }
+  return $output;
+}
+
+/**
+ * Helper function to theme_context_devel that recurses down context arrays and themes accordingly.
+ */
+function theme_context_devel_recurse($value) {
+  $output = '';
+  if (is_array($value) || is_object($value)) {
+    if (is_array($value)) {
+      $type = 'array';
+    }
+    else if (is_object($value)) {
+      $type = 'object';
+    }
+    foreach ((array)$value as $key => $a) {
+      $output .= "<div class='context-devel-wrapper'><label><small>$type</small>$key</label>". theme('context_devel_recurse', $a) ."</div>";
+    }
+  }
+  else {
+    if (is_string($value)) {
+      $type = 'string';
+    }
+    else if (is_int($value)) {
+      $type = 'int';
+    }
+    else if (is_bool($value)) {
+      $type = 'bool';
+    }
+    $output .= "<div class='context-devel-wrapper'><label><small>$type</small>$value</label></div>";
+  }
+  return $output;
+}

