mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
pamhyr: Add CONFIG modules.
This commit is contained in:
1 parent
1be8f6c434
commit
20686086d8
3 files changed
+15
No files matched your search
@@ -408,6 +408,12 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
|
||||
self._backup_timer.timeout.connect(self._backup)
|
||||
|
||||
def _do_update_config(self):
|
||||
ts = self.get_config_backup_freq_to_sec()
|
||||
logger.debug(f"Reset backup timer to {ts} second")
|
||||
|
||||
self._backup_timer.start(ts * 1000)
|
||||
|
||||
def _init_propagation_keys(self):
|
||||
self._propagation_keys = Modules(0)
|
||||
|
||||
@@ -419,11 +425,17 @@ class ApplicationWindow(QMainWindow, ListedSubWindow, WindowToolKit):
|
||||
self.update()
|
||||
|
||||
keys = self._propagation_keys
|
||||
if keys is Modules.NONE:
|
||||
return
|
||||
|
||||
self._init_propagation_keys()
|
||||
|
||||
if Modules.WINDOW_LIST in keys:
|
||||
self._do_update_window_list()
|
||||
|
||||
if Modules.CONFIG in keys:
|
||||
self._do_update_config()
|
||||
|
||||
logger.debug(f"Propagation of {keys}")
|
||||
for _, window in self.sub_win_list:
|
||||
window._propagated_update(key=keys)
|
||||
|
||||
Reference in new issue
Block a user