Imported Upstream version 0.0.2 upstream/0.0.2
authorAmarnath Valluri <amarnath.valluri@linux.intel.com>
Sun, 25 Aug 2013 09:16:14 +0000 (12:16 +0300)
committerAmarnath Valluri <amarnath.valluri@linux.intel.com>
Sun, 25 Aug 2013 09:16:14 +0000 (12:16 +0300)
configure.ac
dists/rpm/signonui-efl.changes
dists/rpm/signonui-efl.spec
src/Makefile.am
src/sso-ui-dialog.c
src/sso-ui.c

index fc8c952..5b4f1df 100644 (file)
@@ -1,5 +1,5 @@
 AC_PREREQ(2.60)
-AC_INIT([signonui-efl], [0.0.1], [jussi.kukkonen@intel.com])
+AC_INIT([signonui-efl], [0.0.2], [jussi.kukkonen@intel.com])
 AM_INIT_AUTOMAKE([1.11 -Wall -Werror dist-bzip2])
 AM_SILENT_RULES([yes])
 
@@ -15,6 +15,8 @@ PKG_CHECK_MODULES(EFL,
                   ecore
                   evas
                   elementary)
+PKG_CHECK_MODULES(EWEBKIT,
+                  ewebkit2)
 
 PKG_CHECK_MODULES(GSIGNOND,
                   gsignond)
index b2c4c1c..8c750b9 100644 (file)
@@ -1,2 +1,8 @@
+* Fri Aug 22 2013 Amarnath Valluri <amarnath.valluri@linux.intel.com>
+- Release 0.0.2-2
+
+* Thu Aug 22 2013 Amarnath Valluri <amarnath.valluri@linux.intel.com>
+- Release 0.0.2 
+
 * Thu Jun 27 2013 Amarnath Valluri <amarnath.valluri@linux.intel.com>
 - Initial RPM packaging
index 0355f35..fa60d04 100644 (file)
@@ -1,8 +1,8 @@
 Name: signon-ui
 Summary: EFL based Single Sign-On UI
 URL: https://code.google.com/p/accounts-sso/source/checkout?repo=signonui-efl
-Version: 0.0.1
-Release: 1
+Version: 0.0.2
+Release: 2
 Group: Security/Secure Storage
 License: LGPL-2.1+
 Source: %{name}-%{version}.tar.gz
@@ -12,6 +12,7 @@ BuildRequires: pkgconfig(glib-2.0) >= 2.30
 BuildRequires: pkgconfig(gio-unix-2.0)
 BuildRequires: pkgconfig(evas)
 BuildRequires: pkgconfig(elementary)
+BuildRequires: pkgconfig(ewebkit2)
 BuildRequires: pkgconfig(gsignond)
 Provides: signon-ui
 
index 19ae08a..48681cf 100644 (file)
@@ -29,6 +29,7 @@ signon_ui_SOURCES = \
 signon_ui_CFLAGS = \
        $(GLIB_CFLAGS) \
        $(EFL_CFLAGS) \
+    $(EWEBKIT_CFLAGS) \
     $(GSIGNOND_CFLAGS) \
     -Wall -Werror \
        -I$(top_srcdir)
@@ -36,6 +37,7 @@ signon_ui_CFLAGS = \
 signon_ui_LDADD = \
        $(GLIB_LIBS) \
        $(EFL_LIBS) \
+    $(EWEBKIT_LIBS) \
     $(GSIGNOND_LIBS)
 
 CLEANFILES = \
index 2494529..5e8a1d4 100644 (file)
  */
 
 #include <Elementary.h>
-#include <gsignond/gsignond-signonui.h>
+#include <ewk_view.h>
 #include <gsignond/gsignond-signonui-data.h>
 
 #include "sso-ui-dialog.h"
+/*
+   FIXME : below defs should be remove once we revert 
+   change in gsignond
+*/
+#ifndef gsignond_signonui_data_ref
+#   define gsignond_signonui_data_ref gsignond_dictionary_ref
+#endif
+#ifndef gsignond_signonui_data_unref
+#   define gsignond_signonui_data_unref gsignond_dictionary_unref
+#endif
+#ifndef gsignond_signonui_data_new
+#   define gsignond_signonui_data_new gsignond_dictionary_new
+#endif
 
 G_DEFINE_TYPE (SSOUIDialog, sso_ui_dialog, G_TYPE_OBJECT)
 
 #define UI_DIALOG_PRIVATE(o) \
   (G_TYPE_INSTANCE_GET_PRIVATE ((o), SSO_TYPE_UI_DIALOG, SSOUIDialogPrivate))
 
+
 struct _SSOUIDialogPrivate {
   GDBusMethodInvocation  *invocation;
   GSignondSignonuiData *params;
@@ -283,7 +297,7 @@ on_forgot_clicked (void *data, Evas_Object *obj, void *event_info)
 }
 
 static void
