1e764da505c90a8f0a99d8ce79d3b225f0d6eb55 braney Mon Jul 18 18:23:06 2011 -0700 fixes to problems in #4627 diff --git src/hg/hgHubConnect/hgHubConnect.c src/hg/hgHubConnect/hgHubConnect.c index 48c883f..47a83bf 100644 --- src/hg/hgHubConnect/hgHubConnect.c +++ src/hg/hgHubConnect/hgHubConnect.c @@ -70,41 +70,41 @@ " "); // count up the number of unlisted hubs we currently have int count = 0; struct hubConnectStatus *hub, *hubList = hubConnectStatusListFromCartAll(cart); for(hub = hubList; hub; hub = hub->next) { if (isHubUnlisted(hub)) count++; } if (count == 0) { // nothing to see here printf( - "No Track Hubs for this genome assembly" + "No Track Hubs for this genome assembly" ""); cgiMakeButton("Submit", "Return to Genome Browser"); printf(""); return; } // time to output the big table. First the header printf( " " - "Active? " + "Display " "Hub Name " "Description " "URL " "Disconnect " "\n"); // start first row printf(""); count = 0; for(hub = hubList; hub; hub = hub->next) { /* if the hub is public, then don't list it here */ if (!isHubUnlisted(hub)) continue; @@ -174,31 +174,31 @@ boolean gotAnyRows = FALSE; while ((row = sqlNextRow(sr)) != NULL) { char *url = row[0], *shortLabel = row[1], *longLabel = row[2], *dbList = row[3]; if (nameInCommaList(database, dbList)) { if (gotAnyRows) webPrintLinkTableNewRow(); else { /* output header */ printf("
\n"); printf(" " " " - " " + " " " " " " " " "\n"); // start first row printf(""); gotAnyRows = TRUE; } char *errorMessage = NULL; // get an id for this hub unsigned id = hubFindOrAddUrlInStatusTable(database, cart, url, &errorMessage); @@ -298,59 +298,67 @@ printf("
\n"); printf( "

Track data hubs are collections of tracks from outside of UCSC that " "can be imported into the Genome Browser. To import a public hub check " "the box in the list below. " "After import the hub will show up as a group of tracks with its own blue " "bar and label underneath the main browser graphic, and in the " "configure page.

\n" ); printf("
\n"); // figure out and print out genome name makeGenomePrint(); // check to see if we have any new hubs -hubCheckForNew(database, cart); +boolean gotNew = hubCheckForNew(database, cart); // here's a little form for the add new hub button printf("
\n", "../cgi-bin/hgHubConnect"); cgiMakeHiddenVar("hubUrl", ""); cgiMakeHiddenVar(hgHubConnectRemakeTrackHub, "on"); puts(""); // this the form for the disconnect hub button printf("
\n", "../cgi-bin/hgHubConnect"); cgiMakeHiddenVar("hubUrl", ""); cgiMakeHiddenVar(hgHubDoDisconnect, "on"); cgiMakeHiddenVar(hgHubConnectRemakeTrackHub, "on"); puts(""); // ... and now the main form printf("
\n", destUrl); cartSaveSession(cart); // we have two tabs for the public and unlisted hubs printf("
" " "); hgHubConnectPublic(); hgHubConnectUnlisted(); printf("
"); +if (gotNew) // make MyHubs the default tab + { + printf("\n"); + } + cgiMakeHiddenVar(hgHubConnectRemakeTrackHub, "on"); printf("
\n"); puts(""); cartWebEnd(); } char *excludeVars[] = {"Submit", "submit", "hc_one_url", hgHubConnectCgiDestUrl, hgHubDoClear, hgHubDoDisconnect, hgHubDataText, hgHubConnectRemakeTrackHub, NULL}; int main(int argc, char *argv[]) /* Process command line. */ { oldVars = hashNew(10);
Active?DisplayHub NameDescriptionURL