Fossil

Check-in [e585c3e6]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:In the file browser, limit the maximum number of columns to be the number of files, so that a single file is never split across two columns.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:e585c3e676a9f4157335d71edba82d4a09c419009ec7c985de29d4efc4759a86
User & Date: drh 2018-09-02 10:07:09
Context
2018-09-02
21:47
Merged tclsh-macos down to trunk. check-in: ee2ffe35 user: wyoung tags: trunk
20:33
After autosetup checks for the existence of tclsh in the PATH, it now checks whether it's at least version 8.6, because macOS is still shipping 8.5, despite it being nearly 6 years old. If we find an old tclsh, try to find the Homebrew tcl-tk package, and use that version instead. This is not a macOS or Homebrew specific change in principle: we can extend this logic for other systems to find their best Tcl/Tk version, as needed.

On systems where autosetup is used, this only affects "make test". There are other uses of tclsh in this tree which may also benefit from our PATH discoveries, but this checkin doesn't update those.

This checkin also doesn't try to address similar problems on other platforms, such as the "TCLSH = tclsh" line in Makefile.mingw. check-in: e449cb09 user: wyoung tags: tclsh-macos

10:07
In the file browser, limit the maximum number of columns to be the number of files, so that a single file is never split across two columns. check-in: e585c3e6 user: drh tags: trunk
2018-09-01
20:49
Noted the responsive design changes to the default skin in the change log. Expanded on the forum and alerts feature items. Changed all the past-tense verbs to present tense to match the rest of the items and the prevailing style in past change log entries. check-in: 6f87b4af user: wyoung tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/browse.c.

119
120
121
122
123
124
125

126
127
128
129
130
131
132
...
265
266
267
268
269
270
271

272

273
274
275
276
277
278
279
280
281
**    type=TYPE        TYPE=flat: use this display
**                     TYPE=tree: use the /tree display instead
*/
void page_dir(void){
  char *zD = fossil_strdup(P("name"));
  int nD = zD ? strlen(zD)+1 : 0;
  int mxLen;

  char *zPrefix;
  Stmt q;
  const char *zCI = P("ci");
  int rid = 0;
  char *zUuid = 0;
  Blob dirname;
  Manifest *pM = 0;
................................................................................
    );
  }

  /* Generate a multi-column table listing the contents of zD[]
  ** directory.
  */
  mxLen = db_int(12, "SELECT max(length(x)) FROM localfiles /*scan*/");

  if( mxLen<12 ) mxLen = 12;

  db_prepare(&q, "SELECT x, u FROM localfiles ORDER BY x /*scan*/");
  @ <div class="columns" style="column-width: %d(mxLen+(mxLen+9)/10)ex;">
  @ <ul class="browser">
  while( db_step(&q)==SQLITE_ROW ){
    const char *zFN;
    zFN = db_column_text(&q, 0);
    if( zFN[0]=='/' ){
      zFN++;
      @ <li class="dir">%z(href("%s%T",zSubdirLink,zFN))%h(zFN)</a></li>







>







 







>

>

|







119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
...
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
**    type=TYPE        TYPE=flat: use this display
**                     TYPE=tree: use the /tree display instead
*/
void page_dir(void){
  char *zD = fossil_strdup(P("name"));
  int nD = zD ? strlen(zD)+1 : 0;
  int mxLen;
  int n;
  char *zPrefix;
  Stmt q;
  const char *zCI = P("ci");
  int rid = 0;
  char *zUuid = 0;
  Blob dirname;
  Manifest *pM = 0;
................................................................................
    );
  }

  /* Generate a multi-column table listing the contents of zD[]
  ** directory.
  */
  mxLen = db_int(12, "SELECT max(length(x)) FROM localfiles /*scan*/");
  n = db_int(1,"SELECT count(*) FROM localfiles; /*scan*/");
  if( mxLen<12 ) mxLen = 12;
  mxLen += (mxLen+9)/10;
  db_prepare(&q, "SELECT x, u FROM localfiles ORDER BY x /*scan*/");
  @ <div class="columns" style="columns: %d(mxLen)ex %d(n);">
  @ <ul class="browser">
  while( db_step(&q)==SQLITE_ROW ){
    const char *zFN;
    zFN = db_column_text(&q, 0);
    if( zFN[0]=='/' ){
      zFN++;
      @ <li class="dir">%z(href("%s%T",zSubdirLink,zFN))%h(zFN)</a></li>