Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 36 additions & 0 deletions windows/freeflow/settings_window.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
"""Settings window with General and Run Log tabs (tkinter)."""
import os
import threading
import tkinter as tk
from tkinter import ttk, messagebox
Expand All @@ -7,6 +8,7 @@

import sounddevice as sd

from .config import Config
from .transcription_service import TranscriptionService
from .models import HotkeyOption

Expand Down Expand Up @@ -191,6 +193,40 @@ def _on_mousewheel(event: tk.Event) -> None:
foreground="#9ca3af",
).pack(anchor=tk.W, padx=10, pady=(0, 8))

# --- Data Folder ---
data_frame = ttk.LabelFrame(scroll_frame, text="Data Folder")
data_frame.pack(fill=tk.X, **pad)

ttk.Label(
data_frame,
text="Settings, audio recordings, and history DB live in %APPDATA%\\FreeFlow.",
font=("Segoe UI", 9),
foreground="#6b7280",
).pack(anchor=tk.W, padx=10, pady=(5, 5))

ttk.Button(
data_frame,
text="Open data folder",
command=self._open_data_folder,
).pack(anchor=tk.W, padx=10, pady=(0, 8))

def _open_data_folder(self) -> None:
"""Open the FreeFlow data folder in Explorer.

Config._app_data_dir() mkdir's the folder at import time, so it
always exists by the time the user clicks this button. os.startfile
returns immediately after handing the path to the shell, so the
settings window stays responsive while Explorer is open.
"""
try:
os.startfile(str(Config.app_data_dir()))
except OSError as e:
messagebox.showerror(
"Open data folder",
f"Could not open the data folder:\n{e}",
parent=self._root,
)

def _build_snippets_tab(self) -> None:
"""Build the Snippets tab for managing voice shortcuts."""
# Header
Expand Down