mirror of
https://github.com/lutris/lutris
synced 2024-10-14 11:42:36 +00:00
Remove configure button on smart categories
This commit is contained in:
parent
721940450d
commit
2f199a272c
|
@ -43,7 +43,7 @@ _SMART_CATEGORIES: List[_SmartCategory] = [_SmartUncategorizedCategory()]
|
||||||
|
|
||||||
# Convenient method to iterate category with id.
|
# 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.
|
# 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):
|
def strip_category_name(name):
|
||||||
|
|
|
@ -261,6 +261,8 @@ class CategorySidebarRow(SidebarRow):
|
||||||
|
|
||||||
def get_actions(self):
|
def get_actions(self):
|
||||||
"""Return the definition of buttons to be added to the row"""
|
"""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")]
|
return [("applications-system-symbolic", _("Edit Games"), self.on_category_clicked, "manage-category-games")]
|
||||||
|
|
||||||
def on_category_clicked(self, button):
|
def on_category_clicked(self, button):
|
||||||
|
|
Loading…
Reference in a new issue