Perform basic authentication with the server upon start
[milk] / src / milk-main-window.c
index 70d53a5..d72b983 100644 (file)
@@ -25,6 +25,7 @@
 #include <hildon/hildon.h>
 
 #include "milk-main-window.h"
+#include "milk-auth.h"
 #include "milk-task.h"
 #include "milk-task-model.h"
 
@@ -35,6 +36,8 @@ G_DEFINE_TYPE (MilkMainWindow, milk_main_window, HILDON_TYPE_WINDOW)
 
 struct _MilkMainWindowPrivate
 {
+        MilkAuth *auth;
+
         GtkWidget *app_menu;
 
         GtkWidget *main_vbox;
@@ -278,8 +281,8 @@ milk_main_window_constructed (GObject* object)
         gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (col), renderer, TRUE);
         gtk_cell_layout_set_cell_data_func (
                         GTK_CELL_LAYOUT (col), renderer,
-                        (GtkTreeCellDataFunc) contact_column_render_func, self,
-                        NULL);
+                        (GtkCellLayoutDataFunc) contact_column_render_func,
+                        self, NULL);
         g_object_unref (model);
 
         hildon_touch_selector_set_column_selection_mode (
@@ -302,6 +305,15 @@ milk_main_window_constructed (GObject* object)
         priv->app_menu = create_menu (self);
         hildon_window_set_app_menu (
                         HILDON_WINDOW (self), HILDON_APP_MENU (priv->app_menu));
+
+        /* FIXME: is there a better place for this? */
+        priv->auth = milk_auth_get_default ();
+        /* FIXME: plug this into the task model */
+
+        /* FIXME: cut this */
+        g_debug ("trying to run the milk auth demo");
+        /* FIXME: cut this */
+        milk_auth_run_demo (priv->auth);
 }
 
 static void