tweaks
This commit is contained in:
parent
52449243ed
commit
efcc8512c1
@ -110,6 +110,7 @@ def stop_pull_model_response(self, dialog, task, model_name):
|
|||||||
self.stop_pull_model(model_name)
|
self.stop_pull_model(model_name)
|
||||||
|
|
||||||
def stop_pull_model(self, model_name):
|
def stop_pull_model(self, model_name):
|
||||||
|
#self.pulling_model_list_box.unselect_all()
|
||||||
dialog = Adw.AlertDialog(
|
dialog = Adw.AlertDialog(
|
||||||
heading=_("Stop Model"),
|
heading=_("Stop Model"),
|
||||||
body=_("Are you sure you want to stop pulling '{}'?").format(model_name),
|
body=_("Are you sure you want to stop pulling '{}'?").format(model_name),
|
||||||
|
@ -836,8 +836,10 @@ class AlpacaWindow(Adw.ApplicationWindow):
|
|||||||
self.show_toast("info", 3, self.manage_models_overlay)
|
self.show_toast("info", 3, self.manage_models_overlay)
|
||||||
return
|
return
|
||||||
self.pulling_model_list_box.set_visible(True)
|
self.pulling_model_list_box.set_visible(True)
|
||||||
|
#self.pulling_model_list_box.connect('row_selected', lambda list_box, row: dialogs.stop_pull_model(self, row.get_name()) if row else None) #It isn't working for some reason
|
||||||
model_row = Adw.ActionRow(
|
model_row = Adw.ActionRow(
|
||||||
title = model
|
title = model,
|
||||||
|
name = model
|
||||||
)
|
)
|
||||||
thread = threading.Thread(target=self.pull_model_process, kwargs={"model": model, "modelfile": None})
|
thread = threading.Thread(target=self.pull_model_process, kwargs={"model": model, "modelfile": None})
|
||||||
overlay = Gtk.Overlay()
|
overlay = Gtk.Overlay()
|
||||||
@ -1224,7 +1226,8 @@ class AlpacaWindow(Adw.ApplicationWindow):
|
|||||||
if file_type == "youtube":
|
if file_type == "youtube":
|
||||||
shown_name=name[:20] + (name[20:] and '..')
|
shown_name=name[:20] + (name[20:] and '..')
|
||||||
else:
|
else:
|
||||||
shown_name='.'.join(name.split(".")[:-1])[:20] + (name[20:] and '..') + f".{name.split('.')[-1]}"
|
shown_name=name
|
||||||
|
#shown_name='.'.join(name.split(".")[:-1])[:20] + (name[20:] and '..') + f".{name.split('.')[-1]}"
|
||||||
button_content = Adw.ButtonContent(
|
button_content = Adw.ButtonContent(
|
||||||
label=shown_name,
|
label=shown_name,
|
||||||
icon_name={
|
icon_name={
|
||||||
@ -1243,7 +1246,11 @@ class AlpacaWindow(Adw.ApplicationWindow):
|
|||||||
tooltip_text=name,
|
tooltip_text=name,
|
||||||
child=button_content
|
child=button_content
|
||||||
)
|
)
|
||||||
|
lab = Gtk.Label(
|
||||||
|
label="funny"
|
||||||
|
)
|
||||||
|
print(type(button.get_label()))
|
||||||
|
button.set_label(lab)
|
||||||
self.attachments[name] = {"path": file_path, "type": file_type, "content": content, "button": button}
|
self.attachments[name] = {"path": file_path, "type": file_type, "content": content, "button": button}
|
||||||
button.connect("clicked", lambda button: dialogs.remove_attached_file(self, button))
|
button.connect("clicked", lambda button: dialogs.remove_attached_file(self, button))
|
||||||
self.attachment_container.append(button)
|
self.attachment_container.append(button)
|
||||||
|
@ -633,7 +633,6 @@
|
|||||||
<property name="selection-mode">none</property>
|
<property name="selection-mode">none</property>
|
||||||
<style>
|
<style>
|
||||||
<class name="boxed-list"/>
|
<class name="boxed-list"/>
|
||||||
<class name="card"/>
|
|
||||||
</style>
|
</style>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
@ -642,7 +641,6 @@
|
|||||||
<property name="selection-mode">none</property>
|
<property name="selection-mode">none</property>
|
||||||
<style>
|
<style>
|
||||||
<class name="boxed-list"/>
|
<class name="boxed-list"/>
|
||||||
<class name="card"/>
|
|
||||||
</style>
|
</style>
|
||||||
</object>
|
</object>
|
||||||
</child>
|
</child>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user