From 425e1b0211fa9f83c3089167d57583fbec00a672 Mon Sep 17 00:00:00 2001 From: jeffser Date: Thu, 16 May 2024 13:58:13 -0600 Subject: [PATCH] Only show (Save changes?) dialog when you change the url --- src/window.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/window.py b/src/window.py index c14f736..08ce5c9 100644 --- a/src/window.py +++ b/src/window.py @@ -368,6 +368,13 @@ class AlpacaWindow(Adw.ApplicationWindow): def closing_connection_dialog(self, dialog): + if self.ollama_url is None: self.destroy() + if self.ollama_url == self.connection_url_entry.get_text(): + self.connection_dialog.force_close() + if self.ollama_url is None or self.verify_connection() == False: + self.show_connection_dialog(True) + self.show_toast("error", 1, self.connection_overlay) + return dialog = Adw.AlertDialog( heading=f"Save Changes?", body=f"Do you want to save the URL change?",