Skip to content

Commit 951ed04

Browse files
authored
Merge pull request #204 from oscfdezdz/about_dialog
Add `transient_for` property to about dialog
2 parents fcb93d3 + 6dba08f commit 951ed04

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
@@ -1797,7 +1797,7 @@ def _path_to_url(path: str, proto: str = 'file') -> str:
17971797

17981798
# callback for the about menu item
17991799
def about_cb(self, widget, data):
1800-
dialog = AboutDialog()
1800+
dialog = AboutDialog(self.get_toplevel())
18011801
dialog.run()
18021802
dialog.destroy()
18031803

0 commit comments

Comments
 (0)