[gnome-initial-setup] account: set act_user object on driver
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup] account: set act_user object on driver
- Date: Fri, 31 Jul 2015 19:31:57 +0000 (UTC)
commit 857e22c5c99c0a5f656272838b89feb60e66e0c3
Author: Ray Strode <rstrode redhat com>
Date: Mon Jul 27 14:47:15 2015 -0400
account: set act_user object on driver
The summary page expects the act-user object to be set in
the driver. That only happens at the moment for local
users, not enterprise login users.
This commit fixes things, so it happens for enterprise login
users as well.
https://bugzilla.gnome.org/show_bug.cgi?id=752980
.../pages/account/gis-account-page-enterprise.c | 5 +++++
.../pages/account/gis-account-page.c | 17 +++++++++++++++++
2 files changed, 22 insertions(+), 0 deletions(-)
---
diff --git a/gnome-initial-setup/pages/account/gis-account-page-enterprise.c
b/gnome-initial-setup/pages/account/gis-account-page-enterprise.c
index f33688c..4c9feb3 100644
--- a/gnome-initial-setup/pages/account/gis-account-page-enterprise.c
+++ b/gnome-initial-setup/pages/account/gis-account-page-enterprise.c
@@ -79,6 +79,7 @@ G_DEFINE_TYPE_WITH_PRIVATE (GisAccountPageEnterprise, gis_account_page_enterpris
enum {
VALIDATION_CHANGED,
+ USER_CACHED,
LAST_SIGNAL,
};
@@ -173,6 +174,7 @@ on_permit_user_login (GObject *source,
g_debug ("Caching remote user: %s", login);
priv->act_user = act_user_manager_cache_user (priv->act_client, login, NULL);
+ g_signal_emit (page, signals[USER_CACHED], 0, priv->act_user, gtk_entry_get_text (GTK_ENTRY
(priv->password)));
apply_complete (page, TRUE);
g_free (login);
@@ -821,6 +823,9 @@ gis_account_page_enterprise_class_init (GisAccountPageEnterpriseClass *klass)
signals[VALIDATION_CHANGED] = g_signal_new ("validation-changed", GIS_TYPE_ACCOUNT_PAGE_ENTERPRISE,
G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL,
G_TYPE_NONE, 0);
+ signals[USER_CACHED] = g_signal_new ("user-cached", GIS_TYPE_ACCOUNT_PAGE_ENTERPRISE,
+ G_SIGNAL_RUN_LAST, 0, NULL, NULL, NULL,
+ G_TYPE_NONE, 2, ACT_TYPE_USER, G_TYPE_STRING);
}
static void
diff --git a/gnome-initial-setup/pages/account/gis-account-page.c
b/gnome-initial-setup/pages/account/gis-account-page.c
index 8f5dcc4..f59428f 100644
--- a/gnome-initial-setup/pages/account/gis-account-page.c
+++ b/gnome-initial-setup/pages/account/gis-account-page.c
@@ -190,6 +190,21 @@ on_local_page_confirmed (GisAccountPageLocal *local,
}
static void
+on_local_user_cached (GtkWidget *page_local,
+ ActUser *user,
+ char *password,
+ GisAccountPage *page)
+{
+ const gchar *language;
+
+ language = gis_driver_get_user_language (GIS_PAGE (page)->driver);
+ if (language)
+ act_user_set_language (user, language);
+
+ gis_driver_set_user_permissions (GIS_PAGE (page)->driver, user, password);
+}
+
+static void
gis_account_page_constructed (GObject *object)
{
GisAccountPage *page = GIS_ACCOUNT_PAGE (object);
@@ -206,6 +221,8 @@ gis_account_page_constructed (GObject *object)
g_signal_connect (priv->page_enterprise, "validation-changed",
G_CALLBACK (on_validation_changed), page);
+ g_signal_connect (priv->page_enterprise, "user-cached",
+ G_CALLBACK (on_local_user_cached), page);
update_page_validation (page);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]