diff options
author | Matthias Baumgartner <dev@igsor.net> | 2023-01-12 17:18:43 +0100 |
---|---|---|
committer | Matthias Baumgartner <dev@igsor.net> | 2023-01-12 17:18:43 +0100 |
commit | 8f2f697f7ed52b7e1c7a17411b2de526b6490691 (patch) | |
tree | 3a7d1596e5246581dc0f1a1d0efd9d325bfe6b1f /tagit/windows | |
parent | 233d8541c0ddfadd5905ba99acf700eb6462af2b (diff) | |
download | tagit-8f2f697f7ed52b7e1c7a17411b2de526b6490691.tar.gz tagit-8f2f697f7ed52b7e1c7a17411b2de526b6490691.tar.bz2 tagit-8f2f697f7ed52b7e1c7a17411b2de526b6490691.zip |
removed save and sync functionality since they no longer apply
Diffstat (limited to 'tagit/windows')
-rw-r--r-- | tagit/windows/desktop.py | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/tagit/windows/desktop.py b/tagit/windows/desktop.py index 5128454..0b28230 100644 --- a/tagit/windows/desktop.py +++ b/tagit/windows/desktop.py @@ -101,29 +101,10 @@ class MainWindow(FloatLayout): def autoupdate(self, *args): self.trigger('AutoUpdate') - def autosync(self, *args): - self.trigger('AutoSync') - - def autosave(self, *args): - if not self.session.storage.file_connected(): - return - - try: - self.trigger('SaveLibrary') - logger.info('Database: Autosaved') - except Exception as e: - logger.error(f'Database: Autosave failed ({e})') - ## startup and shutdown def on_startup(self): - # start autosave - autosave = self.session.cfg('storage', 'library', 'autosave') - if autosave > 0: - # autosave is in minutes - Clock.schedule_interval(self.autosave, autosave * 60) - # start index autoindex = self.session.cfg('storage', 'index', 'autoindex') autoindex = 0 if autoindex == float('inf') else autoindex @@ -138,13 +119,6 @@ class MainWindow(FloatLayout): # autoupdate is in minutes Clock.schedule_interval(self.autoupdate, autoupdate * 60) - # start sync - autosync = self.session.cfg('storage', 'index', 'autosync') - autosync = 0 if autosync == float('inf') else autosync - if autosync > 0: - # autosync is in minutes - Clock.schedule_interval(self.autosync, autosync * 60) - # trigger operations on startup if self.session.cfg('storage', 'index', 'index_on_startup'): self.autoindex() @@ -152,9 +126,6 @@ class MainWindow(FloatLayout): if self.session.cfg('storage', 'index', 'update_on_startup'): self.autoupdate() - if self.session.cfg('storage', 'index', 'sync_on_startup'): - self.autosync() - # switch to starting plane - if it's the dashboard no action is needed if self.session.cfg('ui', 'standalone', 'plane') == 'browsing': self.trigger('ShowBrowsing') @@ -204,7 +175,7 @@ class MainWindow(FloatLayout): return False # FIXME: mb/port if self.session.storage.changed() and not self.session.cfg('session', 'debug'): - # save and close + # close self.trigger('CloseSessionAndExit') return True # close w/o saving @@ -222,27 +193,18 @@ Since you see this message, it's time to configure tagit. It's a good idea to ge ## config ## -config.declare(('storage', 'library', 'autosave'), config.Float(), 0, - __name__, 'Autosave', 'Time interval in minutes at which the library is saved to disk while running the GUI. A value of 0 means that the feature is disabled.') - config.declare(('storage', 'index', 'autoindex'), config.Float(), 0, __name__, 'Autoindex', 'Time interval in minutes at which indexing is triggered while running the GUI. A value of 0 means that the feature is disabled. Also configure the index watchlist.') config.declare(('storage', 'index', 'autoupdate'), config.Float(), 0, __name__, 'Autoupdate', 'Time interval in minutes at which updating is triggered while running the GUI. A value of 0 means that the feature is disabled.') -config.declare(('storage', 'index', 'autosync'), config.Float(), 0, - __name__, 'Autosync', 'Time interval in minutes at which synchronization is triggered while running the GUI. A value of 0 means that the feature is disabled.') - config.declare(('storage', 'index', 'index_on_startup'), config.Bool(), False, __name__, 'Index on startup', 'Trigger indexing when the GUI is started. Also configure the index watchlist') config.declare(('storage', 'index', 'update_on_startup'), config.Bool(), False, __name__, 'Update on startup', 'Trigger updating when the GUI is started.') -config.declare(('storage', 'index', 'sync_on_startup'), config.Bool(), False, - __name__, 'Sync on startup', 'Trigger synchronization when the GUI is started.') - config.declare(('session', 'first_start'), config.Bool(), True, __name__, 'First start', 'Show the welcome message typically shown when tagit is started the first time.') |