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"); } 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(); }