Index: plugins/content_types/node/node.inc
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/ctools/plugins/content_types/node/node.inc,v
retrieving revision 1.10
diff -u -p -r1.10 node.inc
--- plugins/content_types/node/node.inc	11 Oct 2010 22:18:23 -0000	1.10
+++ plugins/content_types/node/node.inc	27 Oct 2010 17:32:55 -0000
@@ -146,22 +146,10 @@ function ctools_node_content_type_edit_f
     '#description' => t('This identifier will be added as a template suggestion to display this node: node-panel-IDENTIFIER.tpl.php. Please see the Drupal theming guide for information about template suggestions.'),
   );
 
-  // CCK holds the registry of available build modes, but can hardly
-  // push them as options for the build mode options, so we break the normal
-  // rule of not directly relying on non-core modules.
-  if ($modes = module_invoke('content', 'build_modes')) {
-    $build_mode_options = array();
-    foreach ($modes as $key => $value) {
-      if (isset($value['views style']) && $value['views style']) {
-        $build_mode_options[$key] = $value['title'];
-      }
-    }
-  }
-  else {
-    $build_mode_options = array(
-      'teaser' => t('Teaser'),
-      'full' => t('Full node')
-    );
+  $entity = entity_get_info('node');
+  $build_mode_options = array();
+  foreach ($entity['view modes'] as $mode => $option) {
+    $build_mode_options[$mode] = $option['label'];
   }
 
   // Handle existing configurations with the deprecated 'teaser' option.
