[gnome-initial-setup] Prepare the summary page when the data is available
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup] Prepare the summary page when the data is available
- Date: Tue, 2 Oct 2012 14:08:42 +0000 (UTC)
commit 842652d18b27489ea474eadcc1ee1f4441527742
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Oct 1 20:40:09 2012 -0400
Prepare the summary page when the data is available
The code got moved around, and the prepare function ended up
getting called before any page has been shown. At that time,
the user object is not available yet, so trying to copy it
is not working. Instead, connect to ::prepare for the summary
page separately, and copy the user just in time.
.../pages/summary/gis-summary-page.c | 17 ++++++++++++++---
1 files changed, 14 insertions(+), 3 deletions(-)
---
diff --git a/gnome-initial-setup/pages/summary/gis-summary-page.c b/gnome-initial-setup/pages/summary/gis-summary-page.c
index 821bde0..99a582d 100644
--- a/gnome-initial-setup/pages/summary/gis-summary-page.c
+++ b/gnome-initial-setup/pages/summary/gis-summary-page.c
@@ -22,6 +22,7 @@ typedef struct _SummaryData SummaryData;
struct _SummaryData {
ActUser *user_account;
const gchar *user_password;
+ SetupData *setup;
};
static gboolean
@@ -339,6 +340,17 @@ install_overrides (SetupData *setup,
g_free (s);
}
+static void
+prepare_cb (GisAssistant *assistant, GtkWidget *page, SummaryData *data)
+{
+ if (g_strcmp0 (gtk_widget_get_name (page), "summary-page") == 0)
+ {
+ gis_get_user_permissions (data->setup,
+ &data->user_account,
+ &data->user_password);
+ }
+}
+
void
gis_prepare_summary_page (SetupData *setup)
{
@@ -347,10 +359,9 @@ gis_prepare_summary_page (SetupData *setup)
SummaryData *data;
data = g_slice_new0 (SummaryData);
+ data->setup = setup;
- gis_get_user_permissions (setup,
- &data->user_account,
- &data->user_password);
+ g_signal_connect (assistant, "prepare", G_CALLBACK (prepare_cb), data);
install_overrides (setup, builder);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]