This commit is contained in:
Christian Kauer 2026-03-26 10:05:14 +01:00
parent b7c3c23c0b
commit 7b711f6ca2
4 changed files with 57 additions and 7 deletions

View File

@ -95,7 +95,12 @@
"Bash(find /mnt/ventoy/projects/chrka/whisper-dictation/shared_data/ -name *.bin -o -name *.pt -o -name model*)", "Bash(find /mnt/ventoy/projects/chrka/whisper-dictation/shared_data/ -name *.bin -o -name *.pt -o -name model*)",
"Bash(python3 -c \":*)", "Bash(python3 -c \":*)",
"Read(//usr/bin/**)", "Read(//usr/bin/**)",
"Bash(/run/media/chk/Ventoy/projects/chrka/whisper-dictation/.venv-linux/bin/python build.py)" "Bash(/run/media/chk/Ventoy/projects/chrka/whisper-dictation/.venv-linux/bin/python build.py)",
"Bash(pip install:*)",
"Bash(pip3 install:*)",
"Bash(python3 -m pip install Pillow)",
"Bash(python3 -m pip install pyinstaller)",
"Bash(python3 build.py)"
] ]
} }
} }

View File

@ -77,7 +77,7 @@
}, },
{ {
"from": "Langbannsystem", "from": "Langbannsystem",
"to": "KANBAN-System" "to": "Kanban-System"
} }
] ]
} }

View File

@ -30,7 +30,8 @@ def create(root: tk.Tk, log_queue: queue.Queue,
win = tk.Toplevel(root) win = tk.Toplevel(root)
win.title("Whisper Dictation") win.title("Whisper Dictation")
win.configure(bg=BG) win.configure(bg=BG)
win.resizable(False, False) win.resizable(True, True)
win.minsize(400, 300)
win.protocol("WM_DELETE_WINDOW", win.withdraw) win.protocol("WM_DELETE_WINDOW", win.withdraw)
# ── Header ── # ── Header ──

View File

@ -140,6 +140,22 @@ def _open_main(root: tk.Tk) -> None:
activestyle="none", height=10) activestyle="none", height=10)
words_box.pack(fill="both", expand=True) words_box.pack(fill="both", expand=True)
def edit_word(_event=None):
sel = words_box.curselection()
if not sel:
return
word = cfg.vocab["words"].pop(sel[0])
cfg.save_vocab()
if is_correction.get():
is_correction.set(False)
toggle_form()
entry_word.delete(0, tk.END)
entry_word.insert(0, word)
entry_word.focus_set()
refresh_lists()
words_box.bind("<Double-1>", edit_word)
def del_word(): def del_word():
sel = words_box.curselection() sel = words_box.curselection()
if sel: if sel:
@ -147,9 +163,14 @@ def _open_main(root: tk.Tk) -> None:
cfg.save_vocab() cfg.save_vocab()
refresh_lists() refresh_lists()
tk.Button(col_w, text=" Entfernen", command=del_word, word_btns = tk.Frame(col_w, bg=BG)
word_btns.pack(anchor="e", pady=(4, 0))
tk.Button(word_btns, text="✎ Bearbeiten", command=edit_word,
bg=BG3, fg=AMBER, font=FONT_S, relief="flat",
padx=8, pady=3, cursor="hand2", bd=0).pack(side="left", padx=(0, 6))
tk.Button(word_btns, text=" Entfernen", command=del_word,
bg=BG3, fg=RED, font=FONT_S, relief="flat", bg=BG3, fg=RED, font=FONT_S, relief="flat",
padx=8, pady=3, cursor="hand2", bd=0).pack(anchor="e", pady=(4, 0)) padx=8, pady=3, cursor="hand2", bd=0).pack(side="left")
# Replacements column # Replacements column
col_r = tk.Frame(lists_frame, bg=BG) col_r = tk.Frame(lists_frame, bg=BG)
@ -162,6 +183,24 @@ def _open_main(root: tk.Tk) -> None:
activestyle="none", height=10) activestyle="none", height=10)
repl_box.pack(fill="both", expand=True) repl_box.pack(fill="both", expand=True)
def edit_repl(_event=None):
sel = repl_box.curselection()
if not sel:
return
repl = cfg.vocab["replacements"].pop(sel[0])
cfg.save_vocab()
if not is_correction.get():
is_correction.set(True)
toggle_form()
entry_from.delete(0, tk.END)
entry_from.insert(0, repl["from"])
entry_to.delete(0, tk.END)
entry_to.insert(0, repl["to"])
entry_from.focus_set()
refresh_lists()
repl_box.bind("<Double-1>", edit_repl)
def del_repl(): def del_repl():
sel = repl_box.curselection() sel = repl_box.curselection()
if sel: if sel:
@ -169,9 +208,14 @@ def _open_main(root: tk.Tk) -> None:
cfg.save_vocab() cfg.save_vocab()
refresh_lists() refresh_lists()
tk.Button(col_r, text=" Entfernen", command=del_repl, repl_btns = tk.Frame(col_r, bg=BG)
repl_btns.pack(anchor="e", pady=(4, 0))
tk.Button(repl_btns, text="✎ Bearbeiten", command=edit_repl,
bg=BG3, fg=AMBER, font=FONT_S, relief="flat",
padx=8, pady=3, cursor="hand2", bd=0).pack(side="left", padx=(0, 6))
tk.Button(repl_btns, text=" Entfernen", command=del_repl,
bg=BG3, fg=RED, font=FONT_S, relief="flat", bg=BG3, fg=RED, font=FONT_S, relief="flat",
padx=8, pady=3, cursor="hand2", bd=0).pack(anchor="e", pady=(4, 0)) padx=8, pady=3, cursor="hand2", bd=0).pack(side="left")
def refresh_lists(): def refresh_lists():
words_box.delete(0, tk.END) words_box.delete(0, tk.END)