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:
@@ -6,6 +6,7 @@ Live countdown, one-click copy, per-server secrets.
|
||||
import threading
|
||||
import customtkinter as ctk
|
||||
from core.i18n import t
|
||||
from gui.widgets.entry_undo import enable_undo
|
||||
|
||||
|
||||
class TOTPTab(ctk.CTkFrame):
|
||||
@@ -106,8 +107,7 @@ class TOTPTab(ctk.CTkFrame):
|
||||
font=ctk.CTkFont(family="Consolas", size=12)
|
||||
)
|
||||
self.secret_entry.pack(side="left", fill="x", expand=True, padx=(0, 5))
|
||||
# Enable undo functionality
|
||||
self.secret_entry._entry.config(undo=True)
|
||||
enable_undo(self.secret_entry)
|
||||
|
||||
self.show_secret_btn = ctk.CTkButton(
|
||||
entry_row, text=t("show"), width=70,
|
||||
|
||||
Reference in New Issue
Block a user