From 28e1bf32bf6f6a44d0e81c672af984059335a836 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 18 Jul 2025 15:19:10 +0300 Subject: refactor: improve UI by removing unnecessary dialogs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- internal/gui/app.go | 22 ++++++---------------- 1 file 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 { -- cgit v1.2.3