Skip to content

Commit cec10ca

Browse files
authored
FIX: Disable "Disable all" button when no extensions installed (#13455)
Fixes issue where the "Disable all" button in Extensions settings remained enabled even when no extensions were installed. The button state is now correctly updated in update_button_states() to check if extension_rows is empty, and load_extensions() calls update_button_states() to ensure proper initialization. Fixes: #13021
1 parent 2554d7a commit cec10ca

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

files/usr/share/cinnamon/cinnamon-settings/bin/ExtensionCore.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -582,6 +582,9 @@ def update_button_states(self, *args):
582582
if self.collection_type == 'action' and hasattr(row, 'disabled_about'):
583583
self.about_button.set_sensitive(not row.disabled_about)
584584

585+
# Disable "Disable all" button when no extensions are installed
586+
self.restore_button.set_sensitive(len(self.extension_rows) > 0)
587+
585588
def add_instance(self, *args):
586589
extension_row = self.list_box.get_selected_row()
587590
self.enable_extension(extension_row.uuid, extension_row.name, extension_row.version_supported)
@@ -659,6 +662,7 @@ def load_extensions(self, *args):
659662
print(f"Failed to load extension {uuid}: {msg}")
660663

661664
self.list_box.show_all()
665+
self.update_button_states()
662666

663667
def update_status(self, *args):
664668
for row in self.extension_rows:

0 commit comments

Comments
 (0)