e9860a7ad658ba7e411f5ea1472198f280652cc9
max
  Mon Apr 30 10:17:10 2012 -0700
added one missing file to theme commit (config option dialog)
diff --git src/hg/hgTracks/config.c src/hg/hgTracks/config.c
index 35f17ea..8d2c51b 100644
--- src/hg/hgTracks/config.c
+++ src/hg/hgTracks/config.c
@@ -5,30 +5,62 @@
 #include "cheapcgi.h"
 #include "htmshell.h"
 #include "hdb.h"
 #include "hCommon.h"
 #include "cart.h"
 #include "web.h"
 #include "customTrack.h"
 #include "hgTracks.h"
 #include "hgConfig.h"
 #include "jsHelper.h"
 #include "imageV2.h"
 #include "search.h"
 #include "hubConnect.h"
 #include "fileUi.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;
+
+hPrintf("<TR><TD>website style:");
+hPrintf("<TD style=\"text-align: right\">");
+
+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);
+    labels[i] = name;
+    i++;
+    }
+char* currentTheme = cartOptionalString(cart, "classic"); // default value is classic
+hDropList("theme", labels, i, currentTheme);
+slFreeList(themes);
+hPrintf("</TD>");
+}
+
 static void textSizeDropDown()
 /* Create drop down for font size. */
 {
 static char *sizes[] = {"6", "8", "10", "12", "14", "18", "24", "34"};
 hDropList(textSizeVar, sizes, ArraySize(sizes), tl.textSize);
 }
 
 static void trackConfig(struct track *trackList, struct group *groupList,
 	char *groupTarget,  int changeVis)
 /* Put up track configurations. If groupTarget is
  * NULL then set visibility for tracks in all groups.  Otherwise,
  * just set it for the given group.  If vis is -2, then visibility is
  * unchanged.  If -1 then set visibility to default, otherwise it should
  * be tvHide, tvDense, etc. */
 {
@@ -366,31 +398,33 @@
 hPrintf("<TR><TD>text size:");
 hPrintf("<TD style=\"text-align: right\">");
 textSizeDropDown();
 hPrintf("<TD>");
 if (trackLayoutInclFontExtras())
     {
     char *defaultStyle = cartUsualString(cart, "fontType", "medium");
     cartMakeRadioButton(cart, "fontType", "medium", defaultStyle);
     hPrintf("&nbsp;medium&nbsp;");
     cartMakeRadioButton(cart, "fontType", "fixed", defaultStyle);
     hPrintf("&nbsp;fixed&nbsp;");
     cartMakeRadioButton(cart, "fontType", "bold", defaultStyle);
     hPrintf("&nbsp;bold&nbsp;");
     hPrintf("&nbsp;");
     }
-hPrintf("<TR><BR>");
+
+themeDropDown(cart);
+
 hTableStart();
 if (ideoTrack != NULL)
     {
     hPrintf("<TR><TD>");
     hCheckBox("ideogram", cartUsualBoolean(cart, "ideogram", TRUE));
     hPrintf("</TD><TD>");
     hPrintf("Display chromosome ideogram above main graphic");
     hPrintf("</TD></TR>\n");
     }
 hPrintf("<TR><TD>");
 hCheckBox("guidelines", cartUsualBoolean(cart, "guidelines", TRUE));
 hPrintf("</TD><TD>");
 hPrintf("Show light blue vertical guidelines");
 hPrintf("</TD></TR>\n");
 
@@ -448,22 +482,21 @@
 hPrintf(" ");
 cgiMakeButtonWithMsg(configDefaultAll, "default","Display only default tracks");
 hPrintf("&nbsp;&nbsp;&nbsp;Groups:  ");
 hButtonWithOnClick("hgt.collapseGroups", "collapse all", "Collapse all track groups", "return vis.expandAllGroups(false)");
 hPrintf(" ");
 hButtonWithOnClick("hgt.expandGroups", "expand all", "Expand all track groups", "return vis.expandAllGroups(true)");
 hPrintf("<div style='margin-top:.2em; margin-bottom:.9em;'>Control track and group visibility more selectively below.</div>");
 trackConfig(trackList, groupList, groupTarget, vis);
 
 dyStringFree(&title);
 freez(&groupTarget);
 webEndSectionTables();
 hPrintf("</FORM>");
 }
 
-
 void configPage()
 /* Put up configuration page. */
 {
 configPageSetTrackVis(-2);
 }