summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-12-17 02:53:45 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-12-17 02:53:45 (GMT)
commit88ec09b9cb06e030b569e7e2b51223941fb3b969 (patch)
tree9a567e71dce9a032f5aa91a182022dc10de8f285
parent120f3dd271e5fb8028690b32d435e344896742e1 (diff)
semantic of jingles has changed
-rw-r--r--src/rhlibrary/jingle_selector_widget.go23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/rhlibrary/jingle_selector_widget.go b/src/rhlibrary/jingle_selector_widget.go
index fa8bdbf..289ce97 100644
--- a/src/rhlibrary/jingle_selector_widget.go
+++ b/src/rhlibrary/jingle_selector_widget.go
@@ -289,23 +289,30 @@ func updateJingleCutListRows(jingle rddb.JingleListEntry, db *rddb.DB, p *player
jinglesCutList.SetHExpand(true)
jinglesCutList.SetVExpand(true)
- activeCart, inactiveCart, err := db.GetJingleCutList(jingle)
+ cart, err := db.GetJingleCutList(jingle)
if err != nil {
return err
}
idx := 1
+ hasInactiveCuts := false
addJingleCutListHead(idx)
- for _, cut := range activeCart.Cuts {
- idx++
- addJingleCutListEntry(idx, activeCart.Number, cut, p)
+ for _, cut := range cart.Cuts {
+ if !cut.Evergreen {
+ idx++
+ addJingleCutListEntry(idx, cart.Number, cut, p)
+ } else {
+ hasInactiveCuts = true
+ }
}
- if len(inactiveCart.Cuts) > 0 {
+ if hasInactiveCuts {
idx++
addJingleCutListSpacer(idx)
- for _, cut := range inactiveCart.Cuts {
- idx++
- addJingleCutListEntry(idx, inactiveCart.Number, cut, p)
+ for _, cut := range cart.Cuts {
+ if cut.Evergreen {
+ idx++
+ addJingleCutListEntry(idx, cart.Number, cut, p)
+ }
}
}