45958cde3c4826c519dc71d4cbf9bf6afdb28f74 braney Fri Oct 7 08:52:25 2011 -0700 fix a weirdness with the display caused by a pause when the track hubs are collected. The behavior was that the window would paint one way, and then repaint correctly. diff --git src/hg/hgHubConnect/hgHubConnect.c src/hg/hgHubConnect/hgHubConnect.c index 0f7aacd..9015da2 100644 --- src/hg/hgHubConnect/hgHubConnect.c +++ src/hg/hgHubConnect/hgHubConnect.c @@ -42,50 +42,50 @@ puts(""); } static void ourCellEnd() { puts(""); } static void ourPrintCell(char *str) { ourCellStart(); puts(str); ourCellEnd(); } -static void hgHubConnectUnlisted() +static void hgHubConnectUnlisted(struct hubConnectStatus *hubList) /* Put up the list of unlisted hubs and other controls for the page. */ { // put out the top of our page printf("
" " " " " " " " "); // count up the number of unlisted hubs we currently have int count = 0; -struct hubConnectStatus *hub, *hubList = hubConnectStatusListFromCartAll(cart); +struct hubConnectStatus *hub; for(hub = hubList; hub; hub = hub->next) { if (isHubUnlisted(hub) && ((hub->trackHub == NULL) || trackHubHasDatabase(hub->trackHub, database) )) count++; } if (count == 0) { // nothing to see here printf( "" "
" " " "" "
No Track Hubs for this genome assembly
"); printf("
"); return; } @@ -372,30 +372,33 @@ "bar and label underneath the main browser graphic, and in the " "configure page. For more information, see the " "" "User's Guide.

\n" "

NOTE: Because Track Hubs are created and maintained by external sources," " UCSC cannot be held responsible for their content.

" ); printf("\n"); // figure out and print out genome name makeGenomePrint(); // check to see if we have any new hubs hubCheckForNew(database, cart); +// grab all the hubs that are listed in the cart +struct hubConnectStatus *hubList = hubConnectStatusListFromCartAll(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("hubId", ""); cgiMakeHiddenVar(hgHubDoDisconnect, "on"); cgiMakeHiddenVar(hgHubConnectRemakeTrackHub, "on"); puts("
"); // this the form for the reset hub button printf("
\n", "../cgi-bin/hgHubConnect"); @@ -406,31 +409,31 @@ // ... and now the main form if (cartVarExists(cart, hgHubConnectCgiDestUrl)) destUrl = cartOptionalString(cart, hgHubConnectCgiDestUrl); printf("\n", destUrl); cartSaveSession(cart); // we have two tabs for the public and unlisted hubs printf("
" " "); hgHubConnectPublic(); -hgHubConnectUnlisted(); +hgHubConnectUnlisted(hubList); printf("
"); printf("
"); cgiMakeButton("Submit", "Load Selected Hubs"); char *emailAddress = cfgOptionDefault("hub.emailAddress","genome@soe.ucsc.edu"); printf("" "Contact %s to add a public hub." "\n", emailAddress,emailAddress); printf("
"); cgiMakeHiddenVar(hgHubConnectRemakeTrackHub, "on"); printf("\n"); puts("
");