From 3e1cfb460ade7359c84bc334d4b39515c548cf4b Mon Sep 17 00:00:00 2001 From: Jackson Goode Date: Wed, 3 Jul 2024 13:05:09 -0700 Subject: [PATCH] Only save on exit, not on interaction --- psst-gui/src/cmd.rs | 10 ++-------- psst-gui/src/controller/sort.rs | 6 ------ psst-gui/src/data/mod.rs | 2 -- psst-gui/src/data/playlist.rs | 8 ++++---- psst-gui/src/delegate.rs | 7 +++++++ psst-gui/src/ui/menu.rs | 2 +- psst-gui/src/ui/mod.rs | 1 - 7 files changed, 14 insertions(+), 22 deletions(-) diff --git a/psst-gui/src/cmd.rs b/psst-gui/src/cmd.rs index 49a7670a..65957e13 100644 --- a/psst-gui/src/cmd.rs +++ b/psst-gui/src/cmd.rs @@ -9,36 +9,31 @@ use crate::{ }; // Widget IDs - pub const WIDGET_SEARCH_INPUT: WidgetId = WidgetId::reserved(1); // Common - pub const SHOW_MAIN: Selector = Selector::new("app.show-main"); pub const SHOW_ACCOUNT_SETUP: Selector = Selector::new("app.show-initial"); pub const CLOSE_ALL_WINDOWS: Selector = Selector::new("app.close-all-windows"); +pub const QUIT_APP_WITH_SAVE: Selector = Selector::new("app.quit-with-save"); pub const SET_FOCUS: Selector = Selector::new("app.set-focus"); pub const COPY: Selector = Selector::new("app.copy-to-clipboard"); // Find - pub const TOGGLE_FINDER: Selector = Selector::new("app.show-finder"); pub const FIND_IN_PLAYLIST: Selector = Selector::new("find-in-playlist"); pub const FIND_IN_SAVED_TRACKS: Selector = Selector::new("find-in-saved-tracks"); // Session - pub const SESSION_CONNECT: Selector = Selector::new("app.session-connect"); pub const LOG_OUT: Selector = Selector::new("app.log-out"); // Navigation - pub const NAVIGATE: Selector