~chasedouglas/trojita/master

Viewing all changes in revision 4451.

  • Committer: Jan Kundrát
  • Author(s): Pali Rohár
  • Date: 2015-02-26 11:35:49 UTC
  • Revision ID: git-v1:af279956055690a22d11552e43d019e984a9f036
Fix more problems with passwords in SettingsDialog

* Choosing option "Disable passwords" should disable all password boxes in
  SettingDialog and prevent users from entering passwords into boxes

* When option "Disable passwords" was chosen or password boxes are
  disabled/inactive (or invisible to users for any reason), Trojita should not
  try to use password plugin (either for storing or reading passwords)

* When user changed (or disabled) password plugin in SettingDialog and then
  closed SettingDialog without accepting changes, Trojita should not change
  password plugin in config file and should revert back to original plugin

UiUtils::PasswordWatcher class currently does not distinguish between plugin
which refused to return password (for whatever reason) and password plugin that
failed to load & run (or when user totally disabled password plugins). So code
was extended to provide function isPluginAvailable() which returns if plugin
got successfully loaded & initialized.

Next, code for SettingsDialog was changed to enable or disable password boxes
as needed according to above specification. Also now it tracks if user changed
password plugin in dialog or not and properly call revert actions in reject().

Change-Id: I5fafcbb3e730b0010729d64617757268495402ba

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: