[epiphany/wip/sync-rebase: 64/74] sync-secret: Free errors and improve translators comment
- From: Gabriel - Cristian Ivascu <gabrielivascu src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany/wip/sync-rebase: 64/74] sync-secret: Free errors and improve translators comment
- Date: Thu, 29 Sep 2016 17:48:11 +0000 (UTC)
commit 7e81e551bd178680fede5de2b329c6204cb6d858
Author: Gabriel Ivascu <ivascu gabriel59 gmail com>
Date: Tue Aug 30 17:38:15 2016 +0300
sync-secret: Free errors and improve translators comment
src/ephy-sync-secret.c | 19 ++++++++++++++-----
1 files changed, 14 insertions(+), 5 deletions(-)
---
diff --git a/src/ephy-sync-secret.c b/src/ephy-sync-secret.c
index 486299d..ce4c49a 100644
--- a/src/ephy-sync-secret.c
+++ b/src/ephy-sync-secret.c
@@ -45,8 +45,10 @@ forget_all_tokens_cb (SecretService *service,
secret_service_clear_finish (service, result, &error);
- if (error != NULL)
+ if (error != NULL) {
g_warning ("Failed to clear token secret schema: %s", error->message);
+ g_error_free (error);
+ }
}
static void
@@ -58,8 +60,10 @@ store_token_cb (SecretService *service,
secret_service_store_finish (service, result, &error);
- if (error != NULL)
+ if (error != NULL) {
g_warning ("Failed to store token in secret schema: %s", error->message);
+ g_error_free (error);
+ }
}
void
@@ -95,6 +99,12 @@ ephy_sync_secret_load_tokens (EphySyncService *service)
SECRET_SEARCH_ALL | SECRET_SEARCH_UNLOCK |
SECRET_SEARCH_LOAD_SECRETS,
NULL, &error);
+ if (error != NULL) {
+ g_warning ("Failed to search for attributes: %s", error->message);
+ g_error_free (error);
+ return;
+ }
+
for (GList *m = matches; m != NULL; m = m->next) {
secret_item = m->data;
attributes = secret_item_get_attributes (secret_item);
@@ -134,9 +144,8 @@ ephy_sync_secret_store_token (const char *email,
TOKEN_TYPE_KEY, type,
TOKEN_NAME_KEY, name,
NULL);
- /* Translators: The %s is the name of the token whose value is stored.
- * Example: quickStretchedPW or authPW
- */
+ /* Translators: secret token description stored in gnome-keyring.
+ * The %s represents the name of the token, e.g. sessionToken. */
label = g_strdup_printf (_("Token value for %s token"), name);
secret_service_store (NULL, EPHY_SYNC_TOKEN_SCHEMA, attributes,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]