Index: content_copy.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/cck/content_copy.module,v
retrieving revision 1.1.2.8
diff -u -r1.1.2.8 content_copy.module
--- content_copy.module	17 Jul 2007 21:57:26 -0000	1.1.2.8
+++ content_copy.module	19 Aug 2007 02:18:53 -0000
@@ -202,6 +202,9 @@
     }
   }
 
+  // Get field display settings using content_admin_display_overview_form
+  drupal_execute('content_admin_display_overview_form', array(), $form_values['type_name'] );
+
   // Convert the macro array into formatted text.
   return content_copy_get_macro();
 }
@@ -427,6 +430,13 @@
       }
     }
   }
+
+  // Import display field settings
+  $values = array();
+  $values['type_name'] = $type_name;
+  $values['fields'] = (array)$content['display'];
+  drupal_execute('content_admin_display_overview_form', $values, $type_name);
+  
   if (!form_get_errors()) {
     if (sizeof($imported_fields) > 0 || sizeof($imported_groups) > 0) {
       return 'admin/content/types/'. $content_info['content types'][$type_name]['url_str'] .'/fields';
@@ -442,7 +452,7 @@
  * Intervene to run form through macro when doing export
  */
 function content_copy_form_alter($form_id, &$form) {
-  $alter_forms = array('node_type_form', '_content_admin_field', 'fieldgroup_edit_group_form');
+  $alter_forms = array('node_type_form', '_content_admin_field', 'fieldgroup_edit_group_form', 'content_admin_display_overview_form');
   if ($GLOBALS['content_copy']['status'] == 'export' && in_array($form_id, $alter_forms)) {
     $form['#submit'] = array('content_copy_record_macro' => array($form));
   }
@@ -541,8 +551,26 @@
  * @return a code representation of the recorded macro.
  */
 function content_copy_get_macro() {
-  foreach ($GLOBALS['content_copy']['submissions'] as $form_type => $form) {
+
+  // Retrieve form submissions locally
+  $submissions = $GLOBALS['content_copy']['submissions'];
+
+  // Move display settings out into a separate array
+  $display = array();
+  if ($submissions['fields']) {
+    foreach($submissions['fields'] as $key => $value) {
+      if (!isset($value['field_name'])) {
+        $display = array_merge($display, $value['fields']);
+        unset($submissions['fields'][$key]);
+      }
+    }
+  }
+  if (!empty($display)) $submissions['display'] = $display;
+  
+  // Save the data
+  foreach ($submissions as $form_type => $form) {
     $string .= "\$content[$form_type]  = ". var_export((array) $form, TRUE) .";\n";
   }
+
   return $string;
 }
