[gnome-online-accounts/gnome-3-6] facebook: Implement is_identity_node
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-online-accounts/gnome-3-6] facebook: Implement is_identity_node
- Date: Mon, 15 Oct 2012 11:46:08 +0000 (UTC)
commit cd54f2b350f9729ea3bad5f9550903efef132779
Author: Debarshi Ray <debarshir gnome org>
Date: Sat Oct 6 19:33:17 2012 +0200
facebook: Implement is_identity_node
Fixes: https://bugzilla.gnome.org/681729
src/goabackend/goafacebookprovider.c | 29 +++++++++++++++++++++++++++++
1 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/src/goabackend/goafacebookprovider.c b/src/goabackend/goafacebookprovider.c
index e01109b..264a3f3 100644
--- a/src/goabackend/goafacebookprovider.c
+++ b/src/goabackend/goafacebookprovider.c
@@ -273,6 +273,34 @@ is_deny_node (GoaOAuth2Provider *provider, WebKitDOMNode *node)
return ret;
}
+static gboolean
+is_identity_node (GoaOAuth2Provider *provider, WebKitDOMHTMLInputElement *element)
+{
+ gboolean ret;
+ gchar *element_type;
+ gchar *name;
+
+ element_type = NULL;
+ name = NULL;
+
+ ret = FALSE;
+
+ g_object_get (element, "type", &element_type, NULL);
+ if (g_strcmp0 (element_type, "text") != 0)
+ goto out;
+
+ name = webkit_dom_html_input_element_get_name (element);
+ if (g_strcmp0 (name, "email") != 0)
+ goto out;
+
+ ret = TRUE;
+
+ out:
+ g_free (element_type);
+ g_free (name);
+ return ret;
+}
+
/* ---------------------------------------------------------------------------------------------------- */
static gboolean
@@ -401,5 +429,6 @@ goa_facebook_provider_class_init (GoaFacebookProviderClass *klass)
oauth2_class->get_authentication_cookie = get_authentication_cookie;
oauth2_class->get_identity_sync = get_identity_sync;
oauth2_class->is_deny_node = is_deny_node;
+ oauth2_class->is_identity_node = is_identity_node;
oauth2_class->add_account_key_values = add_account_key_values;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]