summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-07-28 21:11:36 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-07-28 21:11:36 (GMT)
commit30d026532b1b19534fff94b6dfd1ab5be76d6047 (patch)
treeb4a89cd81714fd8617a16512d68f9b529a976870 /src
parent644bba7bb779bcf789478847669dca450ea84ca6 (diff)
incoporate latest rhrd-go changes
Diffstat (limited to 'src')
-rw-r--r--src/rhlibrary/app_window.go6
-rw-r--r--src/rhlibrary/jingle_selector_widget.go16
-rw-r--r--src/rhlibrary/player_widget.go14
-rw-r--r--src/rhlibrary/pool_selector_widget.go12
-rw-r--r--src/rhlibrary/selector_widget.go8
-rw-r--r--src/rhlibrary/show_selector_widget.go16
-rw-r--r--src/rhlibrary/vumeter_widget.go4
7 files changed, 38 insertions, 38 deletions
diff --git a/src/rhlibrary/app_window.go b/src/rhlibrary/app_window.go
index a863acc..3f744d1 100644
--- a/src/rhlibrary/app_window.go
+++ b/src/rhlibrary/app_window.go
@@ -34,8 +34,8 @@ import (
type AppWindow struct {
win *gtk.Window
- db *rddb.DBChan
- player *player.PlayerChan
+ db *rddb.DB
+ player *player.Player
}
func (aw *AppWindow) dispatchRequests() {
@@ -68,7 +68,7 @@ func (aw *AppWindow) ShowAndRun() {
aw.win.ShowAll()
}
-func NewAppWindow(db *rddb.DBChan, player *player.PlayerChan, width, height int) (aw *AppWindow, err error) {
+func NewAppWindow(db *rddb.DB, player *player.Player, width, height int) (aw *AppWindow, err error) {
aw = &AppWindow{}
aw.db = db
aw.player = player
diff --git a/src/rhlibrary/jingle_selector_widget.go b/src/rhlibrary/jingle_selector_widget.go
index aae373d..60f8cbd 100644
--- a/src/rhlibrary/jingle_selector_widget.go
+++ b/src/rhlibrary/jingle_selector_widget.go
@@ -45,7 +45,7 @@ var (
jinglesCutList *gtk.Grid
)
-func fetchJingles(db *rddb.DBChan) (err error) {
+func fetchJingles(db *rddb.DB) (err error) {
jinglesMutex.Lock()
defer jinglesMutex.Unlock()
@@ -55,7 +55,7 @@ func fetchJingles(db *rddb.DBChan) (err error) {
return
}
-func updateJingles(db *rddb.DBChan) (err error) {
+func updateJingles(db *rddb.DB) (err error) {
if err = fetchJingles(db); err != nil {
return
}
@@ -90,7 +90,7 @@ func selectJingle() rddb.JingleListEntry {
return jingles[jinglesCurrentGroup]
}
-func addJingleComboBox(grid *gtk.Grid, db *rddb.DBChan, p *player.PlayerChan) (err error) {
+func addJingleComboBox(grid *gtk.Grid, db *rddb.DB, p *player.Player) (err error) {
var box *gtk.Box
if box, err = gtk.BoxNew(gtk.ORIENTATION_HORIZONTAL, 10); err != nil {
return
@@ -192,7 +192,7 @@ func addJingleCutListHead(idx int) (err error) {
return
}
-func getJingleCutListEntryPlayButton(cart uint, cut rddb.CutListEntry, p *player.PlayerChan, idx int) (gtk.IWidget, error) {
+func getJingleCutListEntryPlayButton(cart uint, cut rddb.CutListEntry, p *player.Player, idx int) (gtk.IWidget, error) {
btn, err := gtk.ButtonNewFromIconName("media-playback-start", gtk.ICON_SIZE_SMALL_TOOLBAR)
if err != nil {
return nil, err
@@ -226,7 +226,7 @@ func getJingleCutListEntryPlayButton(cart uint, cut rddb.CutListEntry, p *player
return frame, nil
}
-func addJingleCutListEntry(idx int, cart uint, cut rddb.CutListEntry, p *player.PlayerChan) (err error) {
+func addJingleCutListEntry(idx int, cart uint, cut rddb.CutListEntry, p *player.Player) (err error) {
var lcut *gtk.Label
if lcut, err = getJingleCutListEntryLabel(fmt.Sprintf("%06d_%03d", cart, cut.Number), idx); err != nil {
return
@@ -277,7 +277,7 @@ func addJingleCutListSpacer(idx int) (err error) {
return
}
-func updateJingleCutListRows(jingle rddb.JingleListEntry, db *rddb.DBChan, p *player.PlayerChan) (err error) {
+func updateJingleCutListRows(jingle rddb.JingleListEntry, db *rddb.DB, p *player.Player) (err error) {
if jinglesCutList != nil {
jinglesCutListBin.Remove(jinglesCutList)
}
@@ -313,7 +313,7 @@ func updateJingleCutListRows(jingle rddb.JingleListEntry, db *rddb.DBChan, p *pl
return
}
-func addJingleCutList(grid *gtk.Grid, db *rddb.DBChan, p *player.PlayerChan) (err error) {
+func addJingleCutList(grid *gtk.Grid, db *rddb.DB, p *player.Player) (err error) {
var frame *gtk.Frame
if frame, err = gtk.FrameNew(""); err != nil {
return
@@ -335,7 +335,7 @@ func addJingleCutList(grid *gtk.Grid, db *rddb.DBChan, p *player.PlayerChan) (er
return
}
-func getJinglesSelectorWidget(db *rddb.DBChan, p *player.PlayerChan) (gtk.IWidget, error) {
+func getJinglesSelectorWidget(db *rddb.DB, p *player.Player) (gtk.IWidget, error) {
grid, err := gtk.GridNew()
if err != nil {
return nil, err
diff --git a/src/rhlibrary/player_widget.go b/src/rhlibrary/player_widget.go
index 8289861..41d2ddf 100644
--- a/src/rhlibrary/player_widget.go
+++ b/src/rhlibrary/player_widget.go
@@ -37,7 +37,7 @@ var (
pauseIcon *gtk.Image = nil
)
-func addPlayPauseButton(box *gtk.Box, p *player.PlayerChan) (err error) {
+func addPlayPauseButton(box *gtk.Box, p *player.Player) (err error) {
var btn *gtk.Button
if btn, err = gtk.ButtonNew(); err != nil {
return
@@ -79,7 +79,7 @@ func addPlayPauseButton(box *gtk.Box, p *player.PlayerChan) (err error) {
return
}
-func addStopButton(box *gtk.Box, p *player.PlayerChan) (err error) {
+func addStopButton(box *gtk.Box, p *player.Player) (err error) {
var btn *gtk.Button
if btn, err = gtk.ButtonNewFromIconName("media-playback-stop", gtk.ICON_SIZE_LARGE_TOOLBAR); err != nil {
return
@@ -111,7 +111,7 @@ func addStopButton(box *gtk.Box, p *player.PlayerChan) (err error) {
return
}
-func addButtons(grid *gtk.Grid, p *player.PlayerChan) (err error) {
+func addButtons(grid *gtk.Grid, p *player.Player) (err error) {
var box *gtk.Box
if box, err = gtk.BoxNew(gtk.ORIENTATION_HORIZONTAL, 2); err != nil {
return
@@ -128,7 +128,7 @@ func addButtons(grid *gtk.Grid, p *player.PlayerChan) (err error) {
return
}
-func addMeter(grid *gtk.Grid, p *player.PlayerChan) error {
+func addMeter(grid *gtk.Grid, p *player.Player) error {
widget, err := getVUMeterWidget(p)
if err != nil {
return err
@@ -146,7 +146,7 @@ func getPlayTimeString(duration, pos time.Duration, countdown bool) string {
return t.Add(pos).Format(" 15:04:05.0")
}
-func addPlayTime(grid *gtk.Grid, p *player.PlayerChan) (err error) {
+func addPlayTime(grid *gtk.Grid, p *player.Player) (err error) {
var btn *gtk.Button
if btn, err = gtk.ButtonNew(); err != nil {
return err
@@ -181,7 +181,7 @@ func addPlayTime(grid *gtk.Grid, p *player.PlayerChan) (err error) {
return
}
-func addScrubber(grid *gtk.Grid, p *player.PlayerChan) (err error) {
+func addScrubber(grid *gtk.Grid, p *player.Player) (err error) {
var scale *gtk.Scale
if scale, err = gtk.ScaleNew(gtk.ORIENTATION_HORIZONTAL, nil); err != nil {
return
@@ -228,7 +228,7 @@ func addScrubber(grid *gtk.Grid, p *player.PlayerChan) (err error) {
return
}
-func getPlayerWidget(p *player.PlayerChan) (gtk.IWidget, error) {
+func getPlayerWidget(p *player.Player) (gtk.IWidget, error) {
var err error
var grid *gtk.Grid
if grid, err = gtk.GridNew(); err != nil {
diff --git a/src/rhlibrary/pool_selector_widget.go b/src/rhlibrary/pool_selector_widget.go
index 4c90ea5..d9475fe 100644
--- a/src/rhlibrary/pool_selector_widget.go
+++ b/src/rhlibrary/pool_selector_widget.go
@@ -56,7 +56,7 @@ var (
PoolsCartListStore *gtk.ListStore
)
-func fetchPools(db *rddb.DBChan) (err error) {
+func fetchPools(db *rddb.DB) (err error) {
poolsMutex.Lock()
defer poolsMutex.Unlock()
@@ -66,7 +66,7 @@ func fetchPools(db *rddb.DBChan) (err error) {
return
}
-func updatePools(db *rddb.DBChan) (err error) {
+func updatePools(db *rddb.DB) (err error) {
if err = fetchPools(db); err != nil {
return
}
@@ -101,7 +101,7 @@ func selectPool() rddb.PoolListEntry {
return pools[poolsCurrentGroup]
}
-func addPoolComboBox(grid *gtk.Grid, db *rddb.DBChan, p *player.PlayerChan) (err error) {
+func addPoolComboBox(grid *gtk.Grid, db *rddb.DB, p *player.Player) (err error) {
var box *gtk.Box
if box, err = gtk.BoxNew(gtk.ORIENTATION_HORIZONTAL, 10); err != nil {
return
@@ -141,7 +141,7 @@ func addPoolComboBox(grid *gtk.Grid, db *rddb.DBChan, p *player.PlayerChan) (err
return
}
-func updatePoolCartListRows(pool rddb.PoolListEntry, db *rddb.DBChan, p *player.PlayerChan) (err error) {
+func updatePoolCartListRows(pool rddb.PoolListEntry, db *rddb.DB, p *player.Player) (err error) {
carts, err := db.GetPoolCartList(pool)
if err != nil {
return err
@@ -190,7 +190,7 @@ func appendPoolCartListColumn(tree *gtk.TreeView, title string, id int) (err err
return
}
-func addPoolCartList(grid *gtk.Grid, db *rddb.DBChan, p *player.PlayerChan) (err error) {
+func addPoolCartList(grid *gtk.Grid, db *rddb.DB, p *player.Player) (err error) {
var tree *gtk.TreeView
if tree, err = gtk.TreeViewNew(); err != nil {
return
@@ -255,7 +255,7 @@ func addPoolCartList(grid *gtk.Grid, db *rddb.DBChan, p *player.PlayerChan) (err
return
}
-func getPoolsSelectorWidget(db *rddb.DBChan, p *player.PlayerChan) (gtk.IWidget, error) {
+func getPoolsSelectorWidget(db *rddb.DB, p *player.Player) (gtk.IWidget, error) {
grid, err := gtk.GridNew()
if err != nil {
return nil, err
diff --git a/src/rhlibrary/selector_widget.go b/src/rhlibrary/selector_widget.go
index 1eec520..30929c8 100644
--- a/src/rhlibrary/selector_widget.go
+++ b/src/rhlibrary/selector_widget.go
@@ -30,7 +30,7 @@ import (
"github.com/gotk3/gotk3/gtk"
)
-func getManualSelectorWidget(db *rddb.DBChan, p *player.PlayerChan) (gtk.IWidget, error) {
+func getManualSelectorWidget(db *rddb.DB, p *player.Player) (gtk.IWidget, error) {
var grid *gtk.Grid
grid, err := gtk.GridNew()
if err != nil {
@@ -88,9 +88,9 @@ func getManualSelectorWidget(db *rddb.DBChan, p *player.PlayerChan) (gtk.IWidget
return grid, nil
}
-type getSelectorFunc func(*rddb.DBChan, *player.PlayerChan) (gtk.IWidget, error)
+type getSelectorFunc func(*rddb.DB, *player.Player) (gtk.IWidget, error)
-func addSelectorPage(nb *gtk.Notebook, title string, getWidget getSelectorFunc, db *rddb.DBChan, p *player.PlayerChan) (err error) {
+func addSelectorPage(nb *gtk.Notebook, title string, getWidget getSelectorFunc, db *rddb.DB, p *player.Player) (err error) {
var page gtk.IWidget
if page, err = getWidget(db, p); err != nil {
return
@@ -110,7 +110,7 @@ func addSelectorPage(nb *gtk.Notebook, title string, getWidget getSelectorFunc,
return
}
-func getSelectorWidget(db *rddb.DBChan, p *player.PlayerChan) (gtk.IWidget, error) {
+func getSelectorWidget(db *rddb.DB, p *player.Player) (gtk.IWidget, error) {
nb, err := gtk.NotebookNew()
if err != nil {
return nil, err
diff --git a/src/rhlibrary/show_selector_widget.go b/src/rhlibrary/show_selector_widget.go
index 9905b75..55c255b 100644
--- a/src/rhlibrary/show_selector_widget.go
+++ b/src/rhlibrary/show_selector_widget.go
@@ -45,7 +45,7 @@ var (
showsCartList *gtk.Grid
)
-func fetchShows(db *rddb.DBChan) (err error) {
+func fetchShows(db *rddb.DB) (err error) {
showsMutex.Lock()
defer showsMutex.Unlock()
@@ -55,7 +55,7 @@ func fetchShows(db *rddb.DBChan) (err error) {
return
}
-func updateShows(db *rddb.DBChan) (err error) {
+func updateShows(db *rddb.DB) (err error) {
if err = fetchShows(db); err != nil {
return
}
@@ -95,7 +95,7 @@ func selectShow() rddb.ShowListEntry {
return shows[showsCurrentID]
}
-func addShowComboBox(grid *gtk.Grid, db *rddb.DBChan, p *player.PlayerChan) (err error) {
+func addShowComboBox(grid *gtk.Grid, db *rddb.DB, p *player.Player) (err error) {
var box *gtk.Box
if box, err = gtk.BoxNew(gtk.ORIENTATION_HORIZONTAL, 10); err != nil {
return
@@ -163,7 +163,7 @@ func getShowCartListHeadLabel(caption string) (label *gtk.Label, err error) {
}`)
}
-func getShowCartListEntryPlayButton(cart rddb.CartListEntry, p *player.PlayerChan, idx int) (gtk.IWidget, error) {
+func getShowCartListEntryPlayButton(cart rddb.CartListEntry, p *player.Player, idx int) (gtk.IWidget, error) {
btn, err := gtk.ButtonNewFromIconName("media-playback-start", gtk.ICON_SIZE_SMALL_TOOLBAR)
if err != nil {
return nil, err
@@ -206,7 +206,7 @@ func getShowCartListEntryPlayButton(cart rddb.CartListEntry, p *player.PlayerCha
return frame, nil
}
-func addShowCartListEntry(idx int, cart rddb.CartListEntry, p *player.PlayerChan) (err error) {
+func addShowCartListEntry(idx int, cart rddb.CartListEntry, p *player.Player) (err error) {
var lcart *gtk.Label
if lcart, err = getShowCartListEntryLabel(strconv.FormatUint(uint64(cart.Number), 10), idx); err != nil {
return
@@ -318,7 +318,7 @@ func addShowCartListHead(idx int) (err error) {
return
}
-func updateShowCartListRows(show rddb.ShowListEntry, db *rddb.DBChan, p *player.PlayerChan) (err error) {
+func updateShowCartListRows(show rddb.ShowListEntry, db *rddb.DB, p *player.Player) (err error) {
if showsCartList != nil {
showsCartListBin.Remove(showsCartList)
}
@@ -344,7 +344,7 @@ func updateShowCartListRows(show rddb.ShowListEntry, db *rddb.DBChan, p *player.
return
}
-func addShowCartList(grid *gtk.Grid, db *rddb.DBChan, p *player.PlayerChan) (err error) {
+func addShowCartList(grid *gtk.Grid, db *rddb.DB, p *player.Player) (err error) {
var frame *gtk.Frame
if frame, err = gtk.FrameNew(""); err != nil {
return
@@ -366,7 +366,7 @@ func addShowCartList(grid *gtk.Grid, db *rddb.DBChan, p *player.PlayerChan) (err
return
}
-func getShowsSelectorWidget(db *rddb.DBChan, p *player.PlayerChan) (gtk.IWidget, error) {
+func getShowsSelectorWidget(db *rddb.DB, p *player.Player) (gtk.IWidget, error) {
grid, err := gtk.GridNew()
if err != nil {
return nil, err
diff --git a/src/rhlibrary/vumeter_widget.go b/src/rhlibrary/vumeter_widget.go
index 80214fd..309fb40 100644
--- a/src/rhlibrary/vumeter_widget.go
+++ b/src/rhlibrary/vumeter_widget.go
@@ -192,7 +192,7 @@ func updateVUMeterLevels(left, right *vuMeter, data player.Meter) {
right.SetValue(rval)
}
-func addVUMeterGrid(frame *gtk.Frame, p *player.PlayerChan) (err error) {
+func addVUMeterGrid(frame *gtk.Frame, p *player.Player) (err error) {
var grid *gtk.Grid
if grid, err = gtk.GridNew(); err != nil {
return
@@ -228,7 +228,7 @@ func addVUMeterGrid(frame *gtk.Frame, p *player.PlayerChan) (err error) {
return
}
-func getVUMeterWidget(p *player.PlayerChan) (gtk.IWidget, error) {
+func getVUMeterWidget(p *player.Player) (gtk.IWidget, error) {
frame, err := gtk.FrameNew("")
if err != nil {
return nil, err