Move setting prune options to right place. Fixes #339 (#342)

This commit is contained in:
Manuel Riel 2019-08-21 20:54:00 +08:00 committed by GitHub
parent 0e24bc00c2
commit eb2b47b4b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 10 deletions

View File

@ -11,6 +11,8 @@ icon-resources: ## Compile SVG icons to importable resource files.
Vorta.app: translations-to-qm
pyinstaller --clean --noconfirm vorta.spec
cp -R bin/darwin/Sparkle.framework dist/Vorta.app/Contents/Frameworks/
cd dist; codesign --deep --sign 'Developer ID Application: Manuel Riel (CNMSCAXT48)' Vorta.app
Vorta.dmg-Vagrant:
vagrant up darwin64
@ -22,11 +24,10 @@ Vorta.dmg-Vagrant:
sleep 2; appdmg appdmg.json dist/vorta-0.6.22.dmg
Vorta.dmg: Vorta.app
# sleep 2; cd dist; zip -9rq vorta-0.6.22.zip Vorta.app
rm -rf dist/vorta-0.6.22.dmg
sleep 2; appdmg appdmg.json dist/vorta-0.6.22.dmg
github-release: Vorta.dmg-Vagrant
github-release: Vorta.dmg
hub release create --attach=dist/vorta-0.6.22.dmg v0.6.22
git checkout gh-pages
git commit -m 'rebuild pages' --allow-empty

View File

@ -60,14 +60,6 @@ class ArchiveTab(ArchiveTabBase, ArchiveTabUI, BackupProfileMixin):
self.archiveTable.cellDoubleClicked.connect(self.cell_double_clicked)
self.archiveTable.itemSelectionChanged.connect(self.update_mount_button_text)
# Populate pruning options from database
profile = self.profile()
for i in self.prune_intervals:
getattr(self, f'prune_{i}').setValue(getattr(profile, f'prune_{i}'))
getattr(self, f'prune_{i}').valueChanged.connect(self.save_prune_setting)
self.prune_keep_within.setText(profile.prune_keep_within)
self.prune_keep_within.editingFinished.connect(self.save_prune_setting)
self.mountButton.clicked.connect(self.mount_action)
self.listButton.clicked.connect(self.list_action)
self.pruneButton.clicked.connect(self.prune_action)
@ -135,6 +127,14 @@ class ArchiveTab(ArchiveTabBase, ArchiveTabUI, BackupProfileMixin):
self.archiveNameTemplate.setText(profile.new_archive_name)
self.prunePrefixTemplate.setText(profile.prune_prefix)
# Populate pruning options from database
profile = self.profile()
for i in self.prune_intervals:
getattr(self, f'prune_{i}').setValue(getattr(profile, f'prune_{i}'))
getattr(self, f'prune_{i}').valueChanged.connect(self.save_prune_setting)
self.prune_keep_within.setText(profile.prune_keep_within)
self.prune_keep_within.editingFinished.connect(self.save_prune_setting)
def save_archive_template(self, tpl, key):
profile = self.profile()
try: