Fossil

Check-in [ee723ed98d]
Login

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

Overview
Comment:Vary the number of columns of displayed files in the File List depending on the length of the longest filename in the list.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ee723ed98ddb0a712da0521b0a0df1b64ddbd741
User & Date: drh 2011-10-15 17:36:04.496
References
2011-10-16
10:04
merged/resolved trunk [ee723ed98ddb0a]. check-in: a40ac8fdc4 user: stephan tags: json-multitag-test, json
Context
2011-10-16
17:32
Fix new and harmless compiler warnings that appeared with the upgrade to GCC 4.6.1. check-in: d8bbe4add6 user: drh tags: trunk
12:56
Merge latest changes from trunk check-in: 1349e5ed20 user: ashish tags: ashish-ipv6
10:04
merged/resolved trunk [ee723ed98ddb0a]. check-in: a40ac8fdc4 user: stephan tags: json-multitag-test, json
2011-10-15
17:36
Vary the number of columns of displayed files in the File List depending on the length of the longest filename in the list. check-in: ee723ed98d user: drh tags: trunk
17:18
Update to the Fossil-v-Git matrix. check-in: a52287876c user: drh tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/browse.c.
247
248
249
250
251
252
253
254


255
256
257
258
259
260
261
  }

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


  nRow = (cnt+nCol-1)/nCol;
  db_prepare(&q, "SELECT x, u FROM localfiles ORDER BY x /*scan*/");
  @ <table class="browser"><tr><td class="browser"><ul class="browser">
  i = 0;
  while( db_step(&q)==SQLITE_ROW ){
    const char *zFN;
    if( i==nRow ){







|
>
>







247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
  }

  /* Generate a multi-column table listing the contents of zD[]
  ** directory.
  */
  mxLen = db_int(12, "SELECT max(length(x)) FROM localfiles /*scan*/");
  cnt = db_int(0, "SELECT count(*) FROM localfiles /*scan*/");
  nCol = 100/mxLen;
  if( nCol<1 ) nCol = 1;
  if( nCol>5 ) nCol = 5;
  nRow = (cnt+nCol-1)/nCol;
  db_prepare(&q, "SELECT x, u FROM localfiles ORDER BY x /*scan*/");
  @ <table class="browser"><tr><td class="browser"><ul class="browser">
  i = 0;
  while( db_step(&q)==SQLITE_ROW ){
    const char *zFN;
    if( i==nRow ){