fix: hide stop if there is nothing to stop :)

This commit is contained in:
0xMRTT 2023-05-11 00:43:38 +02:00
parent 9a460d9302
commit d6fd3b3d0c
Signed by: 0xmrtt
GPG key ID: 19C1449A774028BD
2 changed files with 4 additions and 1 deletions

View file

@ -205,7 +205,7 @@ template BavarderWindow : Adw.ApplicationWindow {
}
Button stop_button {
visible: true;
visible: false;
sensitive: false;
icon-name: "x-circular-symbolic";
tooltip-text: _("Stop");

View file

@ -1011,6 +1011,7 @@ Providers: {self.enabled_providers}
self.win.spinner.start()
self.win.ask_button.set_visible(False)
self.win.wait_button.set_visible(True)
self.win.stop_button.set_visible(True)
self.provider = self.win.provider_selector.props.selected
def thread_run():
@ -1024,6 +1025,7 @@ Providers: {self.enabled_providers}
self.win.spinner.stop()
self.win.ask_button.set_visible(True)
self.win.wait_button.set_visible(False)
self.win.stop_button.set_visible(False)
GLib.idle_add(self.update_response, response)
self.t.join()
if self.clear_after_send:
@ -1037,6 +1039,7 @@ Providers: {self.enabled_providers}
self.win.spinner.stop()
self.win.ask_button.set_visible(True)
self.win.wait_button.set_visible(False)
self.win.stop_button.set_visible(False)
self.t.kill()
self.t.join()