Added a command to refresh all results of the current tool.
This commit is contained in:
parent
a04c19c760
commit
a21d3de99c
2 changed files with 27 additions and 2 deletions
|
|
@ -22,6 +22,7 @@
|
||||||
│ (B[m[38;2;0;255;0m[48;2;0;0;0mp(B[m[38;2;255;255;255m[48;2;0;0;0m - Pause workers. (toggle) │
|
│ (B[m[38;2;0;255;0m[48;2;0;0;0mp(B[m[38;2;255;255;255m[48;2;0;0;0m - Pause workers. (toggle) │
|
||||||
│ (B[m[38;2;0;255;0m[48;2;0;0;0mo(B[m[38;2;255;255;255m[48;2;0;0;0m - Order files by type, or by directory location. (toggle) │
|
│ (B[m[38;2;0;255;0m[48;2;0;0;0mo(B[m[38;2;255;255;255m[48;2;0;0;0m - Order files by type, or by directory location. (toggle) │
|
||||||
│ (B[m[38;2;0;255;0m[48;2;0;0;0mr(B[m[38;2;255;255;255m[48;2;0;0;0m - Refresh the currently selected report. │
|
│ (B[m[38;2;0;255;0m[48;2;0;0;0mr(B[m[38;2;255;255;255m[48;2;0;0;0m - Refresh the currently selected report. │
|
||||||
|
│ (B[m[38;2;0;255;0m[48;2;0;0;0mR(B[m[38;2;255;255;255m[48;2;0;0;0m - Refresh all reports of the current tool. │
|
||||||
│ (B[m[38;2;0;255;0m[48;2;0;0;0mf(B[m[38;2;255;255;255m[48;2;0;0;0m - Resize the focused pane to the full screen. (toggle) │
|
│ (B[m[38;2;0;255;0m[48;2;0;0;0mf(B[m[38;2;255;255;255m[48;2;0;0;0m - Resize the focused pane to the full screen. (toggle) │
|
||||||
│ │
|
│ │
|
||||||
│Statuses: │
|
│Statuses: │
|
||||||
|
|
@ -56,5 +57,4 @@
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
│ │
|
||||||
│ │
|
|
||||||
└──────────────────────────────────────────────────────────────────────────────────────────────────┘(B[m
|
└──────────────────────────────────────────────────────────────────────────────────────────────────┘(B[m
|
||||||
|
|
@ -73,6 +73,7 @@ KEYS_DOC = """Keys:
|
||||||
*p - Pause workers. (toggle)
|
*p - Pause workers. (toggle)
|
||||||
*o - Order files by type, or by directory location. (toggle)
|
*o - Order files by type, or by directory location. (toggle)
|
||||||
*r - Refresh the currently selected report.
|
*r - Refresh the currently selected report.
|
||||||
|
*R - Refresh all reports of the current tool.
|
||||||
*f - Resize the focused pane to the full screen. (toggle)
|
*f - Resize the focused pane to the full screen. (toggle)
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
|
@ -420,6 +421,22 @@ class Summary:
|
||||||
self._jobs_added_event.set()
|
self._jobs_added_event.set()
|
||||||
self.completed_total -= 1
|
self.completed_total -= 1
|
||||||
|
|
||||||
|
def refresh_result(self, result):
|
||||||
|
selection = result
|
||||||
|
if selection.status not in {tools.Status.running, tools.Status.paused,
|
||||||
|
tools.Status.pending}:
|
||||||
|
selection.reset()
|
||||||
|
self.closest_placeholder_generator = None
|
||||||
|
self._jobs_added_event.set()
|
||||||
|
self.completed_total -= 1
|
||||||
|
|
||||||
|
def refresh_tool(self):
|
||||||
|
tool = self.get_selection().tool
|
||||||
|
for row in self._column:
|
||||||
|
for result in row:
|
||||||
|
if result.tool == tool:
|
||||||
|
self.refresh_result(result)
|
||||||
|
|
||||||
|
|
||||||
class Log:
|
class Log:
|
||||||
|
|
||||||
|
|
@ -742,6 +759,13 @@ class Screen:
|
||||||
def refresh(self):
|
def refresh(self):
|
||||||
self._summary.refresh(self._log)
|
self._summary.refresh(self._log)
|
||||||
|
|
||||||
|
def refresh_tool(self):
|
||||||
|
selection = self._summary.get_selection()
|
||||||
|
tool_name = tools.tool_name_colored(selection.tool, selection.path)
|
||||||
|
self._log.log_message([in_green("Refreshing all results of "),
|
||||||
|
tool_name, in_green("...")])
|
||||||
|
self._summary.refresh_tool()
|
||||||
|
|
||||||
_DIMMED_BORDER = [termstr.TermStr(part).fg_color(termstr.Color.grey_100)
|
_DIMMED_BORDER = [termstr.TermStr(part).fg_color(termstr.Color.grey_100)
|
||||||
for part in fill3.Border.THIN]
|
for part in fill3.Border.THIN]
|
||||||
|
|
||||||
|
|
@ -886,7 +910,8 @@ class Screen:
|
||||||
({"end", "ctrl e"}, cursor_end), ({"n"}, move_to_next_issue),
|
({"end", "ctrl e"}, cursor_end), ({"n"}, move_to_next_issue),
|
||||||
({"N"}, move_to_next_issue_of_tool), ({"e"}, edit_file),
|
({"N"}, move_to_next_issue_of_tool), ({"e"}, edit_file),
|
||||||
({"q"}, quit_), ({"p"}, toggle_pause), ({"r"}, refresh),
|
({"q"}, quit_), ({"p"}, toggle_pause), ({"r"}, refresh),
|
||||||
({"tab"}, toggle_focus), ({"f"}, toggle_fullscreen)]
|
({"R"}, refresh_tool), ({"tab"}, toggle_focus),
|
||||||
|
({"f"}, toggle_fullscreen)]
|
||||||
|
|
||||||
|
|
||||||
def add_watch_manager_to_mainloop(root_path, mainloop, on_filesystem_change,
|
def add_watch_manager_to_mainloop(root_path, mainloop, on_filesystem_change,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue