a4fdc4a93499c868a15a5d732a3e76db887d33c7
kate
  Fri May 17 15:43:48 2013 -0700
Cleanup libification of factorSource UI. refs #10097
diff --git src/hg/lib/hui.c src/hg/lib/hui.c
index 5d1cfea..24cb454 100644
--- src/hg/lib/hui.c
+++ src/hg/lib/hui.c
@@ -7673,34 +7673,37 @@
     char *name;
     char *description;
     };
 
 static int factorSourceInfoCmp(const void *va, const void *vb)
 /* Compare two factorSourceInfo's, sorting on name and then description fields */
 {
 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, char *sourceTable, boolean cellsOnly)
-/* Print out table of abbreviations. Optionally, extract cell name only (before '+') and uniqify */
+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);
 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)