Skip to content

Commit 6dba08f

Browse files
committed
Add transient_for property to about dialog
1 parent e931c61 commit 6dba08f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/diffuse/dialogs.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,9 @@
3333

3434
# the about dialog
3535
class AboutDialog(Gtk.AboutDialog):
36-
def __init__(self) -> None:
36+
def __init__(self, parent: Gtk.Widget) -> None:
3737
Gtk.AboutDialog.__init__(self)
38+
self.set_transient_for(parent)
3839
self.set_logo_icon_name('io.github.mightycreak.Diffuse')
3940
self.set_program_name(constants.APP_NAME)
4041
self.set_version(constants.VERSION)

src/diffuse/window.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1791,7 +1791,7 @@ def _path_to_url(path: str, proto: str = 'file') -> str:
17911791

17921792
# callback for the about menu item
17931793
def about_cb(self, widget, data):
1794-
dialog = AboutDialog()
1794+
dialog = AboutDialog(self.get_toplevel())
17951795
dialog.run()
17961796
dialog.destroy()
17971797

0 commit comments

Comments
 (0)