[gnome-initial-setup] Hook the summary page up to the username
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup] Hook the summary page up to the username
- Date: Mon, 20 Aug 2012 07:34:40 +0000 (UTC)
commit 28e9ccc9f590ab3ae2128ed65ac201f33eb810d2
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Mon Aug 20 02:28:49 2012 -0400
Hook the summary page up to the username
Hopefully we should have a successful login now.
gnome-initial-setup/gnome-initial-setup.c | 22 ++++++++++++++++++++
gnome-initial-setup/gnome-initial-setup.h | 10 +++++++++
.../pages/account/gis-account-page.c | 2 +
.../pages/summary/gis-summary-page.c | 12 ++++++++--
4 files changed, 43 insertions(+), 3 deletions(-)
---
diff --git a/gnome-initial-setup/gnome-initial-setup.c b/gnome-initial-setup/gnome-initial-setup.c
index fb78a8f..cb8f226 100644
--- a/gnome-initial-setup/gnome-initial-setup.c
+++ b/gnome-initial-setup/gnome-initial-setup.c
@@ -37,6 +37,9 @@ struct _SetupData {
GisAssistant *assistant;
GSList *finals;
+
+ ActUser *user_account;
+ const gchar *user_password;
};
typedef struct _AsyncClosure AsyncClosure;
@@ -121,6 +124,25 @@ gis_get_assistant (SetupData *setup)
return setup->assistant;
}
+void
+gis_set_user_permissions (SetupData *setup,
+ ActUser *user,
+ const gchar *password)
+{
+ setup->user_account = user;
+ setup->user_password = password;
+}
+
+void
+gis_get_user_permissions (SetupData *setup,
+ ActUser **user,
+ const gchar **password)
+{
+ *user = setup->user_account;
+ *password = setup->user_password;
+}
+
+
static GType
get_assistant_type (void)
{
diff --git a/gnome-initial-setup/gnome-initial-setup.h b/gnome-initial-setup/gnome-initial-setup.h
index ba1e44a..e0c341e 100644
--- a/gnome-initial-setup/gnome-initial-setup.h
+++ b/gnome-initial-setup/gnome-initial-setup.h
@@ -8,6 +8,8 @@
#include "gis-assistant.h"
#include "gis-utils.h"
+#include <act/act-user-manager.h>
+
G_BEGIN_DECLS
typedef struct _SetupData SetupData;
@@ -16,6 +18,14 @@ GtkWindow *gis_get_main_window (SetupData *setup);
GKeyFile *gis_get_overrides (SetupData *setup);
GisAssistant * gis_get_assistant (SetupData *setup);
+void gis_set_user_permissions (SetupData *setup,
+ ActUser *user,
+ const gchar *password);
+
+void gis_get_user_permissions (SetupData *setup,
+ ActUser **user,
+ const gchar **password);
+
G_END_DECLS
#endif /* __GNOME_INITIAL_SETUP_H__ */
diff --git a/gnome-initial-setup/pages/account/gis-account-page.c b/gnome-initial-setup/pages/account/gis-account-page.c
index bf9ea53..6d8fe6a 100644
--- a/gnome-initial-setup/pages/account/gis-account-page.c
+++ b/gnome-initial-setup/pages/account/gis-account-page.c
@@ -402,6 +402,8 @@ save_account_data (AccountData *data)
act_user_set_password_mode (data->act_user, data->password_mode);
}
+ gis_set_user_permissions (data->setup, data->act_user, password);
+
gnome_keyring_create_sync ("Default", password ? password : "");
gnome_keyring_set_default_keyring_sync ("Default");
diff --git a/gnome-initial-setup/pages/summary/gis-summary-page.c b/gnome-initial-setup/pages/summary/gis-summary-page.c
index c43330b..0adaa4e 100644
--- a/gnome-initial-setup/pages/summary/gis-summary-page.c
+++ b/gnome-initial-setup/pages/summary/gis-summary-page.c
@@ -6,6 +6,8 @@
#include <glib/gi18n.h>
#include <gio/gio.h>
+#include <act/act-user-manager.h>
+
#include <gdm/gdm-client.h>
#define OBJ(type,name) ((type)gtk_builder_get_object(builder,(name)))
@@ -18,8 +20,8 @@
typedef struct _SummaryData SummaryData;
struct _SummaryData {
- gchar *user_username;
- gchar *user_password;
+ ActUser *user_account;
+ const gchar *user_password;
};
static gboolean
@@ -237,7 +239,7 @@ log_user_in (SummaryData *data)
}
gdm_user_verifier_call_begin_verification_for_user_sync (user_verifier,
- data->user_username,
+ act_user_get_user_name (data->user_account),
SERVICE_NAME,
NULL, &error);
@@ -340,6 +342,10 @@ gis_prepare_summary_page (SetupData *setup)
data = g_slice_new0 (SummaryData);
+ gis_get_user_permissions (setup,
+ &data->user_account,
+ &data->user_password);
+
install_overrides (setup, builder);
g_signal_connect (WID("summary-start-button"), "clicked", G_CALLBACK (byebye_cb), data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]