Fix issues where the batch actions stayed enabled.

This commit is contained in:
heliguy
2023-08-31 22:18:17 -04:00
parent 63a227459d
commit 0720fe3a68

View File

@@ -462,6 +462,7 @@ class FlattoolGuiWindow(Adw.ApplicationWindow):
def generate_list_of_flatpaks(self): def generate_list_of_flatpaks(self):
self.set_title(self.main_window_title) self.set_title(self.main_window_title)
self.batch_actions_enable(False)
self.selected_host_flatpak_indexes = [] self.selected_host_flatpak_indexes = []
def get_host_flatpaks(): def get_host_flatpaks():
output = subprocess.run(['flatpak-spawn', '--host', 'flatpak', 'list', '--columns=all'], capture_output=True, text=True).stdout output = subprocess.run(['flatpak-spawn', '--host', 'flatpak', 'list', '--columns=all'], capture_output=True, text=True).stdout
@@ -551,6 +552,7 @@ class FlattoolGuiWindow(Adw.ApplicationWindow):
else: else:
self.in_batch_mode = False self.in_batch_mode = False
self.refresh_list_of_flatpaks(self, False) self.refresh_list_of_flatpaks(self, False)
self.batch_actions_enable(False)
def batch_actions_enable(self, should_enable): def batch_actions_enable(self, should_enable):
self.batch_copy_button.set_sensitive(should_enable) self.batch_copy_button.set_sensitive(should_enable)