Remove unnecessary warning dialog when loading from history.
This commit is contained in:
parent
907ce7b753
commit
f52b0fa431
@ -870,22 +870,7 @@ class RosterWindow(Adw.ApplicationWindow):
|
|||||||
|
|
||||||
def _on_history_load_requested(self, widget, entry):
|
def _on_history_load_requested(self, widget, entry):
|
||||||
"""Handle load request from history item."""
|
"""Handle load request from history item."""
|
||||||
# Show warning dialog
|
# Smart loading: replaces empty tabs or creates new tab if modified
|
||||||
dialog = Adw.AlertDialog()
|
|
||||||
dialog.set_heading("Load Request?")
|
|
||||||
dialog.set_body("This will replace your current request. Any unsaved changes will be lost.")
|
|
||||||
dialog.add_response("cancel", "Cancel")
|
|
||||||
dialog.add_response("load", "Load")
|
|
||||||
dialog.set_response_appearance("load", Adw.ResponseAppearance.SUGGESTED)
|
|
||||||
dialog.set_default_response("cancel")
|
|
||||||
dialog.set_close_response("cancel")
|
|
||||||
|
|
||||||
dialog.connect("response", self._on_load_dialog_response, entry)
|
|
||||||
dialog.present(self)
|
|
||||||
|
|
||||||
def _on_load_dialog_response(self, dialog, response, entry):
|
|
||||||
"""Handle load dialog response."""
|
|
||||||
if response == "load":
|
|
||||||
self._load_request_from_entry(entry)
|
self._load_request_from_entry(entry)
|
||||||
|
|
||||||
def _load_request_from_entry(self, entry):
|
def _load_request_from_entry(self, entry):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user