Skip to content

Commit 38cd798

Browse files
tfuxudiamondburned
authored andcommitted
feat: replace Adw.AboutWindow with Adw.AboutDialog
1 parent ee46dc7 commit 38cd798

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

internal/window/about/about.go

+2-5
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,12 @@ import (
99

1010
"github.com/diamondburned/gotk4-adwaita/pkg/adw"
1111
"github.com/diamondburned/gotk4/pkg/gtk/v4"
12-
"github.com/diamondburned/gotkit/app"
1312
"github.com/diamondburned/gotkit/components/logui"
1413
)
1514

1615
// New creates a new about window.
17-
func New(ctx context.Context) *adw.AboutWindow {
18-
about := adw.NewAboutWindow()
19-
about.SetTransientFor(app.GTKWindowFromContext(ctx))
20-
about.SetModal(true)
16+
func New(ctx context.Context) *adw.AboutDialog {
17+
about := adw.NewAboutDialog()
2118
about.SetApplicationName("Dissent")
2219
about.SetApplicationIcon("logo")
2320
about.SetVersion("git") // TODO: version

main.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func main() {
6666
m.app = app.New(context.Background(), "so.libdb.dissent", "Dissent")
6767
m.app.AddJSONActions(map[string]interface{}{
6868
"app.preferences": func() { prefui.ShowDialog(m.win.Context()) },
69-
"app.about": func() { about.New(m.win.Context()).Present() },
69+
"app.about": func() { about.New(m.win.Context()).Present(m.win) },
7070
"app.logs": func() { logui.ShowDefaultViewer(m.win.Context()) },
7171
"app.quit": func() { m.app.Quit() },
7272
})

0 commit comments

Comments
 (0)