feat: Implement search filter persistence and UI synchronization

This commit is contained in:
William Valentin
2025-08-08 11:54:43 -07:00
parent 61c8c72cf7
commit b039447a1f
3 changed files with 132 additions and 5 deletions
+25
View File
@@ -686,6 +686,19 @@ class UIManager:
# Pack after file_info so it appears to the left of it
self.last_backup_label.pack(side=tk.RIGHT)
# Tiny filter activity hint (right side, left of backup info)
self.filter_hint_label = tk.Label(
self.status_bar,
text="",
anchor=tk.E,
font=("TkDefaultFont", 9),
padx=8,
pady=2,
bg=theme_colors["bg"],
fg="#6c757d",
)
self.filter_hint_label.pack(side=tk.RIGHT)
return self.status_bar
def update_last_backup(self, when_text: str) -> None:
@@ -815,6 +828,18 @@ class UIManager:
# Non-fatal UI convenience; ignore errors
pass
def set_filter_hint(self, active: bool, text: str | None = None) -> None:
"""Show or hide a small status hint when filters are active.
Args:
active: Whether filters are currently active
text: Optional custom hint text (defaults to 'Filters active')
"""
if not self.filter_hint_label:
return
hint_text = (text or "Filters active") if active else ""
self.filter_hint_label.config(text=hint_text)
def create_edit_window(
self, values: tuple[str, ...], callbacks: dict[str, Callable]
) -> tk.Toplevel: