\n");
- char name[256];
- safef(name,sizeof(name),"%s_sel",track->track);
- boolean checked = FALSE;
- #define CB_HIDDEN_VAR ""
- if(tdbIsContainerOrCompositeChild(track->tdb))
+
+ // Determine visibility and checked state
+ track->visibility = tdbVisLimitedByAncestry(cart, track->tdb, FALSE);
+ boolean checked = ( track->visibility != tvHide );
+ if(tdbIsContainerChild(track->tdb))
{
- checked = fourStateVisible(subtrackFourStateChecked(track->tdb,cart)); // Don't need all 4 states here. Visible=checked&&enabled
//track->visibility = limitedVisFromComposite(track);
- track->visibility = tdbVisLimitedByAncestry(cart, track->tdb, FALSE);
-
+ checked = fourStateVisible(subtrackFourStateChecked(track->tdb,cart)); // Don't need all 4 states here. Visible=checked&&enabled
checked = (checked && ( track->visibility != tvHide )); // Checked is only if subtrack level vis is also set!
- // Only subtracks get "_sel" var
- hPrintf(CB_HIDDEN_VAR,track->track,checked?"1":CART_VAR_EMPTY);
- }
- else
- {
- track->visibility = tdbVisLimitedByAncestry(cart, track->tdb, FALSE);
- checked = ( track->visibility != tvHide );
- if (tdbIsSuperTrackChild(track->tdb))
- hPrintf(CB_HIDDEN_VAR,track->track,checked?"1":CART_VAR_EMPTY);
}
+ // Setup the check box
+ #define CB_HIDDEN_VAR ""
+ if (tdbIsContainerChild(track->tdb) || tdbIsFolderContent(track->tdb)) // subtracks and folder children get "_sel" var. ("_sel" var is temporary on folder children)
+ hPrintf(CB_HIDDEN_VAR,track->track,checked?"1":CART_VAR_EMPTY);
#define CB_SEEN ""
hPrintf(CB_SEEN,track->track,(checked?" CHECKED":""));
-
hPrintf("
\n");
+ // Setup the visibility drop down
#define VIS_HIDDEN_VAR ""
hPrintf(VIS_HIDDEN_VAR,track->track,CART_VAR_EMPTY); // All tracks get vis hidden var
- if (tdbIsSuper(track->tdb))
+ if (tdbIsFolder(track->tdb))
{
// FIXME: Replace this with select box WITHOUT NAME but with id
// HOWEVER, I haven't seen a single supertrack in found tracks so I think they are excluded and this is dead code
@@ -756,13 +749,13 @@
}
// If this is a container track, allow configuring...
- if (tdbIsContainerOrComposite(track->tdb) || tdbIsSuper(track->tdb))
+ if (tdbIsContainer(track->tdb) || tdbIsFolder(track->tdb))
{
containerTrackCount++;
hPrintf(" * ",database,track->track);
}
hPrintf("