Skip to content

Commit

Permalink
Merge pull request #204 from oscfdezdz/about_dialog
Browse files Browse the repository at this point in the history
Add `transient_for` property to about dialog
  • Loading branch information
MightyCreak committed Apr 8, 2023
2 parents fcb93d3 + 6dba08f commit 951ed04
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/diffuse/dialogs.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,9 @@

# the about dialog
class AboutDialog(Gtk.AboutDialog):
def __init__(self) -> None:
def __init__(self, parent: Gtk.Widget) -> None:
Gtk.AboutDialog.__init__(self)
self.set_transient_for(parent)
self.set_logo_icon_name('io.github.mightycreak.Diffuse')
self.set_program_name(constants.APP_NAME)
self.set_version(constants.VERSION)
Expand Down
2 changes: 1 addition & 1 deletion src/diffuse/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -1797,7 +1797,7 @@ def _path_to_url(path: str, proto: str = 'file') -> str:

# callback for the about menu item
def about_cb(self, widget, data):
dialog = AboutDialog()
dialog = AboutDialog(self.get_toplevel())
dialog.run()
dialog.destroy()

Expand Down

0 comments on commit 951ed04

Please sign in to comment.