--- switchtheme.module	2008-04-20 22:33:34.000000000 +0200
+++ switchtheme_patch.module	2008-12-15 13:46:29.281250000 +0100
@@ -23,7 +23,7 @@ function switchtheme_help($section) {
  * Implementation of hook_perm().
  */
 function switchtheme_perm() {
-  return array('administer switch', 'switch theme');
+  return array('administer switch', 'switch theme', 'switch to non-enabled themes');
 }
 
 /**
@@ -121,7 +121,8 @@ function switchtheme_switch_form() {
     '#type' => 'select',
     '#default_value' => !empty($custom_theme) ? $custom_theme : $user->theme,
     '#attributes' => array('title' => t('Change the way this site looks.')),
-    '#options' => switchtheme_select()
+    '#options' => switchtheme_select(),
+    '#description' => user_access('switch to non-enabled themes') ? t('Non-enabled themes available') : '',
   );
   $form['submit'] = array('#id'=>'switchtheme-submit', '#type' => 'submit', '#value' => t('Switch'));
   return $form;
@@ -164,7 +165,10 @@ function switchtheme_options() {
   $options = array();
   $themes = list_themes();
   foreach ($themes as $name => $attr) {
-    if ($attr->status) {
+    if (user_access('switch to non-enabled themes')) {
+      $options[] = $attr-> name;
+    }
+    elseif ($attr->status) {
       $options[] = $attr->name;
     }
   }
