Quick fixes
This commit is contained in:
parent
e19aece78a
commit
0096346b0c
@ -44,7 +44,7 @@ class AlpacaApplication(Adw.Application):
|
||||
win.present()
|
||||
|
||||
def on_about_action(self, widget, _):
|
||||
about = Adw.AboutWindow(transient_for=self.props.active_window,
|
||||
about = Adw.AboutDialog(#transient_for=self.props.active_window,
|
||||
application_name='Alpaca',
|
||||
application_icon='com.jeffser.Alpaca',
|
||||
developer_name='Jeffry Samuel Eduarte Rojas',
|
||||
@ -54,7 +54,7 @@ class AlpacaApplication(Adw.Application):
|
||||
translator_credits='Alex K (Russian) https://github.com/alexkdeveloper',
|
||||
copyright='© 2024 Jeffser',
|
||||
issue_url='https://github.com/Jeffser/Alpaca/issues')
|
||||
about.present()
|
||||
about.present(parent=self.props.active_window)
|
||||
|
||||
def create_action(self, name, callback, shortcuts=None):
|
||||
action = Gio.SimpleAction.new(name, None)
|
||||
|
@ -319,6 +319,8 @@ class AlpacaWindow(Adw.ApplicationWindow):
|
||||
response = stream_post(f"{self.ollama_url}/api/chat", data=json.dumps({"model": model, "messages": messages}), callback=self.update_bot_message)
|
||||
GLib.idle_add(self.add_code_blocks)
|
||||
GLib.idle_add(self.send_button.set_sensitive, True)
|
||||
GLib.idle_add(self.chat_list_box.set_sensitive, True)
|
||||
GLib.idle_add(self.add_chat_button.set_sensitive, True)
|
||||
GLib.idle_add(self.image_button.set_sensitive, True)
|
||||
GLib.idle_add(self.image_button.set_css_classes, [])
|
||||
GLib.idle_add(self.image_button.get_child().set_icon_name, "image-x-generic-symbolic")
|
||||
@ -349,6 +351,8 @@ class AlpacaWindow(Adw.ApplicationWindow):
|
||||
data["messages"][-1]["images"] = [self.attached_image["base64"]]
|
||||
self.message_text_view.set_sensitive(False)
|
||||
self.send_button.set_sensitive(False)
|
||||
self.chat_list_box.set_sensitive(False)
|
||||
self.add_chat_button.set_sensitive(False)
|
||||
self.image_button.set_sensitive(False)
|
||||
self.show_message(self.message_text_view.get_buffer().get_text(self.message_text_view.get_buffer().get_start_iter(), self.message_text_view.get_buffer().get_end_iter(), False), False, f"\n\n<small>{formated_datetime}</small>", self.attached_image["base64"])
|
||||
self.message_text_view.get_buffer().set_text("", 0)
|
||||
|
@ -4,7 +4,7 @@
|
||||
<requires lib="Adw" version="1.0"/>
|
||||
<template class="AlpacaWindow" parent="AdwApplicationWindow">
|
||||
<property name="resizable">True</property>
|
||||
<property name="width-request">350</property>
|
||||
<property name="width-request">360</property>
|
||||
<property name="height-request">500</property>
|
||||
<property name="default-width">1300</property>
|
||||
<property name="default-height">800</property>
|
||||
|
Loading…
x
Reference in New Issue
Block a user