v1.8.12: fix Ctrl+Z undo — manual implementation for tk.Entry
tk.Entry has no built-in undo (unlike tk.Text), so _entry.config(undo=True) crashed. Replaced with custom entry_undo.py that tracks history manually and binds Ctrl+Z/Ctrl+Y (+ Russian layout support). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@ Sidebar — server list with search, add/edit/delete buttons.
|
||||
import customtkinter as ctk
|
||||
from core.i18n import t
|
||||
from gui.widgets.status_badge import StatusBadge
|
||||
from gui.widgets.entry_undo import enable_undo
|
||||
|
||||
|
||||
class Sidebar(ctk.CTkFrame):
|
||||
@@ -29,8 +30,7 @@ class Sidebar(ctk.CTkFrame):
|
||||
self.search_var.trace_add("write", lambda *_: self._refresh_list())
|
||||
self.search_entry = ctk.CTkEntry(self, placeholder_text=t("search"), textvariable=self.search_var)
|
||||
self.search_entry.pack(fill="x", padx=10, pady=(5, 10))
|
||||
# Enable undo functionality
|
||||
self.search_entry._entry.config(undo=True)
|
||||
enable_undo(self.search_entry)
|
||||
|
||||
# Server list
|
||||
self.list_frame = ctk.CTkScrollableFrame(self, fg_color="transparent")
|
||||
|
||||
Reference in New Issue
Block a user