did a few bugfixes in imap functions,
[squirrelmail.git] / config / conf.pl
index f8186abb7931fd8b7e55f3dc438206f9322f3841..8ae7ddda7f90bc6e6fe21ff559dd2129961f19e0 100755 (executable)
@@ -4,9 +4,7 @@
 #
 # A simple configure script to configure squirrelmail
 ############################################################              
-$WHT = "\x1B[37;1m";
-$NRM = "\x1B[0m";
-$conf_pl_version = "x51";
+$conf_pl_version = "x52";
 
 ############################################################              
 # First, lets read in the data already in there...
@@ -220,8 +218,19 @@ if (!$default_unseen_notify) {
 if (!$default_unseen_type) {
    $default_unseen_type = 1;
 }
+if (!$config_use_color) {
+   $config_use_color = 1;
+}
 
 #####################################################################################
+if ($config_use_color == 1) {
+   $WHT = "\x1B[37;1m";
+   $NRM = "\x1B[0m";
+} else {
+   $WHT = "";
+   $NRM = "";
+   $config_use_color = 2;
+}
 
 while (($command ne "q") && ($command ne "Q")) {
    system "clear";
@@ -360,6 +369,11 @@ while (($command ne "q") && ($command ne "Q")) {
       print "\n";
       print "R   Return to Main Menu\n";
    }
+   if ($config_use_color == 1) {
+      print "C.  Turn color off\n";
+   } else {
+      print "C.  Turn color on\n";
+   }
    print "S   Save data\n";
    print "Q   Quit\n";
 
@@ -385,7 +399,17 @@ while (($command ne "q") && ($command ne "Q")) {
       if (($save =~ /^y/i) || ($save =~ /^\s*$/)) {
          save_data ();
        }
-   } elsif (($command eq "d") || ($command eq "D")) {
+   } elsif (($command eq "c") || ($command eq "C")) {
+      if ($config_use_color == 1) {
+         $config_use_color = 2;
+         $WHT = "";
+         $NRM = "";
+      } else {
+         $config_use_color = 1;
+         $WHT = "\x1B[37;1m";
+         $NRM = "\x1B[0m";
+      }
+   } elsif ((($command eq "d") || ($command eq "D")) && $menu == 0) {
       set_defaults ();
    } else {
       $saved = 0;
@@ -1390,8 +1414,9 @@ sub save_data {
 
    if ($print_config_version) {
       print FILE "\t\$config_version = \"$print_config_version\";\n";
-      print FILE "\n";
    }
+   print FILE "\t\$config_use_color = $config_use_color;\n"; 
+   print FILE "\n";
    
    print FILE "\t\$org_name   = \"$org_name\";\n";
    print FILE "\t\$org_logo   = \"$org_logo\";\n";