-on_web_uri_change (void *data, Evas_Object *obj, void *event_info)
+on_web_url_change (void *data, Evas_Object *obj, void *event_info)
 {
   SSOUIDialog *self = data;
   const char *uri = event_info;
@@ -299,6 +313,20 @@ on_web_uri_change (void *data, Evas_Object *obj, void *event_info)
   close_dialog (self);
 }
 
+static void
+on_web_url_load_error (void *data, Evas_Object *obj, void *event_info)
+{
+    const Ewk_Error* error = (const Ewk_Error*)event_info;
+
+    g_debug ("%s, error %s", __FUNCTION__, ewk_error_description_get(error));
+}
+
+static void
+on_web_url_load_finished (void *data, Evas_Object *obj, void *event_info)
+{
+    g_debug("%s", __FUNCTION__);
+}
+
 static Evas_Object*
 add_entry (Evas_Object *window, Evas_Object *container, const gchar *label_text)
 {
@@ -381,24 +409,29 @@ build_dialog (SSOUIDialog *self)
 
   /* Web Dialog for Outh */
   if ((str = gsignond_signonui_data_get_open_url (priv->params))) {
+    Evas *canvas = NULL;
     priv->oauth_final_url = gsignond_signonui_data_get_final_url (priv->params);
-    if (elm_need_web ()) {
-      priv->oauth_web = elm_web_add (priv->dialog);
-      if (!elm_web_uri_set(priv->oauth_web, str))
-        g_warning ("Failed to set URI '%s'", str);
+    g_debug ("Loading url : %s", str);
+
+    canvas = evas_object_evas_get (priv->dialog);
+    priv->oauth_web = ewk_view_add(canvas);
 
-      evas_object_size_hint_min_set (priv->oauth_web, 200, 200);
-      evas_object_size_hint_weight_set(priv->oauth_web,
+    if (!ewk_view_url_set(priv->oauth_web, str))
+      g_warning ("Failed to set URI '%s'", str);
+
+    evas_object_size_hint_min_set (priv->oauth_web, 400, 300);
+    evas_object_size_hint_weight_set(priv->oauth_web,
                                      EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
-      evas_object_size_hint_align_set (priv->oauth_web,
+    evas_object_size_hint_align_set (priv->oauth_web,
                                      EVAS_HINT_FILL, EVAS_HINT_FILL);
-      evas_object_smart_callback_add (priv->oauth_web, "uri,changed",
-                                    on_web_uri_change, self);
-      elm_box_pack_end (content_box, priv->oauth_web);
-    } else {
-      g_debug ("Web login is disabled: Elementary does not have Ewebkit support");
-      priv->oauth_web = NULL;
-    } 
+    evas_object_smart_callback_add (priv->oauth_web, "url,changed",
+                                  on_web_url_change, self);
+    evas_object_smart_callback_add (priv->oauth_web, "load,error",
+                                  on_web_url_load_error, self);
+    evas_object_smart_callback_add (priv->oauth_web, "load,finished",
+                                  on_web_url_load_finished, self);
+    elm_box_pack_end (content_box, priv->oauth_web);
+    evas_object_show(priv->oauth_web);
   }
   else {
     gboolean query_username = FALSE;
index a729ebc..06571ed 100644 (file)
@@ -29,6 +29,7 @@
 #include <glib/gstdio.h>
 #include <Ecore.h>
 #include <Elementary.h>
+#include <EWebKit2.h>
 #include <gsignond/gsignond-signonui-data.h>
 
 #include "sso-ui-dbus-glue.h"
 
 #define SSO_UI_NAME "com.google.code.AccountsSSO.gSingleSignOn.UI"
 
+/*
+   FIXME : below defs should be remove once we revert 
+   change in gsignond
+*/
+#ifndef gsignond_signonui_data_new_from_variant
+#   define gsignond_signonui_data_new_from_variant gsignond_dictionary_new_from_variant
+#endif
+#ifndef gsignond_signonui_data_to_variant
+#   define gsignond_signonui_data_to_variant gsignond_dictionary_to_variant
+#endif
+#ifndef gsignond_signonui_data_unref
+#   define gsignond_signonui_data_unref gsignond_dictionary_unref
+#endif
+
 GDBusServer *bus_server = NULL; /* p2p server */
 GHashTable *dialogs;
 gchar *socket_file_path = NULL; /* p2p file system socket path */
@@ -395,6 +410,7 @@ elm_main (int argc, char **argv)
 #if !GLIB_CHECK_VERSION (2, 36, 0)
   g_type_init ();
 #endif
+  ewk_init ();
 
   if (ecore_getopt_parse (&optdesc, values, argc, argv) < 0) {
       fprintf (stderr, "Argument parsing failed\n");
@@ -447,6 +463,7 @@ elm_main (int argc, char **argv)
   _close_server ();
   g_hash_table_unref (dialogs);
 
+  ewk_shutdown ();
   elm_shutdown ();
   g_debug ("Clean shut down");