8083235171a7227233b561a87d4950a3640ef232 tdreszer Thu Nov 11 09:57:45 2010 -0800 Added support for pennantIcon as requested by b0b. First use flagging hg18 to hg19 liftOver tracks. diff --git src/hg/hgTracks/config.c src/hg/hgTracks/config.c index e7b2841..82561b8 100644 --- src/hg/hgTracks/config.c +++ src/hg/hgTracks/config.c @@ -36,30 +36,31 @@ { groups[numGroups] = group->name; labels[numGroups] = group->name; if (sameWord(defaultGroup, groups[numGroups])) defaultLabel = groups[numGroups]; numGroups++; if (numGroups >= ArraySize(groups)) internalErr(); } cgiMakeDropListFull(groupCgiName, labels, groups, numGroups, defaultLabel, NULL); } #endif///def PRIORITY_CHANGES_IN_CONFIG_UI + 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. */ { #ifdef PRIORITY_CHANGES_IN_CONFIG_UI char pname[512]; char gname[512]; #endif///def PRIORITY_CHANGES_IN_CONFIG_UI struct group *group; boolean showedRuler = FALSE; @@ -221,32 +222,34 @@ group->trackList = refList; } /* Loop through this group and display */ int rowCount=1; for (tr = group->trackList; tr != NULL; tr = tr->next) { struct track *track = tr->track; struct trackDb *tdb = track->tdb; hPrintf("<TR %sid='%s-%d'>",(isOpen ? "" : "style='display: none'"),group->name, rowCount++); hPrintf("<TD NOWRAP>"); if (tdbIsSuperTrackChild(tdb)) /* indent members of a supertrack */ hPrintf(" "); - if(trackDbSetting(track->tdb, "wgEncode") != NULL) - hPrintf("<a title='encode project' href='../ENCODE'><img height='16' width='16' src='../images/encodeThumbnail.jpg'></a>\n"); + + // Print an icon before the title when one is defined + hPrintPennantIcon(track->tdb); + if (track->hasUi) hPrintf("<A %s%s%s HREF=\"%s?%s=%u&g=%s&hgTracksConfigPage=configure\">", tdb->parent ? "TITLE=\"Part of super track: " : "", tdb->parent ? tdb->parent->shortLabel : "", tdb->parent ? "...\"" : "", hgTrackUiName(), cartSessionVarName(), cartSessionId(cart), track->track); hPrintf(" %s", track->shortLabel); if (tdbIsSuper(track->tdb)) hPrintf("..."); if (track->hasUi) hPrintf("</A>"); hPrintf("</TD>"); hPrintf("<TD NOWRAP>"); if (tdbIsSuperTrackChild(tdb)) /* indent members of a supertrack */ @@ -466,15 +469,16 @@ hPrintf("<P STYLE=\"margin-top:5;\">Control track and group visibility more selectively below.<P>"); trackConfig(trackList, groupList, groupTarget, vis); dyStringFree(&title); freez(&groupTarget); webEndSectionTables(); hPrintf("</FORM>"); } void configPage() /* Put up configuration page. */ { configPageSetTrackVis(-2); } +