Remove configure button on smart categories

This commit is contained in:
Mathieu Comandon 2024-04-12 00:49:32 -07:00
parent 721940450d
commit 2f199a272c
2 changed files with 3 additions and 1 deletions

View file

@ -43,7 +43,7 @@ _SMART_CATEGORIES: List[_SmartCategory] = [_SmartUncategorizedCategory()]
# Convenient method to iterate category with id.
# Note that ids that are positive integers should not be used, as they can conflict with existing categories.
_SMART_CATEGORIES_WITH_ID = [(category, f"smart-category-{id}") for id, category in enumerate(_SMART_CATEGORIES)]
_SMART_CATEGORIES_WITH_ID = [(category, f"smart-category-{_id}") for _id, category in enumerate(_SMART_CATEGORIES)]
def strip_category_name(name):

View file

@ -261,6 +261,8 @@ class CategorySidebarRow(SidebarRow):
def get_actions(self):
"""Return the definition of buttons to be added to the row"""
if str(self.category["id"]).startswith("smart-category"):
return []
return [("applications-system-symbolic", _("Edit Games"), self.on_category_clicked, "manage-category-games")]
def on_category_clicked(self, button):