fix: resposne
Build / Flatpak (x86_64) (push) Failing after 10m52s
Details
Build / Flatpak (x86_64) (push) Failing after 10m52s
Details
This commit is contained in:
parent
fb17c035c3
commit
a653e34d83
|
@ -66,35 +66,19 @@ template $BavarderWindow : Adw.ApplicationWindow {
|
||||||
hexpand: true;
|
hexpand: true;
|
||||||
vexpand: true;
|
vexpand: true;
|
||||||
|
|
||||||
styles ["card", "text-box"]
|
styles [ "text-box"]
|
||||||
|
|
||||||
ScrolledWindow scrolled_response_window {
|
ScrolledWindow scrolled_response_window {
|
||||||
margin-top: 12;
|
margin-top: 12;
|
||||||
margin-bottom: 0;
|
margin-bottom: 0;
|
||||||
margin-start: 12;
|
margin-start: 12;
|
||||||
margin-end: 12;
|
margin-end: 12;
|
||||||
styles ["scrolled-window"]
|
|
||||||
|
|
||||||
Gtk.Stack response_stack {
|
TextView bot_text_view {
|
||||||
vexpand: true;
|
wrap-mode: word_char;
|
||||||
hexpand: true;
|
hexpand: true;
|
||||||
Gtk.StackPage {
|
vexpand: true;
|
||||||
name: "page_response";
|
editable: false;
|
||||||
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");
|
|
||||||
// };
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -377,8 +377,7 @@ class BavarderApplication(Adw.Application):
|
||||||
self.win.web_view.set_hexpand(True)
|
self.win.web_view.set_hexpand(True)
|
||||||
self.win.web_view.set_vexpand(True)
|
self.win.web_view.set_vexpand(True)
|
||||||
|
|
||||||
self.win.response_stack.add_child(self.win.web_view)
|
self.win.scrolled_response_window.set_child(self.win.web_view)
|
||||||
self.win.response_stack.set_visible_child(self.win.web_view)
|
|
||||||
|
|
||||||
if self.win.web_view.is_loading():
|
if self.win.web_view.is_loading():
|
||||||
self.win.web_view_pending_html = html
|
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)
|
self.show(TEMPLATE.replace("{response}", response).replace("{theme_css}", theme_css), Step.LOAD_WEBVIEW)
|
||||||
else:
|
else:
|
||||||
self.win.bot_text_view.get_buffer().props.text = response
|
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, _):
|
def on_ask_action(self, widget, _):
|
||||||
"""Callback for the app.ask action."""
|
"""Callback for the app.ask action."""
|
||||||
|
|
|
@ -12,7 +12,6 @@ class BavarderWindow(Adw.ApplicationWindow):
|
||||||
ask_button = Gtk.Template.Child()
|
ask_button = Gtk.Template.Child()
|
||||||
scrolled_response_window = Gtk.Template.Child()
|
scrolled_response_window = Gtk.Template.Child()
|
||||||
bot_text_view = Gtk.Template.Child()
|
bot_text_view = Gtk.Template.Child()
|
||||||
response_stack = Gtk.Template.Child()
|
|
||||||
banner = Gtk.Template.Child()
|
banner = Gtk.Template.Child()
|
||||||
stop_button = Gtk.Template.Child()
|
stop_button = Gtk.Template.Child()
|
||||||
# listen = Gtk.Template.Child()
|
# listen = Gtk.Template.Child()
|
||||||
|
|
Loading…
Reference in New Issue