blob: 4142e8c4cc7a238295089b806152518bcc39a8cf (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// SPDX-License-Identifier: GPL-3.0-or-later
// krino-gui is a GTK4 window for krino: review a directory's plan and apply
// the files you choose, look back over runs and undo them, and write rules.
// Every decision is the engine's; see docs/gui-design.md.
package main
import (
"fmt"
"os"
"github.com/diamondburned/gotk4/pkg/gtk/v4"
)
// version is stamped at build time, as krino's is.
var version = "dev"
func main() {
if len(os.Args) > 1 && os.Args[1] == "--version" {
fmt.Println("krino-gui " + version)
return
}
app := gtk.NewApplication("xyz.labunix.krino", 0)
app.ConnectActivate(func() {
win := gtk.NewApplicationWindow(app)
win.SetTitle("krino")
win.SetDefaultSize(900, 600)
win.SetChild(gtk.NewLabel("krino-gui"))
win.Show()
})
if code := app.Run(os.Args); code != 0 {
os.Exit(code)
}
}
|