mirror of
https://github.com/Abdess/retroarch_system.git
synced 2026-11-01 00:27:20 -05:00
fix: say nothing was found on the first screen
This commit is contained in:
1 parent
42304f6df8
commit
7e96e12a4f
3 files changed
+28
-2
No files matched your search
+8
-1
@@ -12137,10 +12137,17 @@ def _view_platforms(state: TuiState, width: int, height: int) -> tuple:
|
||||
else:
|
||||
title = "Which setup?"
|
||||
before = ["Choose the setup that will use the BIOS files."]
|
||||
pinned = list(state.refused)
|
||||
if state.dest_given is None and not state.setups and len(state.stack) == 1:
|
||||
# The first screen when nothing was found: at 40x15 its 18 rows
|
||||
# left no line to say so, or what to do.
|
||||
pinned.append("Nothing was found here: choose the setup that will use the "
|
||||
"BIOS files.")
|
||||
before = []
|
||||
needle = state.filters.get("platforms", "")
|
||||
after = [f"No setup matches '{needle}'."] if len(rows) == 1 and needle else []
|
||||
after += [state.status] if state.status else []
|
||||
return (title, _compose(state, width, height, before, rows, after, pinned=state.refused),
|
||||
return (title, _compose(state, width, height, before, rows, after, pinned=pinned),
|
||||
("A/Enter Choose", "B/Esc Back", "/ Filter", "? Help"))
|
||||
|
||||
|
||||
|
||||
@@ -3908,6 +3908,25 @@ class TheFolderScreenSaysWhatItOffers(unittest.TestCase):
|
||||
self.assertEqual(rows[state.focus["folder"]].action, "browse")
|
||||
|
||||
|
||||
class NothingFoundIsSaid(unittest.TestCase):
|
||||
"""With nothing detected the first screen was the list of 18 setups,
|
||||
with no line at 40x15 saying nothing was found, which the beginner's
|
||||
page names."""
|
||||
|
||||
def test_at_every_size(self):
|
||||
with mock.patch.object(install, "detect_platforms", return_value=[]), \
|
||||
mock.patch.object(install, "detect_frontends", return_value=[]), \
|
||||
mock.patch.object(install, "_mounted_cards", return_value=[]):
|
||||
state, _effects = install.tui_start(_args(), "linux")
|
||||
self.assertEqual(state.screen, "platforms")
|
||||
for cols, rows in ((40, 12), (40, 15), (80, 24)):
|
||||
with self.subTest(size=f"{cols}x{rows}"):
|
||||
screen = " ".join(" ".join(install.tui_view(state, cols, rows)).split())
|
||||
self.assertIn("Nothing was found here", screen)
|
||||
page = (REPO_ROOT / "wiki" / "first-install.md").read_text(encoding="utf-8")
|
||||
self.assertIn("Nothing was found here", page)
|
||||
|
||||
|
||||
class AFocusesNoSystemFolder(unittest.TestCase):
|
||||
"""At / A went into bin/, and at a drive root holding $RECYCLE.BIN into
|
||||
the recycle bin, which Use this folder then took as the BIOS folder."""
|
||||
|
||||
@@ -134,7 +134,7 @@ The result says how to restore them.
|
||||
|
||||
### Nothing was found here.
|
||||
|
||||
Choose **Another setup or folder**, then your setup and its folder.
|
||||
The screen lists every setup: choose yours, then its folder.
|
||||
|
||||
### Error: Python 3.8 or newer is required.
|
||||
|
||||
|
||||
Reference in new issue
Block a user