af6898753ba6d5f3872957cd270872ce4c4e3dfc
max
  Tue Apr 11 08:19:27 2023 -0700
tolerate if browser CSS theme files do not exist, cleaning up the resource link mess a little, refs #7867

diff --git src/hg/hgTracks/config.c src/hg/hgTracks/config.c
index 583d63f..f7e9c5c 100644
--- src/hg/hgTracks/config.c
+++ src/hg/hgTracks/config.c
@@ -16,47 +16,49 @@
 #include "hgConfig.h"
 #include "jsHelper.h"
 #include "imageV2.h"
 #include "search.h"
 #include "hubConnect.h"
 #include "fileUi.h"
 #include "trackHub.h"
 
 static void themeDropDown(struct cart* cart)
 /* Create drop down for UI themes. 
  * specfied in hg.conf like this
  * browser.theme.modern=background.png,HGStyle
  * */
 {
 struct slName* themes = cfgNamesWithPrefix("browser.theme.");
-//struct slName* themes = cfgNames();
 if (themes==NULL)
     return;
 
+slNameSort(&themes);
 hPrintf("<TR><TD>website style:");
 hPrintf("<TD style=\"text-align: right\">");
 
 // create labels for drop down box by removing prefix from hg.conf keys
 char *labels[50];
 struct slName* el;
 int i = 0;
 el = themes;
 for (el = themes; el != NULL && i<50; el = el->next)
     {
     char* name = el->name;
-    name = chopPrefix(name); // chop off first two words
+    name = chopPrefix(name); // chop off first three words
     name = chopPrefix(name);
+    name = chopPrefix(name);
+    replaceChar(name, '_', ' ');
     labels[i] = name;
     i++;
     }
 
 char* currentTheme = cartOptionalString(cart, "theme"); 
 hDropList("theme", labels, i, currentTheme);
 slFreeList(themes);
 hPrintf("</TD>");
 }
 
 char *freeTypeFontNames[] = {
 "AvantGarde-Book",
 "AvantGarde-Demi",
 "AvantGarde-BookOblique",
 "AvantGarde-DemiOblique",