b815de97252a620cdc9a54d4dc0d48e1a4e341da Merge parents 730b08b e40c90b kate Fri Jun 7 16:49:44 2013 -0700 Merge branch 'master' into tfclusters diff --cc src/hg/lib/hui.c index 7bd4bf7,6e9c13f..ccab58e --- src/hg/lib/hui.c +++ src/hg/lib/hui.c @@@ -7679,46 -7679,55 +7679,46 @@@ { static char bufA[64], bufB[64]; const struct factorSourceInfo *a = *((struct factorSourceInfo **)va); const struct factorSourceInfo *b = *((struct factorSourceInfo **)vb); safef(bufA, 64, "%s+%s", a->name, a->description); safef(bufB, 64, "%s+%s", b->name, b->description); return strcmp(bufA, bufB); } void hPrintFactorSourceAbbrevTable(struct sqlConnection *conn, struct trackDb *tdb) /* Print out table of abbreviations. With 'pack' setting, * show cell name only (before '+') and uniqify */ { char *label = "Cell Type"; char *sourceTable = trackDbRequiredSetting(tdb, SOURCE_TABLE); -boolean cellsOnly = trackDbSettingOn(tdb, SOURCE_TABLE_PACK); -if (!cellsOnly) - { - hPrintAbbreviationTable(conn, sourceTable, label); - return; - } char query[256]; - safef(query, sizeof(query), "select name,description from %s order by name", sourceTable); + sqlSafef(query, sizeof(query), "select name,description from %s order by name", sourceTable); struct sqlResult *sr = sqlGetResult(conn, query); webPrintLinkTableStart(); webPrintLabelCell("Symbol"); webPrintLabelCell(label); char **row; char *plus; struct factorSourceInfo *source = NULL, *sources = NULL; while ((row = sqlNextRow(sr)) != NULL) { char *name = row[0]; char *description = row[1]; - if (cellsOnly) - { - // truncate description to just the cell type - if ((plus = strchr(description, '+')) != NULL) - *plus = 0; - } + // truncate description to just the cell type + if ((plus = strchr(description, '+')) != NULL) + *plus = 0; AllocVar(source); source->name = cloneString(name); source->description = cloneString(description); slAddHead(&sources, source); } slUniqify(&sources, factorSourceInfoCmp, NULL); int count = 0; while ((source = slPopHead(&sources)) != NULL) { printf("\n"); webPrintLinkCell(source->name); webPrintLinkCellStart(); fputs(source->description, stdout); count++; while (sources && sameString(sources->name, source->name))