Browse Source

Added preference for changing left folder list size

Luke Ehresman 25 năm trước cách đây
mục cha
commit
52dd276e6d
6 tập tin đã thay đổi với 130 bổ sung48 xóa
  1. 5 0
      config/config_default.php
  2. 55 47
      po/squirrelmail.po
  3. 8 0
      src/load_prefs.php
  4. 57 0
      src/options.php
  5. 1 0
      src/options_submit.php
  6. 4 1
      src/webmail.php

+ 5 - 0
config/config_default.php

@@ -155,4 +155,9 @@
 //    - It should probably be another directory than data_dir.
 
     $attachment_dir = $data_dir
+
+//  This is the default size of the left folder list.  Default is 200,
+//  but you can set it to whatever you wish.
+
+   $default_left_size = 200;
 ?>

+ 55 - 47
po/squirrelmail.po

@@ -6,7 +6,7 @@
 msgid ""
 msgstr ""
 "Project-Id-Version: PACKAGE VERSION\n"
-"POT-Creation-Date: 2000-03-03 07:23-0500\n"
+"POT-Creation-Date: 2000-03-05 09:00-0500\n"
 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
 "Language-Team: LANGUAGE <LL@li.org>\n"
@@ -22,47 +22,51 @@ msgstr ""
 msgid "-------- Original Message ---------\n"
 msgstr ""
 
-#: src/compose.php:159 src/read_body.php:160
+#: src/compose.php:158 src/read_body.php:153
 msgid "To:"
 msgstr ""
 
-#: src/compose.php:170
-msgid "CC"
+#: src/compose.php:168
+msgid "CC:"
 msgstr ""
 
-#: src/compose.php:191 src/read_body.php:130
+#: src/compose.php:178
+msgid "BCC:"
+msgstr ""
+
+#: src/compose.php:188 src/read_body.php:129
 msgid "Subject:"
 msgstr ""
 
-#: src/compose.php:213 src/compose.php:226
+#: src/compose.php:209 src/compose.php:222
 msgid "Send"
 msgstr ""
 
-#: src/compose.php:233
+#: src/compose.php:228
 msgid "Attach:"
 msgstr ""
 
-#: src/compose.php:239
+#: src/compose.php:234
 msgid "Add"
 msgstr ""
 
-#: src/compose.php:252
+#: src/compose.php:247
 msgid "Delete selected attachments"
 msgstr ""
 
-#: src/compose.php:272
+#: src/compose.php:266
 msgid "You have not entered a message body."
 msgstr ""
 
-#: src/compose.php:276
+#: src/compose.php:270
 msgid "You have not filled in the \"To:\" field."
 msgstr ""
 
-#: src/compose.php:279
+#: src/compose.php:273
 msgid "You have not entered a subject."
 msgstr ""
 
-#: src/compose.php:300
+#: src/compose.php:294
 msgid "Could not move/copy file. File not attached"
 msgstr ""
 
@@ -74,35 +78,35 @@ msgstr ""
 msgid "Download this as a file"
 msgstr ""
 
-#: functions/page_header.php:47 src/folders.php:22 src/left_main.php:88
+#: functions/page_header.php:47 src/folders.php:21 src/left_main.php:87
 msgid "Folders"
 msgstr ""
 
-#: src/folders.php:33
+#: src/folders.php:31
 msgid "Delete Folder"
 msgstr ""
 
-#: functions/mailbox_display.php:226 src/folders.php:56 src/read_body.php:105
+#: functions/mailbox_display.php:226 src/folders.php:54 src/read_body.php:105
 msgid "Delete"
 msgstr ""
 
-#: src/folders.php:62
+#: src/folders.php:60
 msgid "Create Folder"
 msgstr ""
 
-#: src/folders.php:68
+#: src/folders.php:65
 msgid "as a subfolder of"
 msgstr ""
 
-#: src/folders.php:95
+#: src/folders.php:91
 msgid "Let this folder contain subfolders"
 msgstr ""
 
-#: src/folders.php:103
+#: src/folders.php:99
 msgid "Rename a Folder"
 msgstr ""
 
