Add GTK application implementation
This commit is contained in:
parent
d1bb505e0a
commit
b7c0307f6b
29 changed files with 2564 additions and 266 deletions
23
internal/gui/shortcutsdialog.go
Normal file
23
internal/gui/shortcutsdialog.go
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
package gui
|
||||
|
||||
import (
|
||||
"github.com/diamondburned/gotk4/pkg/gtk/v4"
|
||||
"suruatoel.xyz/mcg/data"
|
||||
)
|
||||
|
||||
type shortcutsDialog struct {
|
||||
*gtk.ShortcutsWindow
|
||||
}
|
||||
|
||||
func newShortcutsDialog() *shortcutsDialog {
|
||||
dialog := shortcutsDialog{}
|
||||
dialog.loadWidgets()
|
||||
|
||||
return &dialog
|
||||
}
|
||||
|
||||
func (d *shortcutsDialog) loadWidgets() {
|
||||
builder := gtk.NewBuilderFromString(data.ShortcutsDialogXML)
|
||||
|
||||
d.ShortcutsWindow = builder.GetObject("McgShortcutsDialog").Cast().(*gtk.ShortcutsWindow)
|
||||
}
|
||||
Loading…
Reference in a new issue