From ab6cb6cd2ecd6136e0a62d60f42320cef4c09b8f Mon Sep 17 00:00:00 2001 From: buhtz Date: Thu, 25 Jul 2024 19:23:06 +0200 Subject: [PATCH] fix: Empty EncFS snapshotpath field in Manage profiles dialog (#1808) For EncFS profiles the snapshotpath field in Manage profile dialog was empty. Beside of that the profile specific encfs-deprecation-warning dialog now is shown not only in Manage profiles dialog but also in MainWindow when an EncFS profile is selected. But it is shown only once. Fix #1808 Related to #1806 Related to #1734 --- qt/app.py | 9 +++++++++ qt/settingsdialog.py | 16 ++++++++++------ 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/qt/app.py b/qt/app.py index 3f3307c0e..8936483e0 100644 --- a/qt/app.py +++ b/qt/app.py @@ -898,6 +898,15 @@ def updateProfile(self): self.updatePlaces() self.updateFilesView(0) + # EncFS deprecation warning (see #1734) + current_mode = self.config.snapshotsMode(self.config.currentProfile()) + if current_mode in ('local_encfs', 'ssh_encfs'): + # Show the profile specific warning dialog only once per profile. + if self.config.profileBoolValue('msg_shown_encfs') is False: + self.config.setProfileBoolValue('msg_shown_encfs', True) + dlg = encfsmsgbox.EncfsCreateWarning(self) + dlg.exec() + def comboProfileChanged(self, index): if self.disableProfileChanged: return diff --git a/qt/settingsdialog.py b/qt/settingsdialog.py index 67b94c48d..11ae727b3 100644 --- a/qt/settingsdialog.py +++ b/qt/settingsdialog.py @@ -384,6 +384,9 @@ def __init__(self, parent): self.keyringSupported = tools.keyringSupported() self.cbPasswordSave.setEnabled(self.keyringSupported) + # mode change + self.comboModes.currentIndexChanged.connect(self.comboModesChanged) + # host, user, profile id groupBox = QGroupBox(self) self.frameAdvanced = groupBox @@ -1246,9 +1249,6 @@ def __init__(self, parent): self.updateProfiles() self.comboModesChanged() - # mode change - self.comboModes.currentIndexChanged.connect(self.comboModesChanged) - # enable tabs scroll buttons again but keep dialog size size = self.sizeHint() self.tabs.setUsesScrollButtons(scrollButtonDefault) @@ -2262,15 +2262,19 @@ def comboModesChanged(self, *params): self.cbSshCheckPing.setHidden(not enabled) self.cbSshCheckCommands.setHidden(not enabled) - # EncFS deprecation warnings + # EncFS deprecation warnings (see #1734) if active_mode in ('local_encfs', 'ssh_encfs'): self.encfsWarning.setHidden(False) # Workaround to avoid showing the warning messagebox just when # opening the manage profiles dialog. if self.isVisible(): - dlg = encfsmsgbox.EncfsCreateWarning(self) - dlg.exec() + # Show the profile specific warning dialog only once per + # profile. + if self.config.profileBoolValue('msg_shown_encfs') is False: + self.config.setProfileBoolValue('msg_shown_encfs', True) + dlg = encfsmsgbox.EncfsCreateWarning(self) + dlg.exec() else: self.encfsWarning.setHidden(True)