-#: src/folders.php:125
+#: src/folders.php:121
 msgid "Rename"
 msgstr ""
 
@@ -112,29 +116,29 @@ msgid ""
 "HREF=\"../src/folders.php\">Click here to go back</A>."
 msgstr ""
 
-#: src/folders_create.php:42
+#: src/folders_create.php:41
 msgid "Folder Created!"
 msgstr ""
 
-#: src/folders_create.php:44
+#: src/folders_create.php:43
 msgid "The folder has been successfully created."
 msgstr ""
 
-#: src/folders_create.php:46 src/folders_delete.php:91
+#: src/folders_create.php:45 src/folders_delete.php:82
 #: src/options_submit.php:42
 msgid "Click here"
 msgstr ""
 
-#: src/folders_create.php:48 src/folders_delete.php:93
+#: src/folders_create.php:47 src/folders_delete.php:84
 #: src/options_submit.php:44
 msgid "to continue."
 msgstr ""
 
-#: src/folders_delete.php:87
+#: src/folders_delete.php:78
 msgid "Folder Deleted!"
 msgstr ""
 
-#: src/folders_delete.php:89
+#: src/folders_delete.php:80
 msgid "The folder has been successfully deleted."
 msgstr ""
 
@@ -150,7 +154,7 @@ msgstr ""
 msgid "New name:"
 msgstr ""
 
-#: src/folders_rename_getname.php:37 src/options.php:299
+#: src/folders_rename_getname.php:37 src/options.php:322
 msgid "Submit"
 msgstr ""
 
@@ -158,7 +162,7 @@ msgstr ""
 msgid "purge"
 msgstr ""
 
-#: src/left_main.php:91
+#: src/left_main.php:90
 msgid "refresh folder list"
 msgstr ""
 
@@ -182,15 +186,15 @@ msgstr ""
 msgid "SquirrelMail version $version<BR>By the SquirrelMail Development Team"
 msgstr ""
 
-#: src/login.php:56
+#: src/login.php:55
 msgid "Name:"
 msgstr ""
 
-#: src/login.php:64
+#: src/login.php:61
 msgid "Password:"
 msgstr ""
 
-#: src/login.php:74
+#: src/login.php:70
 msgid "Login"
 msgstr ""
 
@@ -198,47 +202,51 @@ msgstr ""
 msgid "No messages were selected."
 msgstr ""
 
-#: functions/page_header.php:48 src/options.php:36
+#: functions/page_header.php:48 src/options.php:35
 msgid "Options"
 msgstr ""
 
-#: src/options.php:47
+#: src/options.php:44
 msgid "Full Name:"
 msgstr ""
 
-#: src/options.php:60
+#: src/options.php:53
 msgid "E-mail address:"
 msgstr ""
 
-#: src/options.php:73
+#: src/options.php:62
 msgid "Reply-to:"
 msgstr ""
 
-#: src/options.php:86
+#: src/options.php:71
 msgid "Theme:"
 msgstr ""
 
-#: src/options.php:105
+#: src/options.php:88
 msgid "Language:"
 msgstr ""
 
-#: src/options.php:129
+#: src/options.php:110
 msgid "Move deleted messages to "
 msgstr ""
 
-#: src/options.php:153
+#: src/options.php:130
 msgid "Wrap incoming text at:"
 msgstr ""
 
-#: src/options.php:170
+#: src/options.php:143
 msgid "Size of editor window (in characters):"
 msgstr ""
 
-#: src/options.php:187
+#: src/options.php:156
+msgid "Width of left folder list:"
+msgstr ""
+
+#: src/options.php:213
 msgid "Time between auto refresh of folder list:"
 msgstr ""
 
-#: src/options.php:285
+#: src/options.php:308
 msgid "Use a signature?"
 msgstr ""
 
@@ -274,11 +282,11 @@ msgstr ""
 msgid "Reply All"
 msgstr ""
 
-#: src/read_body.php:140
+#: src/read_body.php:137
 msgid "From:"
 msgstr ""
 
