83b751ac37696b83777d2fe6939e4571e7da0bd4 max Mon Jun 12 06:28:58 2023 -0700 adding little trash icons next to custom tracks for quicker disposal, refs #31504 diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c index f3f5b49..5c741cb 100644 --- src/hg/hgTracks/hgTracks.c +++ src/hg/hgTracks/hgTracks.c @@ -128,31 +128,31 @@ boolean withIdeogram = TRUE; /* Display chromosome ideogram? */ int rulerMode = tvHide; /* on, off, full */ struct hvGfx *hvgSide = NULL; // Extra pointer to a sideLabel image that can be built if needed char *rulerMenu[] = /* dropdown for ruler visibility */ { "hide", "dense", "full" }; char *protDbName; /* Name of proteome database for this genome. */ -#define MAX_CONTROL_COLUMNS 6 +#define MAX_CONTROL_COLUMNS 8 #define LOW 1 #define MEDIUM 2 #define BRIGHT 3 #define MAXCHAINS 50000000 boolean hgDebug = FALSE; /* Activate debugging code. Set to true by hgDebug=on in command line*/ int imagePixelHeight = 0; struct hash *oldVars = NULL; struct jsonElement *jsonForClient = NULL; boolean hideControls = FALSE; /* Hide all controls? */ boolean trackImgOnly = FALSE; /* caller wants just the track image and track table html */ boolean ideogramToo = FALSE; /* caller wants the ideoGram (when requesting just one track) */ /* Structure returned from resolvePosition. * We use this to to expand any tracks to full @@ -8230,60 +8230,71 @@ } static void printMultiRegionButton() /* Print button that launches multi-region configuration pop-up */ { boolean isPressed = FALSE; if (differentString(virtModeType, "default")) isPressed = TRUE; char buf[256]; safef(buf, sizeof buf, "configure %s multi-region display mode", isPressed ? "or exit" : ""); hButtonNoSubmitMaybePressed("hgTracksConfigMultiRegionPage", "multi-region", buf, "popUpHgt.hgTracks('multi-region config'); return false;", isPressed); } +static void printTrackDelIcon(struct track *track) +/* little track icon after track name. Github uses SVG elements for all icons, apparently that is faster */ +{ + hPrintf("
", track->track); + +} + static void printTrackLink(struct track *track) /* print a link hgTrackUi with shortLabel and various icons and mouseOvers */ { if (track->hasUi) { char *url = trackUrl(track->track, chromName); char *longLabel = replaceChars(track->longLabel, "\"", """); struct dyString *dsMouseOver = dyStringCreate("%s", longLabel); struct trackDb *tdb = track->tdb; if (tdbIsSuper(tdb)) dyStringPrintf(dsMouseOver, " - this is a container track with %d subtracks of different types " "(super track)", slCount(tdb->children)); else if (tdbIsComposite(tdb)) dyStringPrintf(dsMouseOver, " - this is a container track with %d subtracks of similar types " "(composite track)", slCount(tdb->subtracks)); // Print icons before the title when any are defined hPrintIcons(track->tdb); - hPrintf("", url, dyStringCannibalize(&dsMouseOver)); + hPrintf("", url, track->groupName, track->track, dyStringCannibalize(&dsMouseOver)); freeMem(url); freeMem(longLabel); } hPrintf("%s", track->shortLabel); if (track->hasUi) hPrintf(""); + +if (sameOk(track->groupName, "user")) + printTrackDelIcon(track); + hPrintf("