Fossil SCM

[202edc2c1c]: Make 'th1-setup' a textarea in settings UI.

jan.nijtmans 2014-02-17 19:48 trunk merge
Commit 5447125d34784c7181fe615a34d4e4f41633935a
3 files changed +54 -49 +18 -7 +18 -7
+54 -49
--- src/db.c
+++ src/db.c
@@ -1790,11 +1790,11 @@
17901790
if( z==0 && g.zConfigDbName ){
17911791
db_swap_connections();
17921792
z = db_text(0, "SELECT value FROM global_config WHERE name=%Q", zName);
17931793
db_swap_connections();
17941794
}
1795
- if( ctrlSetting!=0 && ctrlSetting->versionable ){
1795
+ if( ctrlSetting!=0 && (ctrlSetting->width&SETUP_VERSIONABLE) ){
17961796
/* This is a versionable setting, try and get the info from a
17971797
** checked out file */
17981798
z = db_get_do_versionable(zName, z);
17991799
}
18001800
if( z==0 ){
@@ -2080,11 +2080,11 @@
20802080
fossil_print("%-20s %-8s %s\n", ctrlSetting->name, db_column_text(&q, 0),
20812081
db_column_text(&q, 1));
20822082
}else{
20832083
fossil_print("%-20s\n", ctrlSetting->name);
20842084
}
2085
- if( ctrlSetting->versionable && localOpen ){
2085
+ if( (ctrlSetting->width&SETUP_VERSIONABLE) && localOpen ){
20862086
/* Check to see if this is overridden by a versionable settings file */
20872087
Blob versionedPathname;
20882088
blob_zero(&versionedPathname);
20892089
blob_appendf(&versionedPathname, "%s/.fossil-settings/%s",
20902090
g.zLocalRoot, ctrlSetting->name);
@@ -2105,69 +2105,74 @@
21052105
** is used for on/off checkboxes.
21062106
** The behaviour page doesn't use a special layout. It lists all
21072107
** set-commands and displays the 'set'-help as info.
21082108
*/
21092109
#if INTERFACE
2110
+
2111
+#define SETUP_WIDTH 63
2112
+#define SETUP_TEXTAREA 64
2113
+#define SETUP_VERSIONABLE 128
2114
+
21102115
struct stControlSettings {
21112116
char const *name; /* Name of the setting */
21122117
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. */
21152120
char const *def; /* Default value */
21162121
};
21172122
#endif /* INTERFACE */
21182123
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" },
21272132
#if defined(_WIN32) || defined(__CYGWIN__) || defined(__DARWIN__) || defined(__APPLE__)
2128
- { "case-sensitive",0, 0, 0, "off" },
2133
+ { "case-sensitive",0, 0, "off" },
21292134
#else
2130
- { "case-sensitive",0, 0, 0, "on" },
2135
+ { "case-sensitive",0, 0, "on" },
21312136
#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, "" },
21602165
#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, "" },
21632168
#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 }
21692174
};
21702175
21712176
/*
21722177
** COMMAND: settings
21732178
** COMMAND: unset*
21742179
--- src/db.c
+++ src/db.c
@@ -1790,11 +1790,11 @@
1790 if( z==0 && g.zConfigDbName ){
1791 db_swap_connections();
1792 z = db_text(0, "SELECT value FROM global_config WHERE name=%Q", zName);
1793 db_swap_connections();
1794 }
1795 if( ctrlSetting!=0 && ctrlSetting->versionable ){
1796 /* This is a versionable setting, try and get the info from a
1797 ** checked out file */
1798 z = db_get_do_versionable(zName, z);
1799 }
1800 if( z==0 ){
@@ -2080,11 +2080,11 @@
2080 fossil_print("%-20s %-8s %s\n", ctrlSetting->name, db_column_text(&q, 0),
2081 db_column_text(&q, 1));
2082 }else{
2083 fossil_print("%-20s\n", ctrlSetting->name);
2084 }
2085 if( ctrlSetting->versionable && localOpen ){
2086 /* Check to see if this is overridden by a versionable settings file */
2087 Blob versionedPathname;
2088 blob_zero(&versionedPathname);
2089 blob_appendf(&versionedPathname, "%s/.fossil-settings/%s",
2090 g.zLocalRoot, ctrlSetting->name);
@@ -2105,69 +2105,74 @@
2105 ** is used for on/off checkboxes.
2106 ** The behaviour page doesn't use a special layout. It lists all
2107 ** set-commands and displays the 'set'-help as info.
2108 */
2109 #if INTERFACE
 
 
 
 
 
2110 struct stControlSettings {
2111 char const *name; /* Name of the setting */
2112 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? */
2115 char const *def; /* Default value */
2116 };
2117 #endif /* INTERFACE */
2118 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" },
2127 #if defined(_WIN32) || defined(__CYGWIN__) || defined(__DARWIN__) || defined(__APPLE__)
2128 { "case-sensitive",0, 0, 0, "off" },
2129 #else
2130 { "case-sensitive",0, 0, 0, "on" },
2131 #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, "" },
2160 #ifdef FOSSIL_ENABLE_TCL
2161 { "tcl", 0, 0, 0, "off" },
2162 { "tcl-setup", 0, 40, 0, "" },
2163 #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 };
2170
2171 /*
2172 ** COMMAND: settings
2173 ** COMMAND: unset*
2174
--- src/db.c
+++ src/db.c
@@ -1790,11 +1790,11 @@
1790 if( z==0 && g.zConfigDbName ){
1791 db_swap_connections();
1792 z = db_text(0, "SELECT value FROM global_config WHERE name=%Q", zName);
1793 db_swap_connections();
1794 }
1795 if( ctrlSetting!=0 && (ctrlSetting->width&SETUP_VERSIONABLE) ){
1796 /* This is a versionable setting, try and get the info from a
1797 ** checked out file */
1798 z = db_get_do_versionable(zName, z);
1799 }
1800 if( z==0 ){
@@ -2080,11 +2080,11 @@
2080 fossil_print("%-20s %-8s %s\n", ctrlSetting->name, db_column_text(&q, 0),
2081 db_column_text(&q, 1));
2082 }else{
2083 fossil_print("%-20s\n", ctrlSetting->name);
2084 }
2085 if( (ctrlSetting->width&SETUP_VERSIONABLE) && localOpen ){
2086 /* Check to see if this is overridden by a versionable settings file */
2087 Blob versionedPathname;
2088 blob_zero(&versionedPathname);
2089 blob_appendf(&versionedPathname, "%s/.fossil-settings/%s",
2090 g.zLocalRoot, ctrlSetting->name);
@@ -2105,69 +2105,74 @@
2105 ** is used for on/off checkboxes.
2106 ** The behaviour page doesn't use a special layout. It lists all
2107 ** set-commands and displays the 'set'-help as info.
2108 */
2109 #if INTERFACE
2110
2111 #define SETUP_WIDTH 63
2112 #define SETUP_TEXTAREA 64
2113 #define SETUP_VERSIONABLE 128
2114
2115 struct stControlSettings {
2116 char const *name; /* Name of the setting */
2117 char const *var; /* Internal variable name used by db_set() */
2118 int width; /* Width of display. 0 for boolean values.
2119 possibly or'ed with above flags. */
2120 char const *def; /* Default value */
2121 };
2122 #endif /* INTERFACE */
2123 struct stControlSettings const ctrlSettings[] = {
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" },
2132 #if defined(_WIN32) || defined(__CYGWIN__) || defined(__DARWIN__) || defined(__APPLE__)
2133 { "case-sensitive",0, 0, "off" },
2134 #else
2135 { "case-sensitive",0, 0, "on" },
2136 #endif
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, "" },
2165 #ifdef FOSSIL_ENABLE_TCL
2166 { "tcl", 0, 0, "off" },
2167 { "tcl-setup", 0, SETUP_TEXTAREA|40, "" },
2168 #endif
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 }
2174 };
2175
2176 /*
2177 ** COMMAND: settings
2178 ** COMMAND: unset*
2179
+18 -7
--- src/setup.c
+++ src/setup.c
@@ -1248,45 +1248,56 @@
12481248
@ the meaning of each setting.</p><hr />
12491249
@ <form action="%s(g.zTop)/setup_settings" method="post"><div>
12501250
@ <table border="0"><tr><td valign="top">
12511251
login_insert_csrf_secret();
12521252
for(pSet=ctrlSettings; pSet->name!=0; pSet++){
1253
- if( pSet->width==0 ){
1254
- int hasVersionableValue = pSet->versionable &&
1253
+ if( (pSet->width&SETUP_WIDTH)==0 ){
1254
+ int hasVersionableValue = (pSet->width&SETUP_VERSIONABLE) &&
12551255
(db_get_do_versionable(pSet->name, NULL)!=0);
12561256
onoff_attribute(pSet->name, pSet->name,
12571257
pSet->var!=0 ? pSet->var : pSet->name,
12581258
is_truth(pSet->def), hasVersionableValue);
1259
- if( pSet->versionable ){
1259
+ if( (pSet->width&SETUP_VERSIONABLE) ){
12601260
@ (v)<br />
12611261
} else {
12621262
@ <br />
12631263
}
12641264
}
12651265
}
1266
+ @ <br /><input type="submit" name="submit" value="Apply Changes" />
12661267
@ </td><td style="width:50px;"></td><td valign="top">
12671268
for(pSet=ctrlSettings; pSet->name!=0; pSet++){
1268
- if( pSet->width!=0 && !pSet->versionable){
1269
+ if( (pSet->width&SETUP_WIDTH)!=0
1270
+ && !(pSet->width&(SETUP_VERSIONABLE|SETUP_TEXTAREA)) ){
12691271
entry_attribute(pSet->name, /*pSet->width*/ 25, pSet->name,
12701272
pSet->var!=0 ? pSet->var : pSet->name,
12711273
(char*)pSet->def, 0);
12721274
@ <br />
12731275
}
1276
+ }
1277
+ for(pSet=ctrlSettings; pSet->name!=0; pSet++){
1278
+ if( (pSet->width&SETUP_WIDTH)!=0 && sqlite3_strglob("*glob", pSet->name)
1279
+ && (pSet->width&SETUP_TEXTAREA) ){
1280
+ @<b>%s(pSet->name)</b><br />
1281
+ textarea_attribute("", /*rows*/ 3, /*cols*/ 50, pSet->name,
1282
+ pSet->var!=0 ? pSet->var : pSet->name,
1283
+ (char*)pSet->def, 0);
1284
+ @ <br />
1285
+ }
12741286
}
12751287
@ </td><td style="width:50px;"></td><td valign="top">
12761288
for(pSet=ctrlSettings; pSet->name!=0; pSet++){
1277
- int hasVersionableValue = db_get_do_versionable(pSet->name, NULL)!=0;
1278
- if( pSet->width!=0 && pSet->versionable){
1289
+ if( (pSet->width&SETUP_WIDTH)!=0 && (pSet->width&SETUP_VERSIONABLE) ){
1290
+ int hasVersionableValue = db_get_do_versionable(pSet->name, NULL)!=0;
12791291
@<b>%s(pSet->name)</b> (v)<br />
12801292
textarea_attribute("", /*rows*/ 3, /*cols*/ 20, pSet->name,
12811293
pSet->var!=0 ? pSet->var : pSet->name,
12821294
(char*)pSet->def, hasVersionableValue);
12831295
@<br />
12841296
}
12851297
}
12861298
@ </td></tr></table>
1287
- @ <p><input type="submit" name="submit" value="Apply Changes" /></p>
12881299
@ </div></form>
12891300
@ <p>Settings marked with (v) are 'versionable' and will be overridden
12901301
@ by the contents of files named <tt>.fossil-settings/PROPERTY</tt>.
12911302
@ If such a file is present, the corresponding field above is not
12921303
@ editable.</p><hr /><p>
12931304
--- src/setup.c
+++ src/setup.c
@@ -1248,45 +1248,56 @@
1248 @ the meaning of each setting.</p><hr />
1249 @ <form action="%s(g.zTop)/setup_settings" method="post"><div>
1250 @ <table border="0"><tr><td valign="top">
1251 login_insert_csrf_secret();
1252 for(pSet=ctrlSettings; pSet->name!=0; pSet++){
1253 if( pSet->width==0 ){
1254 int hasVersionableValue = pSet->versionable &&
1255 (db_get_do_versionable(pSet->name, NULL)!=0);
1256 onoff_attribute(pSet->name, pSet->name,
1257 pSet->var!=0 ? pSet->var : pSet->name,
1258 is_truth(pSet->def), hasVersionableValue);
1259 if( pSet->versionable ){
1260 @ (v)<br />
1261 } else {
1262 @ <br />
1263 }
1264 }
1265 }
 
1266 @ </td><td style="width:50px;"></td><td valign="top">
1267 for(pSet=ctrlSettings; pSet->name!=0; pSet++){
1268 if( pSet->width!=0 && !pSet->versionable){
 
1269 entry_attribute(pSet->name, /*pSet->width*/ 25, pSet->name,
1270 pSet->var!=0 ? pSet->var : pSet->name,
1271 (char*)pSet->def, 0);
1272 @ <br />
1273 }
 
 
 
 
 
 
 
 
 
 
1274 }
1275 @ </td><td style="width:50px;"></td><td valign="top">
1276 for(pSet=ctrlSettings; pSet->name!=0; pSet++){
1277 int hasVersionableValue = db_get_do_versionable(pSet->name, NULL)!=0;
1278 if( pSet->width!=0 && pSet->versionable){
1279 @<b>%s(pSet->name)</b> (v)<br />
1280 textarea_attribute("", /*rows*/ 3, /*cols*/ 20, pSet->name,
1281 pSet->var!=0 ? pSet->var : pSet->name,
1282 (char*)pSet->def, hasVersionableValue);
1283 @<br />
1284 }
1285 }
1286 @ </td></tr></table>
1287 @ <p><input type="submit" name="submit" value="Apply Changes" /></p>
1288 @ </div></form>
1289 @ <p>Settings marked with (v) are 'versionable' and will be overridden
1290 @ by the contents of files named <tt>.fossil-settings/PROPERTY</tt>.
1291 @ If such a file is present, the corresponding field above is not
1292 @ editable.</p><hr /><p>
1293
--- src/setup.c
+++ src/setup.c
@@ -1248,45 +1248,56 @@
1248 @ the meaning of each setting.</p><hr />
1249 @ <form action="%s(g.zTop)/setup_settings" method="post"><div>
1250 @ <table border="0"><tr><td valign="top">
1251 login_insert_csrf_secret();
1252 for(pSet=ctrlSettings; pSet->name!=0; pSet++){
1253 if( (pSet->width&SETUP_WIDTH)==0 ){
1254 int hasVersionableValue = (pSet->width&SETUP_VERSIONABLE) &&
1255 (db_get_do_versionable(pSet->name, NULL)!=0);
1256 onoff_attribute(pSet->name, pSet->name,
1257 pSet->var!=0 ? pSet->var : pSet->name,
1258 is_truth(pSet->def), hasVersionableValue);
1259 if( (pSet->width&SETUP_VERSIONABLE) ){
1260 @ (v)<br />
1261 } else {
1262 @ <br />
1263 }
1264 }
1265 }
1266 @ <br /><input type="submit" name="submit" value="Apply Changes" />
1267 @ </td><td style="width:50px;"></td><td valign="top">
1268 for(pSet=ctrlSettings; pSet->name!=0; pSet++){
1269 if( (pSet->width&SETUP_WIDTH)!=0
1270 && !(pSet->width&(SETUP_VERSIONABLE|SETUP_TEXTAREA)) ){
1271 entry_attribute(pSet->name, /*pSet->width*/ 25, pSet->name,
1272 pSet->var!=0 ? pSet->var : pSet->name,
1273 (char*)pSet->def, 0);
1274 @ <br />
1275 }
1276 }
1277 for(pSet=ctrlSettings; pSet->name!=0; pSet++){
1278 if( (pSet->width&SETUP_WIDTH)!=0 && sqlite3_strglob("*glob", pSet->name)
1279 && (pSet->width&SETUP_TEXTAREA) ){
1280 @<b>%s(pSet->name)</b><br />
1281 textarea_attribute("", /*rows*/ 3, /*cols*/ 50, pSet->name,
1282 pSet->var!=0 ? pSet->var : pSet->name,
1283 (char*)pSet->def, 0);
1284 @ <br />
1285 }
1286 }
1287 @ </td><td style="width:50px;"></td><td valign="top">
1288 for(pSet=ctrlSettings; pSet->name!=0; pSet++){
1289 if( (pSet->width&SETUP_WIDTH)!=0 && (pSet->width&SETUP_VERSIONABLE) ){
1290 int hasVersionableValue = db_get_do_versionable(pSet->name, NULL)!=0;
1291 @<b>%s(pSet->name)</b> (v)<br />
1292 textarea_attribute("", /*rows*/ 3, /*cols*/ 20, pSet->name,
1293 pSet->var!=0 ? pSet->var : pSet->name,
1294 (char*)pSet->def, hasVersionableValue);
1295 @<br />
1296 }
1297 }
1298 @ </td></tr></table>
 
1299 @ </div></form>
1300 @ <p>Settings marked with (v) are 'versionable' and will be overridden
1301 @ by the contents of files named <tt>.fossil-settings/PROPERTY</tt>.
1302 @ If such a file is present, the corresponding field above is not
1303 @ editable.</p><hr /><p>
1304
+18 -7
--- src/setup.c
+++ src/setup.c
@@ -1248,45 +1248,56 @@
12481248
@ the meaning of each setting.</p><hr />
12491249
@ <form action="%s(g.zTop)/setup_settings" method="post"><div>
12501250
@ <table border="0"><tr><td valign="top">
12511251
login_insert_csrf_secret();
12521252
for(pSet=ctrlSettings; pSet->name!=0; pSet++){
1253
- if( pSet->width==0 ){
1254
- int hasVersionableValue = pSet->versionable &&
1253
+ if( (pSet->width&SETUP_WIDTH)==0 ){
1254
+ int hasVersionableValue = (pSet->width&SETUP_VERSIONABLE) &&
12551255
(db_get_do_versionable(pSet->name, NULL)!=0);
12561256
onoff_attribute(pSet->name, pSet->name,
12571257
pSet->var!=0 ? pSet->var : pSet->name,
12581258
is_truth(pSet->def), hasVersionableValue);
1259
- if( pSet->versionable ){
1259
+ if( (pSet->width&SETUP_VERSIONABLE) ){
12601260
@ (v)<br />
12611261
} else {
12621262
@ <br />
12631263
}
12641264
}
12651265
}
1266
+ @ <br /><input type="submit" name="submit" value="Apply Changes" />
12661267
@ </td><td style="width:50px;"></td><td valign="top">
12671268
for(pSet=ctrlSettings; pSet->name!=0; pSet++){
1268
- if( pSet->width!=0 && !pSet->versionable){
1269
+ if( (pSet->width&SETUP_WIDTH)!=0
1270
+ && !(pSet->width&(SETUP_VERSIONABLE|SETUP_TEXTAREA)) ){
12691271
entry_attribute(pSet->name, /*pSet->width*/ 25, pSet->name,
12701272
pSet->var!=0 ? pSet->var : pSet->name,
12711273
(char*)pSet->def, 0);
12721274
@ <br />
12731275
}
1276
+ }
1277
+ for(pSet=ctrlSettings; pSet->name!=0; pSet++){
1278
+ if( (pSet->width&SETUP_WIDTH)!=0 && sqlite3_strglob("*glob", pSet->name)
1279
+ && (pSet->width&SETUP_TEXTAREA) ){
1280
+ @<b>%s(pSet->name)</b><br />
1281
+ textarea_attribute("", /*rows*/ 3, /*cols*/ 50, pSet->name,
1282
+ pSet->var!=0 ? pSet->var : pSet->name,
1283
+ (char*)pSet->def, 0);
1284
+ @ <br />
1285
+ }
12741286
}
12751287
@ </td><td style="width:50px;"></td><td valign="top">
12761288
for(pSet=ctrlSettings; pSet->name!=0; pSet++){
1277
- int hasVersionableValue = db_get_do_versionable(pSet->name, NULL)!=0;
1278
- if( pSet->width!=0 && pSet->versionable){
1289
+ if( (pSet->width&SETUP_WIDTH)!=0 && (pSet->width&SETUP_VERSIONABLE) ){
1290
+ int hasVersionableValue = db_get_do_versionable(pSet->name, NULL)!=0;
12791291
@<b>%s(pSet->name)</b> (v)<br />
12801292
textarea_attribute("", /*rows*/ 3, /*cols*/ 20, pSet->name,
12811293
pSet->var!=0 ? pSet->var : pSet->name,
12821294
(char*)pSet->def, hasVersionableValue);
12831295
@<br />
12841296
}
12851297
}
12861298
@ </td></tr></table>
1287
- @ <p><input type="submit" name="submit" value="Apply Changes" /></p>
12881299
@ </div></form>
12891300
@ <p>Settings marked with (v) are 'versionable' and will be overridden
12901301
@ by the contents of files named <tt>.fossil-settings/PROPERTY</tt>.
12911302
@ If such a file is present, the corresponding field above is not
12921303
@ editable.</p><hr /><p>
12931304
--- src/setup.c
+++ src/setup.c
@@ -1248,45 +1248,56 @@
1248 @ the meaning of each setting.</p><hr />
1249 @ <form action="%s(g.zTop)/setup_settings" method="post"><div>
1250 @ <table border="0"><tr><td valign="top">
1251 login_insert_csrf_secret();
1252 for(pSet=ctrlSettings; pSet->name!=0; pSet++){
1253 if( pSet->width==0 ){
1254 int hasVersionableValue = pSet->versionable &&
1255 (db_get_do_versionable(pSet->name, NULL)!=0);
1256 onoff_attribute(pSet->name, pSet->name,
1257 pSet->var!=0 ? pSet->var : pSet->name,
1258 is_truth(pSet->def), hasVersionableValue);
1259 if( pSet->versionable ){
1260 @ (v)<br />
1261 } else {
1262 @ <br />
1263 }
1264 }
1265 }
 
1266 @ </td><td style="width:50px;"></td><td valign="top">
1267 for(pSet=ctrlSettings; pSet->name!=0; pSet++){
1268 if( pSet->width!=0 && !pSet->versionable){
 
1269 entry_attribute(pSet->name, /*pSet->width*/ 25, pSet->name,
1270 pSet->var!=0 ? pSet->var : pSet->name,
1271 (char*)pSet->def, 0);
1272 @ <br />
1273 }
 
 
 
 
 
 
 
 
 
 
1274 }
1275 @ </td><td style="width:50px;"></td><td valign="top">
1276 for(pSet=ctrlSettings; pSet->name!=0; pSet++){
1277 int hasVersionableValue = db_get_do_versionable(pSet->name, NULL)!=0;
1278 if( pSet->width!=0 && pSet->versionable){
1279 @<b>%s(pSet->name)</b> (v)<br />
1280 textarea_attribute("", /*rows*/ 3, /*cols*/ 20, pSet->name,
1281 pSet->var!=0 ? pSet->var : pSet->name,
1282 (char*)pSet->def, hasVersionableValue);
1283 @<br />
1284 }
1285 }
1286 @ </td></tr></table>
1287 @ <p><input type="submit" name="submit" value="Apply Changes" /></p>
1288 @ </div></form>
1289 @ <p>Settings marked with (v) are 'versionable' and will be overridden
1290 @ by the contents of files named <tt>.fossil-settings/PROPERTY</tt>.
1291 @ If such a file is present, the corresponding field above is not
1292 @ editable.</p><hr /><p>
1293
--- src/setup.c
+++ src/setup.c
@@ -1248,45 +1248,56 @@
1248 @ the meaning of each setting.</p><hr />
1249 @ <form action="%s(g.zTop)/setup_settings" method="post"><div>
1250 @ <table border="0"><tr><td valign="top">
1251 login_insert_csrf_secret();
1252 for(pSet=ctrlSettings; pSet->name!=0; pSet++){
1253 if( (pSet->width&SETUP_WIDTH)==0 ){
1254 int hasVersionableValue = (pSet->width&SETUP_VERSIONABLE) &&
1255 (db_get_do_versionable(pSet->name, NULL)!=0);
1256 onoff_attribute(pSet->name, pSet->name,
1257 pSet->var!=0 ? pSet->var : pSet->name,
1258 is_truth(pSet->def), hasVersionableValue);
1259 if( (pSet->width&SETUP_VERSIONABLE) ){
1260 @ (v)<br />
1261 } else {
1262 @ <br />
1263 }
1264 }
1265 }
1266 @ <br /><input type="submit" name="submit" value="Apply Changes" />
1267 @ </td><td style="width:50px;"></td><td valign="top">
1268 for(pSet=ctrlSettings; pSet->name!=0; pSet++){
1269 if( (pSet->width&SETUP_WIDTH)!=0
1270 && !(pSet->width&(SETUP_VERSIONABLE|SETUP_TEXTAREA)) ){
1271 entry_attribute(pSet->name, /*pSet->width*/ 25, pSet->name,
1272 pSet->var!=0 ? pSet->var : pSet->name,
1273 (char*)pSet->def, 0);
1274 @ <br />
1275 }
1276 }
1277 for(pSet=ctrlSettings; pSet->name!=0; pSet++){
1278 if( (pSet->width&SETUP_WIDTH)!=0 && sqlite3_strglob("*glob", pSet->name)
1279 && (pSet->width&SETUP_TEXTAREA) ){
1280 @<b>%s(pSet->name)</b><br />
1281 textarea_attribute("", /*rows*/ 3, /*cols*/ 50, pSet->name,
1282 pSet->var!=0 ? pSet->var : pSet->name,
1283 (char*)pSet->def, 0);
1284 @ <br />
1285 }
1286 }
1287 @ </td><td style="width:50px;"></td><td valign="top">
1288 for(pSet=ctrlSettings; pSet->name!=0; pSet++){
1289 if( (pSet->width&SETUP_WIDTH)!=0 && (pSet->width&SETUP_VERSIONABLE) ){
1290 int hasVersionableValue = db_get_do_versionable(pSet->name, NULL)!=0;
1291 @<b>%s(pSet->name)</b> (v)<br />
1292 textarea_attribute("", /*rows*/ 3, /*cols*/ 20, pSet->name,
1293 pSet->var!=0 ? pSet->var : pSet->name,
1294 (char*)pSet->def, hasVersionableValue);
1295 @<br />
1296 }
1297 }
1298 @ </td></tr></table>
 
1299 @ </div></form>
1300 @ <p>Settings marked with (v) are 'versionable' and will be overridden
1301 @ by the contents of files named <tt>.fossil-settings/PROPERTY</tt>.
1302 @ If such a file is present, the corresponding field above is not
1303 @ editable.</p><hr /><p>
1304

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button