Skip to content

Commit

Permalink
fixed bug with AdwAlertDialog
Browse files Browse the repository at this point in the history
  • Loading branch information
Nokse22 committed Mar 26, 2024
1 parent c36f3d9 commit 9b18707
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/window.py
Original file line number Diff line number Diff line change
Expand Up @@ -448,8 +448,6 @@ def save_changes_message(self, callback=None):
heading=_("Save Changes?"),
body=_("The opened file contains unsaved changes. Changes which are not saved will be permanently lost."),
close_response="cancel",
modal=True,
transient_for=self,
)

dialog.add_response("cancel", _("Cancel"))
Expand All @@ -459,7 +457,7 @@ def save_changes_message(self, callback=None):
dialog.set_response_appearance("discard", Adw.ResponseAppearance.DESTRUCTIVE)
dialog.set_response_appearance("save", Adw.ResponseAppearance.SUGGESTED)

dialog.choose(None, self.on_save_changes_message_response, callback)
dialog.choose(self, None, self.on_save_changes_message_response, callback)

def on_save_changes_message_response(self, dialog, task, callback=None):
response = dialog.choose_finish(task)
Expand Down

0 comments on commit 9b18707

Please sign in to comment.