| | @@ -1790,11 +1790,11 @@ |
| 1790 | 1790 | if( z==0 && g.zConfigDbName ){ |
| 1791 | 1791 | db_swap_connections(); |
| 1792 | 1792 | z = db_text(0, "SELECT value FROM global_config WHERE name=%Q", zName); |
| 1793 | 1793 | db_swap_connections(); |
| 1794 | 1794 | } |
| 1795 | | - if( ctrlSetting!=0 && ctrlSetting->versionable ){ |
| 1795 | + if( ctrlSetting!=0 && (ctrlSetting->width&SETUP_VERSIONABLE) ){ |
| 1796 | 1796 | /* This is a versionable setting, try and get the info from a |
| 1797 | 1797 | ** checked out file */ |
| 1798 | 1798 | z = db_get_do_versionable(zName, z); |
| 1799 | 1799 | } |
| 1800 | 1800 | if( z==0 ){ |
| | @@ -2080,11 +2080,11 @@ |
| 2080 | 2080 | fossil_print("%-20s %-8s %s\n", ctrlSetting->name, db_column_text(&q, 0), |
| 2081 | 2081 | db_column_text(&q, 1)); |
| 2082 | 2082 | }else{ |
| 2083 | 2083 | fossil_print("%-20s\n", ctrlSetting->name); |
| 2084 | 2084 | } |
| 2085 | | - if( ctrlSetting->versionable && localOpen ){ |
| 2085 | + if( (ctrlSetting->width&SETUP_VERSIONABLE) && localOpen ){ |
| 2086 | 2086 | /* Check to see if this is overridden by a versionable settings file */ |
| 2087 | 2087 | Blob versionedPathname; |
| 2088 | 2088 | blob_zero(&versionedPathname); |
| 2089 | 2089 | blob_appendf(&versionedPathname, "%s/.fossil-settings/%s", |
| 2090 | 2090 | g.zLocalRoot, ctrlSetting->name); |
| | @@ -2105,69 +2105,74 @@ |
| 2105 | 2105 | ** is used for on/off checkboxes. |
| 2106 | 2106 | ** The behaviour page doesn't use a special layout. It lists all |
| 2107 | 2107 | ** set-commands and displays the 'set'-help as info. |
| 2108 | 2108 | */ |
| 2109 | 2109 | #if INTERFACE |
| 2110 | + |
| 2111 | +#define SETUP_WIDTH 63 |
| 2112 | +#define SETUP_TEXTAREA 64 |
| 2113 | +#define SETUP_VERSIONABLE 128 |
| 2114 | + |
| 2110 | 2115 | struct stControlSettings { |
| 2111 | 2116 | char const *name; /* Name of the setting */ |
| 2112 | 2117 | char const *var; /* Internal variable name used by db_set() */ |
| 2113 | | - int width; /* Width of display. 0 for boolean values */ |
| 2114 | | - int versionable; /* Is this setting versionable? */ |
| 2118 | + int width; /* Width of display. 0 for boolean values. |
| 2119 | + possibly or'ed with above flags. */ |
| 2115 | 2120 | char const *def; /* Default value */ |
| 2116 | 2121 | }; |
| 2117 | 2122 | #endif /* INTERFACE */ |
| 2118 | 2123 | struct stControlSettings const ctrlSettings[] = { |
| 2119 | | - { "access-log", 0, 0, 0, "off" }, |
| 2120 | | - { "allow-symlinks",0, 0, 1, "off" }, |
| 2121 | | - { "auto-captcha", "autocaptcha", 0, 0, "on" }, |
| 2122 | | - { "auto-hyperlink",0, 0, 0, "on", }, |
| 2123 | | - { "auto-shun", 0, 0, 0, "on" }, |
| 2124 | | - { "autosync", 0, 0, 0, "on" }, |
| 2125 | | - { "binary-glob", 0, 40, 1, "" }, |
| 2126 | | - { "clearsign", 0, 0, 0, "off" }, |
| 2124 | + { "access-log", 0, 0, "off" }, |
| 2125 | + { "allow-symlinks",0, SETUP_VERSIONABLE, "off" }, |
| 2126 | + { "auto-captcha", "autocaptcha", 0, "on" }, |
| 2127 | + { "auto-hyperlink",0, 0, "on", }, |
| 2128 | + { "auto-shun", 0, 0, "on" }, |
| 2129 | + { "autosync", 0, 0, "on" }, |
| 2130 | + { "binary-glob", 0, SETUP_VERSIONABLE|40, "" }, |
| 2131 | + { "clearsign", 0, 0, "off" }, |
| 2127 | 2132 | #if defined(_WIN32) || defined(__CYGWIN__) || defined(__DARWIN__) || defined(__APPLE__) |
| 2128 | | - { "case-sensitive",0, 0, 0, "off" }, |
| 2133 | + { "case-sensitive",0, 0, "off" }, |
| 2129 | 2134 | #else |
| 2130 | | - { "case-sensitive",0, 0, 0, "on" }, |
| 2135 | + { "case-sensitive",0, 0, "on" }, |
| 2131 | 2136 | #endif |
| 2132 | | - { "clean-glob", 0, 40, 1, "" }, |
| 2133 | | - { "crnl-glob", 0, 40, 1, "" }, |
| 2134 | | - { "default-perms", 0, 16, 0, "u" }, |
| 2135 | | - { "diff-binary", 0, 0, 0, "on" }, |
| 2136 | | - { "diff-command", 0, 40, 0, "" }, |
| 2137 | | - { "dont-push", 0, 0, 0, "off" }, |
| 2138 | | - { "editor", 0, 32, 0, "" }, |
| 2139 | | - { "empty-dirs", 0, 40, 1, "" }, |
| 2140 | | - { "encoding-glob", 0, 40, 1, "" }, |
| 2141 | | - { "gdiff-command", 0, 40, 0, "gdiff" }, |
| 2142 | | - { "gmerge-command",0, 40, 0, "" }, |
| 2143 | | - { "http-port", 0, 16, 0, "8080" }, |
| 2144 | | - { "https-login", 0, 0, 0, "off" }, |
| 2145 | | - { "ignore-glob", 0, 40, 1, "" }, |
| 2146 | | - { "keep-glob", 0, 40, 1, "" }, |
| 2147 | | - { "localauth", 0, 0, 0, "off" }, |
| 2148 | | - { "main-branch", 0, 40, 0, "trunk" }, |
| 2149 | | - { "manifest", 0, 0, 1, "off" }, |
| 2150 | | - { "max-upload", 0, 25, 0, "250000" }, |
| 2151 | | - { "mtime-changes", 0, 0, 0, "on" }, |
| 2152 | | - { "pgp-command", 0, 40, 0, "gpg --clearsign -o " }, |
| 2153 | | - { "proxy", 0, 32, 0, "off" }, |
| 2154 | | - { "relative-paths",0, 0, 0, "on" }, |
| 2155 | | - { "repo-cksum", 0, 0, 0, "on" }, |
| 2156 | | - { "self-register", 0, 0, 0, "off" }, |
| 2157 | | - { "ssh-command", 0, 40, 0, "" }, |
| 2158 | | - { "ssl-ca-location",0, 40, 0, "" }, |
| 2159 | | - { "ssl-identity", 0, 40, 0, "" }, |
| 2137 | + { "clean-glob", 0, SETUP_VERSIONABLE|40, "" }, |
| 2138 | + { "crnl-glob", 0, SETUP_VERSIONABLE|40, "" }, |
| 2139 | + { "default-perms", 0, 16, "u" }, |
| 2140 | + { "diff-binary", 0, 0, "on" }, |
| 2141 | + { "diff-command", 0, 40, "" }, |
| 2142 | + { "dont-push", 0, 0, "off" }, |
| 2143 | + { "editor", 0, 32, "" }, |
| 2144 | + { "empty-dirs", 0, SETUP_VERSIONABLE|40, "" }, |
| 2145 | + { "encoding-glob", 0, SETUP_VERSIONABLE|40, "" }, |
| 2146 | + { "gdiff-command", 0, 40, "gdiff" }, |
| 2147 | + { "gmerge-command",0, 40, "" }, |
| 2148 | + { "http-port", 0, 16, "8080" }, |
| 2149 | + { "https-login", 0, 0, "off" }, |
| 2150 | + { "ignore-glob", 0, SETUP_VERSIONABLE|40, "" }, |
| 2151 | + { "keep-glob", 0, SETUP_VERSIONABLE|40, "" }, |
| 2152 | + { "localauth", 0, 0, "off" }, |
| 2153 | + { "main-branch", 0, 40, "trunk" }, |
| 2154 | + { "manifest", 0, SETUP_VERSIONABLE, "off" }, |
| 2155 | + { "max-upload", 0, 25, "250000" }, |
| 2156 | + { "mtime-changes", 0, 0, "on" }, |
| 2157 | + { "pgp-command", 0, 40, "gpg --clearsign -o " }, |
| 2158 | + { "proxy", 0, 32, "off" }, |
| 2159 | + { "relative-paths",0, 0, "on" }, |
| 2160 | + { "repo-cksum", 0, 0, "on" }, |
| 2161 | + { "self-register", 0, 0, "off" }, |
| 2162 | + { "ssh-command", 0, 40, "" }, |
| 2163 | + { "ssl-ca-location",0, 40, "" }, |
| 2164 | + { "ssl-identity", 0, 40, "" }, |
| 2160 | 2165 | #ifdef FOSSIL_ENABLE_TCL |
| 2161 | | - { "tcl", 0, 0, 0, "off" }, |
| 2162 | | - { "tcl-setup", 0, 40, 0, "" }, |
| 2166 | + { "tcl", 0, 0, "off" }, |
| 2167 | + { "tcl-setup", 0, SETUP_TEXTAREA|40, "" }, |
| 2163 | 2168 | #endif |
| 2164 | | - { "th1-setup", 0, 40, 0, "" }, |
| 2165 | | - { "th1-uri-regexp",0, 40, 0, "" }, |
| 2166 | | - { "web-browser", 0, 32, 0, "" }, |
| 2167 | | - { "white-foreground", 0, 0, 0, "off" }, |
| 2168 | | - { 0,0,0,0,0 } |
| 2169 | + { "th1-setup", 0, SETUP_TEXTAREA|40, "" }, |
| 2170 | + { "th1-uri-regexp",0, 40, "" }, |
| 2171 | + { "web-browser", 0, 32, "" }, |
| 2172 | + { "white-foreground", 0, 0, "off" }, |
| 2173 | + { 0,0,0,0 } |
| 2169 | 2174 | }; |
| 2170 | 2175 | |
| 2171 | 2176 | /* |
| 2172 | 2177 | ** COMMAND: settings |
| 2173 | 2178 | ** COMMAND: unset* |
| 2174 | 2179 | |