fd0cbd09083b5b275dbd73671013e3b7ad3b575c angie Wed Sep 2 16:54:21 2015 -0700 Check whether local file "extTools.ra" exists before calling printExtMenuData and showing the keyboard shortcuts for it. diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index 76a1e01..2543249 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -5801,31 +5801,31 @@ void resetVars() /* Reset vars except for position and database. */ { static char *except[] = {"db", "position", NULL}; char *cookieName = hUserCookie(); char *sessionId = cgiOptionalString(cartSessionVarName()); char *userId = findCookieData(cookieName); struct cart *oldCart = cartNew(userId, sessionId, NULL, NULL); cartRemoveExcept(oldCart, except); cartCheckout(&oldCart); cgiVarExcludeExcept(except); } -void setupHotkeys() +void setupHotkeys(boolean gotExtTools) /* setup keyboard shortcuts and a help dialog for it */ { // XX remove if statement after July 2015 if (!cfgOptionDefault("hotkeys", FALSE)) return; // wire the keyboard hotkeys hPrintf("\n"); // help dialog hPrintf("
\n"); hPrintf("\n"); hPrintf("\n"); // percent sign hPrintf("\n"); hPrintf("\n"); hPrintf("\n"); // percent sign hPrintf("\n"); hPrintf("\n"); hPrintf("\n"); hPrintf("\n"); hPrintf("\n"); hPrintf("\n"); hPrintf("\n"); -hPrintf("\n"); +hPrintf(""); +if (gotExtTools) + hPrintf(""); +hPrintf(" \n"); hPrintf("\n"); hPrintf("\n"); hPrintf("
left 10%ctrl+j track searcht then s
left 1/2 screenj default tracksd then t
left one screenJ default orderd then o
right 10%ctrl+l hide allh then a
right 1/2 screenl custom tracksc then t
right one screenL track hubst then h
zoom in 1.5xctrl+i configurec then f
zoom in 3xi reverser then v
zoom in 10xI resizer then s
zoom in base levelb refreshr then f
zoom out 1.5xctrl+k jump to position box/
zoom out 3xkSent to external tools then t
zoom out 3xkSent to external tools then t
zoom out 10xK
zoom out 100x0
\n"); hPrintf(""); hPrintf("
\n"); } void doMiddle(struct cart *theCart) /* Print the body of an html file. */ { cart = theCart; measureTiming = hPrintStatus() && isNotEmpty(cartOptionalString(cart, "measureTiming")); if (measureTiming) measureTime("Startup"); @@ -6065,19 +6069,21 @@ newJsonBoolean(cartUsualBoolean(cart, "enableHighlightingDialog", TRUE))); hPrintf("\n"); if (measureTiming) measureTime("Time at end of doMiddle, next up cart write"); if (cartOptionalString(cart, "udcTimeout")) { warn("The Genome Browser cart currently includes the \"udcTimeout\" string. " "While this is useful for debugging hubs, it may negatively impact " "performance. To clear this variable, click " "here.",cartSessionId(cart)); } -setupHotkeys(); +boolean gotExtTools = extToolsEnabled(); +setupHotkeys(gotExtTools); +if (gotExtTools) printExtMenuData(); }