-#: src/read_body.php:150
+#: src/read_body.php:145
 msgid "Date:"
 msgstr ""
 
@@ -306,11 +314,11 @@ msgstr ""
 msgid "You have been successfully signed out."
 msgstr ""
 
-#: src/signout.php:44
+#: src/signout.php:43
 msgid "Click here to "
 msgstr ""
 
-#: src/signout.php:46
+#: src/signout.php:45
 msgid "log back in."
 msgstr ""
 

+ 8 - 0
src/load_prefs.php

@@ -33,6 +33,14 @@
    if ($wrap_at == "")
       $wrap_at = 86;
 
+   $left_size = getPref($data_dir, $username, "left_size");
+   if ($left_size == "") {
+      if (isset($default_left_size))
+         $left_size = $default_left_size;
+      else  
+         $left_size = 200;
+   }      
+
    $editor_size = getPref($data_dir, $username, "editor_size");
    if ($editor_size == "")
       $editor_size = 76;

+ 57 - 0
src/options.php

@@ -150,6 +150,63 @@
    echo "      </TD>";
    echo "   </TR>";
 
+   // LEFT_SIZE
+   echo "   <TR>";
+   echo "      <td width=60% align=right>";
+   echo _("Width of left folder list:");
+   echo "      </td>";
+   echo "      <td width=60% align=left>\n";
+   echo "         <select name=leftsize>\n";
+   if ($left_size == 100)
+      echo "<option value=100 selected>100 pixels\n";
+   else
+      echo "<option value=100>100 pixels\n";
+   
+   if ($left_size == 125)
+      echo "<option value=125 selected>125 pixels\n";
+   else
+      echo "<option value=125>125 pixels\n";
+   
+   if ($left_size == 150)
+      echo "<option value=150 selected>150 pixels\n";
+   else
+      echo "<option value=150>150 pixels\n";
+   
+   if ($left_size == 175)
+      echo "<option value=175 selected>175 pixels\n";
+   else
+      echo "<option value=175>175 pixels\n";
+      
+   if (($left_size == 200) || ($left_size == ""))
+      echo "<option value=200 selected>200 pixels\n";
+   else
+      echo "<option value=200>200 pixels\n";
+   
+   if (($left_size == 225))
+      echo "<option value=225 selected>225 pixels\n";
+   else
+      echo "<option value=225>225 pixels\n";
+   
+   if (($left_size == 250))
+      echo "<option value=250 selected>250 pixels\n";
+   else
+      echo "<option value=250>250 pixels\n";
+   
+   if ($left_size == 275)
+      echo "<option value=275 selected>275 pixels\n";
+   else
+      echo "<option value=275>275 pixels\n";
+      
+   if (($left_size == 300))
+      echo "<option value=300 selected>300 pixels\n";
+   else
+      echo "<option value=300>300 pixels\n";
+
+   echo "         </select>";
+   echo "      </td>";
+   echo "   </TR>";
+   
+   
    // LEFT_REFRESH
    echo "   <TR>";
    echo "      <TD WIDTH=60% ALIGN=RIGHT>";

+ 1 - 0
src/options_submit.php

@@ -25,6 +25,7 @@
    setPref($data_dir, $username, "use_signature", $usesignature);
    setPref($data_dir, $username, "left_refresh", $leftrefresh);
    setPref($data_dir, $username, "language", $language);
+   setPref($data_dir, $username, "left_size", $leftsize);
 
    setSig($data_dir, $username, stripslashes($signature_edit));
 

+ 4 - 1
src/webmail.php

@@ -23,10 +23,13 @@
 <?
    include ("../config/config.php");
    include ("../functions/prefs.php");
+
+   include ("../src/load_prefs.php");
+   
    echo "<TITLE>";
    echo "$org_title";
    echo "</TITLE>";
-   echo "<FRAMESET COLS=\"200, *\" NORESIZE BORDER=0>";
+   echo "<FRAMESET COLS=\"$left_size, *\" NORESIZE BORDER=0>";
 
 /**
     There are three ways to call webmail.php