summaryrefslogtreecommitdiff
path: root/src/rhlibrary/mainwindow.go
diff options
context:
space:
mode:
authorChristian Pointner <equinox@helsinki.at>2016-01-13 14:19:55 (GMT)
committerChristian Pointner <equinox@helsinki.at>2016-01-13 14:19:55 (GMT)
commite70b210ca5ed370214c44c97643eb6d6107c84b6 (patch)
tree2c05ca521fb38e649d0f18374edaaef4eabd0fa6 /src/rhlibrary/mainwindow.go
parentaacbbfa74a912a6ac11eb0400f358f5f1de23356 (diff)
make default window size configurable
Diffstat (limited to 'src/rhlibrary/mainwindow.go')
-rw-r--r--src/rhlibrary/mainwindow.go6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/rhlibrary/mainwindow.go b/src/rhlibrary/mainwindow.go
index bfa0ac7..67620df 100644
--- a/src/rhlibrary/mainwindow.go
+++ b/src/rhlibrary/mainwindow.go
@@ -41,10 +41,8 @@ func (mw *MainWindow) ShowAndRun() {
gtk.Main()
}
-func NewMainWindow() (mw *MainWindow, err error) {
+func NewMainWindow(width, height int) (mw *MainWindow, err error) {
mw = &MainWindow{}
- // Create a new toplevel window, set its title, and connect it to the
- // "destroy" signal to exit the GTK main loop when it is destroyed.
if mw.win, err = gtk.WindowNew(gtk.WINDOW_TOPLEVEL); err != nil {
return
}
@@ -59,6 +57,6 @@ func NewMainWindow() (mw *MainWindow, err error) {
}
mw.win.Add(l)
- mw.win.SetDefaultSize(800, 600)
+ mw.win.SetDefaultSize(width, height)
return
}