[gnome-initial-setup] Fix page titles
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup] Fix page titles
- Date: Fri, 22 Jun 2012 21:15:32 +0000 (UTC)
commit 04d793905506855531116c005a497934cd5c77d5
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Jun 22 17:03:57 2012 -0400
Fix page titles
gnome-initial-setup/gis-account-page.c | 1 +
gnome-initial-setup/gis-eula-pages.c | 1 +
gnome-initial-setup/gis-goa-page.c | 1 +
gnome-initial-setup/gis-location-page.c | 1 +
gnome-initial-setup/gis-network-page.c | 1 +
gnome-initial-setup/gis-summary-page.c | 2 ++
gnome-initial-setup/gis-welcome-page.c | 1 +
gnome-initial-setup/gnome-initial-setup.c | 24 ++++++------------------
8 files changed, 14 insertions(+), 18 deletions(-)
---
diff --git a/gnome-initial-setup/gis-account-page.c b/gnome-initial-setup/gis-account-page.c
index 1505443..cd8c62e 100644
--- a/gnome-initial-setup/gis-account-page.c
+++ b/gnome-initial-setup/gis-account-page.c
@@ -518,6 +518,7 @@ prepare_account_page (SetupData *setup)
clear_account_page (data);
update_account_page_status (data);
+ g_object_set_data (OBJ (GObject *, "account-page"), "gis-page-title", _("Login"));
gis_assistant_add_page (assistant, WID ("account-page"));
gis_assistant_set_page_complete (assistant, WID ("account-page"), TRUE);
}
diff --git a/gnome-initial-setup/gis-eula-pages.c b/gnome-initial-setup/gis-eula-pages.c
index 89eb484..6fd5f31 100644
--- a/gnome-initial-setup/gis-eula-pages.c
+++ b/gnome-initial-setup/gis-eula-pages.c
@@ -107,6 +107,7 @@ build_eula_page (SetupData *setup,
gtk_container_add (GTK_CONTAINER (vbox), scrolled_window);
gtk_container_add (GTK_CONTAINER (vbox), checkbox);
+ g_object_set_data (G_OBJECT (vbox), "gis-page-title", _("License Agreements"));
gis_assistant_add_page (gis_get_assistant (setup), vbox);
gtk_widget_show_all (GTK_WIDGET (vbox));
diff --git a/gnome-initial-setup/gis-goa-page.c b/gnome-initial-setup/gis-goa-page.c
index fd8ed54..1ab34fe 100644
--- a/gnome-initial-setup/gis-goa-page.c
+++ b/gnome-initial-setup/gis-goa-page.c
@@ -298,6 +298,7 @@ gis_prepare_online_page (SetupData *setup)
g_signal_connect (data->goa_client, "account-removed",
G_CALLBACK (goa_account_removed), data);
+ g_object_set_data (OBJ (GObject *, "goa-page"), "gis-page-title", _("Online Accounts"));
gis_assistant_add_page (assistant, WID ("goa-page"));
gis_assistant_set_page_complete (assistant, WID ("goa-page"), TRUE);
}
diff --git a/gnome-initial-setup/gis-location-page.c b/gnome-initial-setup/gis-location-page.c
index cdb614d..c9bbef7 100644
--- a/gnome-initial-setup/gis-location-page.c
+++ b/gnome-initial-setup/gis-location-page.c
@@ -304,6 +304,7 @@ gis_prepare_location_page (SetupData *setup)
gtk_widget_hide (WID ("location-auto-button"));
#endif
+ g_object_set_data (OBJ (GObject *, "location-page"), "gis-page-title", _("Location"));
gis_assistant_add_page (assistant, WID ("location-page"));
gis_assistant_set_page_complete (assistant, WID ("location-page"), TRUE);
}
diff --git a/gnome-initial-setup/gis-network-page.c b/gnome-initial-setup/gis-network-page.c
index abdac82..dcde868 100644
--- a/gnome-initial-setup/gis-network-page.c
+++ b/gnome-initial-setup/gis-network-page.c
@@ -736,6 +736,7 @@ gis_prepare_network_page (SetupData *setup)
refresh_wireless_list (data);
+ g_object_set_data (OBJ (GObject *, "network-page"), "gis-page-title", _("Network"));
gis_assistant_add_page (assistant, WID ("network-page"));
gis_assistant_set_page_complete (assistant, WID ("network-page"), TRUE);
diff --git a/gnome-initial-setup/gis-summary-page.c b/gnome-initial-setup/gis-summary-page.c
index 38870bf..08b94b6 100644
--- a/gnome-initial-setup/gis-summary-page.c
+++ b/gnome-initial-setup/gis-summary-page.c
@@ -152,6 +152,8 @@ gis_prepare_summary_page (SetupData *setup)
g_signal_connect (button, "clicked",
G_CALLBACK (tour_cb), setup);
+ g_object_set_data (OBJ (GObject *, "summary-page"), "gis-page-title", _("Thank You"));
+ g_object_set_data (OBJ (GObject *, "summary-page"), "gis-summary", GUINT_TO_POINTER (TRUE));
gis_assistant_add_page (assistant, WID ("summary-page"));
gis_assistant_set_page_complete (assistant, WID ("summary-page"), TRUE);
}
diff --git a/gnome-initial-setup/gis-welcome-page.c b/gnome-initial-setup/gis-welcome-page.c
index 96a7737..66b3524 100644
--- a/gnome-initial-setup/gis-welcome-page.c
+++ b/gnome-initial-setup/gis-welcome-page.c
@@ -46,6 +46,7 @@ gis_prepare_welcome_page (SetupData *setup)
g_key_file_unref (overrides);
+ g_object_set_data (OBJ (GObject *, "welcome-page"), "gis-page-title", _("Welcome"));
gis_assistant_add_page (assistant, WID ("welcome-page"));
gis_assistant_set_page_complete (assistant, WID ("welcome-page"), TRUE);
diff --git a/gnome-initial-setup/gnome-initial-setup.c b/gnome-initial-setup/gnome-initial-setup.c
index dd9fe89..f0ec8bf 100644
--- a/gnome-initial-setup/gnome-initial-setup.c
+++ b/gnome-initial-setup/gnome-initial-setup.c
@@ -67,27 +67,15 @@ copy_account_data (SetupData *setup)
static void
prepare_cb (GisAssistant *assi, GtkWidget *page, SetupData *setup)
{
+ gchar *page_title;
+
g_debug ("Preparing page %s", gtk_widget_get_name (page));
- if (page == WID("welcome-page")) {
- gtk_window_set_title (setup->main_window, _("Welcome"));
- }
- else if (page == WID("network-page")) {
- gtk_window_set_title (setup->main_window, _("Network"));
- }
- else if (page == WID("account-page")) {
- gtk_window_set_title (setup->main_window, _("Login"));
- }
- else if (page == WID("location-page")) {
- gtk_window_set_title (setup->main_window, _("Location"));
- }
- else if (page == WID("online-page")) {
- gtk_window_set_title (setup->main_window, _("Online Accounts"));
- }
- else if (page == WID("summary-page")) {
+ page_title = g_object_get_data (G_OBJECT (page), "gis-page-title");
+ gtk_window_set_title (setup->main_window, page_title);
+
+ if (g_object_get_data (G_OBJECT (page), "gis-summary"))
copy_account_data (setup);
- gtk_window_set_title (setup->main_window, _("Thank You"));
- }
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]