38eb8f2928026c01ab5b442fb964b6486dbf02ef
angie
  Fri Jan 11 11:59:18 2019 -0800
Daniel found that the compress (.Z) and zip options were failing.  Turns out hgSession was the only user of textOutCompressMenuContents.  Follow suit with other CGIs and offer only gzip for compression.  refs #22638

diff --git src/hg/hgSession/hgSession.c src/hg/hgSession/hgSession.c
index 9fb0097..864a092 100644
--- src/hg/hgSession/hgSession.c
+++ src/hg/hgSession/hgSession.c
@@ -453,34 +453,30 @@
        "</TD>\n");
 printf("<TD>\n");
 cgiMakeOnKeypressTextVar(hgsLoadUrlName,
 			 cartUsualString(cart, hgsLoadUrlName, ""),
 			 20, jsPressOnEnter(hgsDoLoadUrl));
 printf("&nbsp;&nbsp;");
 cgiMakeButton(hgsDoLoadUrl, "submit");
 printf("</TD></TR>\n");
 printf("</TABLE>\n");
 printf("<P></P>\n");
 }
 
 void showSavingOptions(char *userName)
 /* Show options for saving a new named session in our db or to a file. */
 {
-static char *textOutCompressMenu[] = textOutCompressMenuContents;
-static char *textOutCompressValues[] = textOutCompressValuesContents;
-static int textOutCompressMenuSize = ArraySize(textOutCompressMenu) - 1;
-
 printf("<H3>Save Settings</H3>\n");
 printf("<TABLE BORDERWIDTH=0>\n");
 
 if (isNotEmpty(userName))
     {
     printf("<TR><TD colspan=4>Save current settings as named session:"
 	   "</TD></TR>\n"
 	   "<TR><TD>&nbsp;&nbsp;&nbsp;</TD><TD>name:</TD><TD>\n");
     cgiMakeOnKeypressTextVar(hgsNewSessionName,
 			     cartUsualString(cart, "db", NULL),
 			     20, jsPressOnEnter(hgsDoNewSession));
     printf("&nbsp;&nbsp;&nbsp;");
     cgiMakeCheckBox(hgsNewSessionShare,
 		    cartUsualBoolean(cart, hgsNewSessionShare, TRUE));
     printf("allow this session to be loaded by others\n");
@@ -509,34 +505,37 @@
 	dyStringFree(&js);
 	}
     else
 	cgiMakeButton(hgsDoNewSession, "submit");
     printf("</TD></TR>\n");
     printf("<TR><TD colspan=4></TD></TR>\n");
     }
 
 printf("<TR><TD colspan=4>Save current settings to a local file:</TD></TR>\n");
 printf("<TR><TD>&nbsp;&nbsp;&nbsp;</TD><TD>file:</TD><TD>\n");
 cgiMakeOnKeypressTextVar(hgsSaveLocalFileName,
 			 cartUsualString(cart, hgsSaveLocalFileName, ""),
 			 20, jsPressOnEnter(hgsDoSaveLocal));
 printf("&nbsp;&nbsp;&nbsp;");
 printf("file type returned: ");
-cgiMakeDropListFull(hgsSaveLocalFileCompress,
-	textOutCompressMenu, textOutCompressValues, textOutCompressMenuSize,
-	cartUsualString(cart, hgsSaveLocalFileCompress, textOutCompressNone),
-	NULL, NULL);
+char *compressType = cartUsualString(cart, hgsSaveLocalFileCompress, textOutCompressNone);
+cgiMakeRadioButton(hgsSaveLocalFileCompress, textOutCompressNone,
+		   differentWord(textOutCompressGzip, compressType));
+printf("&nbsp;plain text&nbsp&nbsp");
+cgiMakeRadioButton(hgsSaveLocalFileCompress, textOutCompressGzip,
+		   sameWord(textOutCompressGzip, compressType));
+printf("&nbsp;gzip compressed (ignored if output file is blank)");
 printf("</TD><TD>");
 printf("&nbsp;");
 cgiMakeButton(hgsDoSaveLocal, "submit");
 printf("</TD></TR>\n");
 printf("<TR><TD></TD><TD colspan=3>(leave file blank to get output in "
        "browser window)</TD></TR>\n");
 printf("<TR><TD colspan=4></TD></TR>\n");
 printf("</TABLE>\n");
 }
 
 void showSessionControls(char *userName, boolean savedSessionsSupported,
 			 boolean webStarted)
 /* If userName is non-null, show sessions that belong to user and allow
  * saving of named sessions.
  * If savedSessionsSupported, allow import of named sessions.