summaryrefslogtreecommitdiff
path: root/src/rhlibrary/app_window.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/rhlibrary/app_window.go')
-rw-r--r--src/rhlibrary/app_window.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/rhlibrary/app_window.go b/src/rhlibrary/app_window.go
index cf1a97a..cf8ef18 100644
--- a/src/rhlibrary/app_window.go
+++ b/src/rhlibrary/app_window.go
@@ -26,11 +26,13 @@ package main
import (
"code.helsinki.at/rhrd-go/player"
+ "code.helsinki.at/rhrd-go/rddb"
"github.com/gotk3/gotk3/gtk"
)
type AppWindow struct {
win *gtk.Window
+ db *rddb.DBChan
player *player.PlayerChan
}
@@ -41,7 +43,7 @@ func (aw *AppWindow) dispatchRequests() {
}
func (aw *AppWindow) drawSelector(grid *gtk.Grid) (err error) {
- widget, err := getSelectorWidget(aw.player)
+ widget, err := getSelectorWidget(aw.db, aw.player)
if err == nil {
grid.Add(widget)
}
@@ -64,8 +66,9 @@ func (aw *AppWindow) ShowAndRun() {
aw.win.ShowAll()
}
-func NewAppWindow(player *player.PlayerChan, width, height int) (aw *AppWindow, err error) {
+func NewAppWindow(db *rddb.DBChan, player *player.PlayerChan, width, height int) (aw *AppWindow, err error) {
aw = &AppWindow{}
+ aw.db = db
aw.player = player
if aw.win, err = gtk.WindowNew(gtk.WINDOW_TOPLEVEL); err != nil {
return
@@ -80,6 +83,7 @@ func NewAppWindow(player *player.PlayerChan, width, height int) (aw *AppWindow,
return
}
grid.SetOrientation(gtk.ORIENTATION_VERTICAL)
+ grid.SetRowSpacing(10)
if err = aw.drawPlayer(grid); err != nil {
return