Index: tables.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/tables/tables.module,v
retrieving revision 1.4
diff -u -r1.4 tables.module
--- tables.module       29 Nov 2005 06:07:36 -0000      1.4
+++ tables.module       22 Feb 2006 07:27:04 -0000
@@ -179,7 +179,7 @@
 function tables_menu($may_cache) {
   if (!$may_cache) {
     if ($css = variable_get('tables_css', 'modules/tables/tables.css')) {
-      drupal_set_html_head("\n<style type=\"text/css\">@import \"$css\";</style>\n");
+      theme('add_style', $css);
     }
   }
   return array();
@@ -189,9 +189,24 @@
   if (!file_check_location(variable_get('tables_css', 'modules/tables/tables.css'))) {
     $error['tables_css'] = theme('error', t('File does not exist, or is not readable.'));
   }
-  $output = form_textfield(t('Style sheet'), "tables_css", variable_get('tables_css', 'modules/tables/tables.css'), 70, 255, t("Specify the relative path to your tables style sheet.  The style sheet specified here will be used to style tables you insert.  If you prefer to style your tables in your theme, you can leave this field blank. ". $error['tables_css']));
-  $output .= form_textfield(t('Default style'), "tables_default_style", variable_get('tables_default_style', 'tables-elegant'), 70, 255, t("Set the default style sheet to use if no style sheet is set in the specific table. "));
-  return $output;
+
+  $form["tables_css"] = array('#type' => 'textfield',
+                             '#title' => t('Style Sheet'),
+                             '#default_value' => variable_get('tables_css', 'modules/tables/tables.css'),
+                             '#size' => 70,
+                             '#maxlength' => 255,
+                             '#description' => t("Specify the relative path to your tables style sheet.  The style sheet specified here will be used to style tables you insert.  If you prefer to style your tables in your theme, you can leave this field blank. ". $error['tables_css']),
+                             );
+
+  $form["tables_default_style"] = array('#type' => 'textfield',
+                                       '#title' => t('Default style'),
+                                       '#default_value' => variable_get('tables_default_style', 'tables-elegant'),
+                                       '#size' => 70,
+                                       '#maxlength' => 255,
+                                       '#description' => t("Set the default style sheet to use if no style sheet is set in the specific table. "),
+                                       );
+
+  return $form;
 }

 ?>
