fix: resposne
Build / Flatpak (x86_64) (push) Failing after 10m52s Details

This commit is contained in:
0xMRTT 2023-05-28 09:56:30 +02:00
parent fb17c035c3
commit a653e34d83
Signed by: 0xMRTT
GPG Key ID: 910B287304120902
3 changed files with 6 additions and 25 deletions

View File

@ -66,35 +66,19 @@ template $BavarderWindow : Adw.ApplicationWindow {
hexpand: true;
vexpand: true;
styles ["card", "text-box"]
styles [ "text-box"]
ScrolledWindow scrolled_response_window {
margin-top: 12;
margin-bottom: 0;
margin-start: 12;
margin-end: 12;
styles ["scrolled-window"]
Gtk.Stack response_stack {
vexpand: true;
TextView bot_text_view {
wrap-mode: word_char;
hexpand: true;
Gtk.StackPage {
name: "page_response";
child: TextView bot_text_view {
wrap-mode: word_char;
hexpand: true;
vexpand: true;
editable: false;
};
}
// Gtk.StackPage {
// name: "page_offline";
// child: Adw.StatusPage {
// //icon-name: "network-wireless-offline-symbolic";
// title: _("Offline");
// };
// }
vexpand: true;
editable: false;
}
}

View File

@ -377,8 +377,7 @@ class BavarderApplication(Adw.Application):
self.win.web_view.set_hexpand(True)
self.win.web_view.set_vexpand(True)
self.win.response_stack.add_child(self.win.web_view)
self.win.response_stack.set_visible_child(self.win.web_view)
self.win.scrolled_response_window.set_child(self.win.web_view)
if self.win.web_view.is_loading():
self.win.web_view_pending_html = html
@ -1053,7 +1052,6 @@ class BavarderApplication(Adw.Application):
self.show(TEMPLATE.replace("{response}", response).replace("{theme_css}", theme_css), Step.LOAD_WEBVIEW)
else:
self.win.bot_text_view.get_buffer().props.text = response
self.win.response_stack.set_visible_child_name("page_response")
def on_ask_action(self, widget, _):
"""Callback for the app.ask action."""

View File

@ -12,7 +12,6 @@ class BavarderWindow(Adw.ApplicationWindow):
ask_button = Gtk.Template.Child()
scrolled_response_window = Gtk.Template.Child()
bot_text_view = Gtk.Template.Child()
response_stack = Gtk.Template.Child()
banner = Gtk.Template.Child()
stop_button = Gtk.Template.Child()
# listen = Gtk.Template.Child()