Changed export/import buttons for a secundary menu button

This commit is contained in:
jeffser
2024-05-29 15:00:19 -06:00
parent a180f7a46c
commit 3a5dc568c5
2 changed files with 16 additions and 24 deletions

View File

@@ -87,8 +87,6 @@ class AlpacaWindow(Adw.ApplicationWindow):
chat_list_box = Gtk.Template.Child()
add_chat_button = Gtk.Template.Child()
export_chat_button = Gtk.Template.Child()
import_chat_button = Gtk.Template.Child()
loading_spinner = None
@@ -542,7 +540,7 @@ class AlpacaWindow(Adw.ApplicationWindow):
self.chats["chats"][self.chats["selected_chat"]]["messages"][-1]['content'] += data['message']['content']
def toggle_ui_sensitive(self, status):
for element in [self.chat_list_box, self.export_chat_button, self.import_chat_button, self.add_chat_button]:
for element in [self.chat_list_box, self.add_chat_button]:
element.set_sensitive(status)
def switch_send_stop_button(self):
@@ -882,11 +880,10 @@ class AlpacaWindow(Adw.ApplicationWindow):
self.get_application().create_action('new_chat', lambda *_: self.new_chat(), ['<primary>n'])
self.get_application().create_action('clear', lambda *_: dialogs.clear_chat(self), ['<primary>e'])
self.get_application().create_action('send', lambda *_: self.send_message(self), ['Return'])
self.get_application().create_action('export_current_chat', lambda *_: self.export_current_chat())
self.get_application().create_action('import_chat', lambda *_: self.import_chat())
self.add_chat_button.connect("clicked", lambda button : self.new_chat())
self.export_chat_button.connect("clicked", lambda button : self.export_current_chat())
self.import_chat_button.connect("clicked", lambda button : self.import_chat())
self.remote_connection_entry.connect("entry-activated", lambda entry : entry.set_css_classes([]))
self.remote_connection_switch.connect("notify", lambda pspec, user_data : self.connection_switched())
self.background_switch.connect("notify", lambda pspec, user_data : self.switch_run_on_background())