summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2025-07-18 15:19:10 +0300
committerPaul Buetow <paul@buetow.org>2025-07-18 15:19:10 +0300
commit28e1bf32bf6f6a44d0e81c672af984059335a836 (patch)
tree0c4ef4f5e299cb4d39455b7609fbd27b83fe1afc
parent93500a6d9a237c3a78a73d552c17583938672a59 (diff)
refactor: improve UI by removing unnecessary dialogs
- Remove "Export Complete" dialog after exporting, use status bar instead - Remove Preferences menu item and dialog (not implemented) - Simplify File menu to only contain Export and Quit options 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
-rw-r--r--internal/gui/app.go22
1 files changed, 6 insertions, 16 deletions
diff --git a/internal/gui/app.go b/internal/gui/app.go
index 4a392ed..5f3699c 100644
--- a/internal/gui/app.go
+++ b/internal/gui/app.go
@@ -336,8 +336,6 @@ func (a *Application) setupUI() {
fileMenu := fyne.NewMenu("File",
fyne.NewMenuItem("Export to Anki... (E)", a.onExportToAnki),
fyne.NewMenuItemSeparator(),
- fyne.NewMenuItem("Preferences...", a.onPreferences),
- fyne.NewMenuItemSeparator(),
fyne.NewMenuItem("Quit", a.app.Quit),
)
@@ -882,10 +880,9 @@ func (a *Application) onExportToAnki() {
// Get actual card count
total, withAudio, withImages := gen.Stats()
- dialog.ShowInformation("Export Complete",
- fmt.Sprintf("Exported %d cards to:\n%s\n(%d with audio, %d with images)\n\nThe APKG file includes all media and can be imported directly into Anki.",
- total, outputPath, withAudio, withImages),
- a.window)
+ // Update status bar instead of showing dialog
+ a.updateStatus(fmt.Sprintf("Exported %d cards to %s (%d with audio, %d with images)",
+ total, outputPath, withAudio, withImages))
} else {
filename = "anki_import.csv"
outputPath = filepath.Join(a.config.OutputDir, filename)
@@ -912,10 +909,9 @@ func (a *Application) onExportToAnki() {
// Get actual card count
total, withAudio, withImages := gen.Stats()
- dialog.ShowInformation("Export Complete",
- fmt.Sprintf("Exported %d cards to:\n%s\n(%d with audio, %d with images)\n\nNote: The CSV file should be in the same directory as your media files (%s) for Anki import to work correctly.",
- total, outputPath, withAudio, withImages, a.config.OutputDir),
- a.window)
+ // Update status bar instead of showing dialog
+ a.updateStatus(fmt.Sprintf("Exported %d cards to %s (%d with audio, %d with images)",
+ total, outputPath, withAudio, withImages))
}
}, a.window)
@@ -923,12 +919,6 @@ func (a *Application) onExportToAnki() {
customDialog.Show()
}
-// onPreferences shows the preferences dialog
-func (a *Application) onPreferences() {
- // This will be implemented in preferences.go
- dialog.ShowInformation("Preferences", "Preferences dialog coming soon!", a.window)
-}
-
// Helper methods
func (a *Application) setUIEnabled(enabled bool) {
if enabled {