[gthumb] [facebook] use the account object to make the code easier to understand
- From: Paolo Bacchilega <paobac src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gthumb] [facebook] use the account object to make the code easier to understand
- Date: Wed, 14 Apr 2010 11:56:23 +0000 (UTC)
commit 862fe07d25a41077a7494503f56be02ceebac4cf
Author: Paolo Bacchilega <paobac src gnome org>
Date: Wed Apr 14 13:27:19 2010 +0200
[facebook] use the account object to make the code easier to understand
extensions/facebook/facebook-authentication.c | 9 +++------
1 files changed, 3 insertions(+), 6 deletions(-)
---
diff --git a/extensions/facebook/facebook-authentication.c b/extensions/facebook/facebook-authentication.c
index bb983db..3ab1541 100644
--- a/extensions/facebook/facebook-authentication.c
+++ b/extensions/facebook/facebook-authentication.c
@@ -420,16 +420,12 @@ get_session_ready_cb (GObject *source_object,
facebook_account_set_secret (account, facebook_connection_get_secret (self->priv->conn));
facebook_account_set_user_id (account, facebook_connection_get_user_id (self->priv->conn));
set_account (self, account);
- g_object_unref (account);
#ifdef HAVE_GNOME_KEYRING
if (gnome_keyring_is_available ()) {
char *secret;
- secret = g_strconcat (facebook_connection_get_session_key (self->priv->conn),
- SECRET_SEPARATOR,
- facebook_connection_get_secret (self->priv->conn),
- NULL);
+ secret = g_strconcat (account->session_key, SECRET_SEPARATOR, account->secret, NULL);
gnome_keyring_store_password (GNOME_KEYRING_NETWORK_PASSWORD,
NULL,
"Facebook",
@@ -437,7 +433,7 @@ get_session_ready_cb (GObject *source_object,
store_password_done_cb,
self,
NULL,
- "user", facebook_connection_get_user_id (self->priv->conn),
+ "user", account->user_id,
"server", FACEBOOK_HTTPS_REST_SERVER,
"protocol", "https",
NULL);
@@ -446,6 +442,7 @@ get_session_ready_cb (GObject *source_object,
}
#endif
+ g_object_unref (account);
connect_to_server (self);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]