UX improvements

This commit is contained in:
kramo
2023-03-25 08:36:13 +01:00
parent 69dfc9a717
commit 65357bdc41
2 changed files with 20 additions and 3 deletions

View File

@@ -157,12 +157,19 @@ def get_games_async(parent_widget, appmanifests, steam_dir, import_dialog, progr
}
)
def response(_widget, response):
if response == "open_preferences":
parent_widget.get_application().on_preferences_action(None)
if games_no == 0:
create_dialog(
parent_widget,
_("No Games Found"),
_("No new games were found in the Steam library."),
)
"open_preferences",
_("Preferences"),
).connect("response", response)
elif games_no == 1:
create_dialog(
parent_widget,

View File

@@ -184,7 +184,12 @@ class CartridgesWindow(Adw.ApplicationWindow):
text = self.search_entry.get_text().lower()
if text == "":
filtered = True
elif text in child.get_first_child().name.lower():
elif (
text in child.get_first_child().name.lower()
or text in child.get_first_child().developer.lower()
if child.get_first_child().developer
else None
):
filtered = True
else:
filtered = False
@@ -202,7 +207,12 @@ class CartridgesWindow(Adw.ApplicationWindow):
text = self.hidden_search_entry.get_text().lower()
if text == "":
filtered = True
elif text in child.get_first_child().name.lower():
elif (
text in child.get_first_child().name.lower()
or text in child.get_first_child().developer.lower()
if child.get_first_child().developer
else None
):
filtered = True
else:
filtered = False