private boolean save_css_prefs(Preferences prefs)
   {
      assert(prefs != null);
      //
      // css file preferences
      //

      // First, remove any old css files from the preferences.
      try
      {
         Preferences md_prefs = prefs.node(CSS_FILES_NODE);
         md_prefs.removeNode();
         md_prefs.flush();
      }
      catch(BackingStoreException ex)
      {
         Joculus.showError(UIStrings.ERROR_WRITE_SETTINGS_FAILED + "\n" + ex.getMessage());
         return false;
      }

      // add the currently-defined css files
      prefs = prefs.node(CSS_FILES_NODE); // we deleted this node, so need to add it again.
      for(CSSFile cf : css_files)
      {
         prefs = prefs.node(cf.name);
         prefs.put(this.CSS_FILE_PATH, (cf.path == null) ? "" : cf.path);
         prefs = prefs.parent();
      }
      prefs = prefs.parent();

      // set the current css file.
      prefs.put(CUR_CSS_FILE_NAME, cur_css_file.name);

      return true;
   }