Optionally return error message from wxSecretStore::IsOk()
This allows to give at least some explanation about why the secrets can't be stored to the user, e.g. they could search for a message such as The name org.freedesktop.secrets was not provided by any .service files to find out that gnome-keyring package needs to be installed on their system. Note that this change means that under Unix an attempt to connect to the secret service is now made when wxSecretStore is constructed and not just when it's used for the first time, as before.
This commit is contained in:
@@ -126,8 +126,9 @@ public:
|
||||
~wxSecretStore();
|
||||
|
||||
|
||||
// Check if this object is valid.
|
||||
bool IsOk() const { return m_impl != NULL; }
|
||||
// Check if this object is valid, i.e. can be used, and optionally fill in
|
||||
// the provided error message string if it isn't.
|
||||
bool IsOk(wxString* errmsg = NULL) const;
|
||||
|
||||
|
||||
// Store a username/password combination.
|
||||
|
Reference in New Issue
Block a user