Don't fail when Geary fails to save the password to the keyring: Closes #5256

This commit is contained in:
Matthew Pirocchi 2012-05-23 16:39:52 -07:00
parent 883e45577b
commit 7c0f7b8dc1
2 changed files with 4 additions and 3 deletions

1
.gitignore vendored
View file

@ -8,4 +8,5 @@ build/
/geary-mailer
/geary-console
*.xz
*.swp

View file

@ -6,13 +6,13 @@
const string GEARY_USERNAME_PREFIX = "org.yorba.geary username:";
public static void keyring_save_password(string username, string password) {
public static bool keyring_save_password(string username, string password) {
string name = GEARY_USERNAME_PREFIX + username;
GnomeKeyring.Result res = GnomeKeyring.store_password_sync(GnomeKeyring.NETWORK_PASSWORD, null,
name, password, "user", name);
assert(res == GnomeKeyring.Result.OK);
return res == GnomeKeyring.Result.OK;
}
// Returns the password for the given username, or null if not set.