From c3430058b9f2e59996c305c6c72ed0a3baecd258 Mon Sep 17 00:00:00 2001 From: Pavel Baksy Date: Sun, 21 Dec 2025 00:23:51 +0100 Subject: [PATCH] Remove unnecessary warning dialog when loading from history. --- src/window.py | 19 ++----------------- 1 file changed, 2 insertions(+), 17 deletions(-) diff --git a/src/window.py b/src/window.py index 97cc3c2..e93bc08 100644 --- a/src/window.py +++ b/src/window.py @@ -870,23 +870,8 @@ class RosterWindow(Adw.ApplicationWindow): def _on_history_load_requested(self, widget, entry): """Handle load request from history item.""" - # Show warning dialog - 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) + # Smart loading: replaces empty tabs or creates new tab if modified + self._load_request_from_entry(entry) def _load_request_from_entry(self, entry): """Load request from history entry - smart loading based on current tab state."""