mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
pamhyr: Add periodic backup.
This commit is contained in:
1 parent
632cd2cd4c
commit
7f3cf46ee1
5 files changed
+131
-71
No files matched your search
@@ -123,11 +123,11 @@ class ConfigureWindow(PamhyrDialog):
|
||||
def setup_data(self):
|
||||
# Backup
|
||||
self.set_check_box("checkBox_backup", self._config.backup_enable)
|
||||
self.set_line_edit_text("lineEdit_backup_path",
|
||||
self._config.backup_path)
|
||||
# self.set_line_edit_text("lineEdit_backup_path",
|
||||
# self._config.backup_path)
|
||||
self.set_time_edit("timeEdit_backup_frequence",
|
||||
self._config.backup_frequence)
|
||||
self.set_spin_box("spinBox_backup_max", self._config.backup_max)
|
||||
# self.set_spin_box("spinBox_backup_max", self._config.backup_max)
|
||||
|
||||
# Editor
|
||||
self.set_line_edit_text("lineEdit_editor_cmd",
|
||||
@@ -155,12 +155,12 @@ class ConfigureWindow(PamhyrDialog):
|
||||
"pushButton_stricklers_del": self.del_stricklers,
|
||||
"pushButton_stricklers_sort": self.sort_stricklers,
|
||||
# Others
|
||||
"pushButton_backup_path": lambda: self.file_dialog(
|
||||
select_file=False,
|
||||
callback=lambda f: self.set_line_edit_text(
|
||||
"lineEdit_backup_path", f[0]
|
||||
)
|
||||
),
|
||||
# "pushButton_backup_path": lambda: self.file_dialog(
|
||||
# select_file=False,
|
||||
# callback=lambda f: self.set_line_edit_text(
|
||||
# "lineEdit_backup_path", f[0]
|
||||
# )
|
||||
# ),
|
||||
}
|
||||
|
||||
for button in buttons:
|
||||
@@ -172,11 +172,12 @@ class ConfigureWindow(PamhyrDialog):
|
||||
|
||||
# Backup
|
||||
self._config.backup_enable = self.get_check_box("checkBox_backup")
|
||||
self._config.backup_path = self.get_line_edit_text(
|
||||
"lineEdit_backup_path")
|
||||
# self._config.backup_path = self.get_line_edit_text(
|
||||
# "lineEdit_backup_path")
|
||||
self._config.backup_frequence = self.get_time_edit(
|
||||
"timeEdit_backup_frequence")
|
||||
self._config.backup_max = self.get_spin_box("spinBox_backup_max")
|
||||
"timeEdit_backup_frequence"
|
||||
)
|
||||
# self._config.backup_max = self.get_spin_box("spinBox_backup_max")
|
||||
|
||||
# Stricklers
|
||||
self._config.stricklers = deepcopy(self._stricklers)
|
||||
|
||||
Reference in new issue
Block a user