[gnome-initial-setup] Move page titles to the locale_changed handler



commit ca5845099f416e694e858a71c68b4b8396904d2f
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Wed Feb 13 17:01:11 2013 -0500

    Move page titles to the locale_changed handler

 gnome-initial-setup/gis-page.c                     |    2 ++
 .../pages/account/gis-account-page.c               |    9 +++++++--
 gnome-initial-setup/pages/eulas/gis-eula-page.c    |    8 +++++++-
 gnome-initial-setup/pages/goa/gis-goa-page.c       |    8 +++++++-
 .../pages/keyboard/gis-keyboard-page.c             |    8 +++++++-
 .../pages/language/gis-language-page.c             |    8 +++++++-
 .../pages/location/gis-location-page.c             |    8 +++++++-
 .../pages/network/gis-network-page.c               |    8 +++++++-
 .../pages/summary/gis-summary-page.c               |    8 +++++++-
 .../pages/welcome/gis-welcome-page.c               |    8 +++++++-
 10 files changed, 65 insertions(+), 10 deletions(-)
---
diff --git a/gnome-initial-setup/gis-page.c b/gnome-initial-setup/gis-page.c
index 05c6995..2fa5a39 100644
--- a/gnome-initial-setup/gis-page.c
+++ b/gnome-initial-setup/gis-page.c
@@ -159,6 +159,8 @@ gis_page_constructed (GObject *object)
 
   page->builder = klass->get_builder (page);
 
+  gis_page_locale_changed (page);
+
   G_OBJECT_CLASS (gis_page_parent_class)->constructed (object);
 }
 
diff --git a/gnome-initial-setup/pages/account/gis-account-page.c b/gnome-initial-setup/pages/account/gis-account-page.c
index b9df745..032c9a3 100644
--- a/gnome-initial-setup/pages/account/gis-account-page.c
+++ b/gnome-initial-setup/pages/account/gis-account-page.c
@@ -958,8 +958,6 @@ gis_account_page_constructed (GObject *object)
   priv->mode = NUM_MODES;
   set_mode (page, UM_LOCAL);
 
-  gis_page_set_title (GIS_PAGE (page), _("Login"));
-
   gtk_widget_show (GTK_WIDGET (page));
 }
 
@@ -984,12 +982,19 @@ gis_account_page_get_action_widget (GisPage *page)
 }
 
 static void
+gis_account_page_locale_changed (GisPage *page)
+{
+  gis_page_set_title (GIS_PAGE (page), _("Login"));
+}
+
+static void
 gis_account_page_class_init (GisAccountPageClass *klass)
 {
   GisPageClass *page_class = GIS_PAGE_CLASS (klass);
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
   page_class->page_id = PAGE_ID;
+  page_class->locale_changed = gis_account_page_locale_changed;
   page_class->get_action_widget = gis_account_page_get_action_widget;
   object_class->constructed = gis_account_page_constructed;
   object_class->dispose = gis_account_page_dispose;
diff --git a/gnome-initial-setup/pages/eulas/gis-eula-page.c b/gnome-initial-setup/pages/eulas/gis-eula-page.c
index 9f3b233..a54af0e 100644
--- a/gnome-initial-setup/pages/eulas/gis-eula-page.c
+++ b/gnome-initial-setup/pages/eulas/gis-eula-page.c
@@ -261,7 +261,6 @@ gis_eula_page_constructed (GObject *object)
                               page);
   }
 
-  gis_page_set_title (GIS_PAGE (page), _("License Agreements"));
   sync_page_complete (page);
 
   gtk_container_add (GTK_CONTAINER (page), WID ("eula-page"));
@@ -319,12 +318,19 @@ gis_eula_page_dispose (GObject *object)
 }
 
 static void
+gis_eula_page_locale_changed (GisPage *page)
+{
+  gis_page_set_title (GIS_PAGE (page), _("License Agreements"));
+}
+
+static void
 gis_eula_page_class_init (GisEulaPageClass *klass)
 {
   GisPageClass *page_class = GIS_PAGE_CLASS (klass);
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
   page_class->page_id = PAGE_ID;
+  page_class->locale_changed = gis_eula_page_locale_changed;
   object_class->get_property = gis_eula_page_get_property;
   object_class->set_property = gis_eula_page_set_property;
   object_class->constructed = gis_eula_page_constructed;
diff --git a/gnome-initial-setup/pages/goa/gis-goa-page.c b/gnome-initial-setup/pages/goa/gis-goa-page.c
index 9d5166f..37a543b 100644
--- a/gnome-initial-setup/pages/goa/gis-goa-page.c
+++ b/gnome-initial-setup/pages/goa/gis-goa-page.c
@@ -352,7 +352,6 @@ gis_goa_page_constructed (GObject *object)
   g_signal_connect (priv->goa_client, "account-removed",
                     G_CALLBACK (goa_account_removed), page);
 
-  gis_page_set_title (GIS_PAGE (page), _("Online Accounts"));
   gis_page_set_complete (GIS_PAGE (page), TRUE);
 
   gtk_widget_show (GTK_WIDGET (page));
@@ -370,12 +369,19 @@ gis_goa_page_dispose (GObject *object)
 }
 
 static void
+gis_goa_page_locale_changed (GisPage *page)
+{
+  gis_page_set_title (GIS_PAGE (page), _("Online Accounts"));
+}
+
+static void
 gis_goa_page_class_init (GisGoaPageClass *klass)
 {
   GisPageClass *page_class = GIS_PAGE_CLASS (klass);
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
   page_class->page_id = PAGE_ID;
+  page_class->locale_changed = gis_goa_page_locale_changed;
   object_class->constructed = gis_goa_page_constructed;
   object_class->dispose = gis_goa_page_dispose;
   
diff --git a/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c b/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c
index b54633f..bed6773 100644
--- a/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c
+++ b/gnome-initial-setup/pages/keyboard/gis-keyboard-page.c
@@ -51,19 +51,25 @@ gis_keyboard_page_constructed (GObject *object)
 
   gtk_container_add (GTK_CONTAINER (page), WID("keyboard-page"));
 
-  gis_page_set_title (GIS_PAGE (page), _("Keyboard Layout"));
   gis_page_set_complete (GIS_PAGE (page), TRUE);
 
   gtk_widget_show (GTK_WIDGET (page));
 }
 
 static void
+gis_keyboard_page_locale_changed (GisPage *page)
+{
+  gis_page_set_title (GIS_PAGE (page), _("Keyboard Layout"));
+}
+
+static void
 gis_keyboard_page_class_init (GisKeyboardPageClass * klass)
 {
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
   GisPageClass * page_class = GIS_PAGE_CLASS (klass);
 
   page_class->page_id = PAGE_ID;
+  page_class->locale_changed = gis_keyboard_page_locale_changed;
   object_class->constructed = gis_keyboard_page_constructed;
 }
 
diff --git a/gnome-initial-setup/pages/language/gis-language-page.c b/gnome-initial-setup/pages/language/gis-language-page.c
index 6ddc0ca..f387b21 100644
--- a/gnome-initial-setup/pages/language/gis-language-page.c
+++ b/gnome-initial-setup/pages/language/gis-language-page.c
@@ -405,18 +405,24 @@ gis_language_page_constructed (GObject *object)
   egg_list_box_refilter (EGG_LIST_BOX (priv->language_list));
 
   gis_page_set_complete (GIS_PAGE (page), TRUE);
-  gis_page_set_title (GIS_PAGE (page), _("Welcome"));
 
   gtk_widget_show (GTK_WIDGET (page));
 }
 
 static void
+gis_language_page_locale_changed (GisPage *page)
+{
+  gis_page_set_title (GIS_PAGE (page), _("Welcome"));
+}
+
+static void
 gis_language_page_class_init (GisLanguagePageClass *klass)
 {
   GisPageClass *page_class = GIS_PAGE_CLASS (klass);
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
   page_class->page_id = PAGE_ID;
+  page_class->locale_changed = gis_language_page_locale_changed;
   object_class->constructed = gis_language_page_constructed;
 
   g_type_class_add_private (object_class, sizeof(GisLanguagePagePrivate));
diff --git a/gnome-initial-setup/pages/location/gis-location-page.c b/gnome-initial-setup/pages/location/gis-location-page.c
index 2ba75c2..0d15128 100644
--- a/gnome-initial-setup/pages/location/gis-location-page.c
+++ b/gnome-initial-setup/pages/location/gis-location-page.c
@@ -335,7 +335,6 @@ gis_location_page_constructed (GObject *object)
   gtk_widget_hide (WID ("location-auto-button"));
 #endif
 
-  gis_page_set_title (GIS_PAGE (page), _("Location"));
   gis_page_set_complete (GIS_PAGE (page), TRUE);
 
   gtk_widget_show (GTK_WIDGET (page));
@@ -353,12 +352,19 @@ gis_location_page_dispose (GObject *object)
 }
 
 static void
+gis_location_page_locale_changed (GisPage *page)
+{
+  gis_page_set_title (GIS_PAGE (page), _("Location"));
+}
+
+static void
 gis_location_page_class_init (GisLocationPageClass *klass)
 {
   GisPageClass *page_class = GIS_PAGE_CLASS (klass);
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
   page_class->page_id = PAGE_ID;
+  page_class->locale_changed = gis_location_page_locale_changed;
   object_class->constructed = gis_location_page_constructed;
   object_class->dispose = gis_location_page_dispose;
   
diff --git a/gnome-initial-setup/pages/network/gis-network-page.c b/gnome-initial-setup/pages/network/gis-network-page.c
index ba3f446..cfbfe9a 100644
--- a/gnome-initial-setup/pages/network/gis-network-page.c
+++ b/gnome-initial-setup/pages/network/gis-network-page.c
@@ -636,7 +636,6 @@ gis_network_page_constructed (GObject *object)
 
   refresh_wireless_list (page);
 
-  gis_page_set_title (GIS_PAGE (page), _("Network"));
   gis_page_set_complete (GIS_PAGE (page), TRUE);
 
  out:
@@ -658,12 +657,19 @@ gis_network_page_dispose (GObject *object)
 }
 
 static void
+gis_network_page_locale_changed (GisPage *page)
+{
+  gis_page_set_title (GIS_PAGE (page), _("Network"));
+}
+
+static void
 gis_network_page_class_init (GisNetworkPageClass *klass)
 {
   GisPageClass *page_class = GIS_PAGE_CLASS (klass);
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
   page_class->page_id = PAGE_ID;
+  page_class->locale_changed = gis_network_page_locale_changed;
   object_class->constructed = gis_network_page_constructed;
   object_class->dispose = gis_network_page_dispose;
 
diff --git a/gnome-initial-setup/pages/summary/gis-summary-page.c b/gnome-initial-setup/pages/summary/gis-summary-page.c
index 18d2561..3ef3184 100644
--- a/gnome-initial-setup/pages/summary/gis-summary-page.c
+++ b/gnome-initial-setup/pages/summary/gis-summary-page.c
@@ -281,13 +281,18 @@ gis_summary_page_constructed (GObject *object)
 
   g_signal_connect (WID("summary-start-button"), "clicked", G_CALLBACK (done_cb), page);
 
-  gis_page_set_title (GIS_PAGE (page), _("Thank You"));
   gis_page_set_complete (GIS_PAGE (page), TRUE);
 
   gtk_widget_show (GTK_WIDGET (page));
 }
 
 static void
+gis_summary_page_locale_changed (GisPage *page)
+{
+  gis_page_set_title (GIS_PAGE (page), _("Thank You"));
+}
+
+static void
 gis_summary_page_class_init (GisSummaryPageClass *klass)
 {
   GisPageClass *page_class = GIS_PAGE_CLASS (klass);
@@ -295,6 +300,7 @@ gis_summary_page_class_init (GisSummaryPageClass *klass)
 
   page_class->page_id = PAGE_ID;
   page_class->get_builder = gis_summary_page_get_builder;
+  page_class->locale_changed = gis_summary_page_locale_changed;
   object_class->constructed = gis_summary_page_constructed;
 
   g_type_class_add_private (object_class, sizeof(GisSummaryPagePrivate));
diff --git a/gnome-initial-setup/pages/welcome/gis-welcome-page.c b/gnome-initial-setup/pages/welcome/gis-welcome-page.c
index 93353fa..336ac9c 100644
--- a/gnome-initial-setup/pages/welcome/gis-welcome-page.c
+++ b/gnome-initial-setup/pages/welcome/gis-welcome-page.c
@@ -44,7 +44,6 @@ gis_welcome_page_constructed (GObject *object)
 
   G_OBJECT_CLASS (gis_welcome_page_parent_class)->constructed (object);
 
-  gis_page_set_title (GIS_PAGE (page), _("Welcome"));
   gis_page_set_complete (GIS_PAGE (page), TRUE);
 
   gtk_container_add (GTK_CONTAINER (page), WID ("welcome-page"));
@@ -53,12 +52,19 @@ gis_welcome_page_constructed (GObject *object)
 }
 
 static void
+gis_welcome_page_locale_changed (GisPage *page)
+{
+  gis_page_set_title (GIS_PAGE (page), _("Welcome"));
+}
+
+static void
 gis_welcome_page_class_init (GisWelcomePageClass *klass)
 {
   GisPageClass *page_class = GIS_PAGE_CLASS (klass);
   GObjectClass *object_class = G_OBJECT_CLASS (klass);
 
   page_class->page_id = PAGE_ID;
+  page_class->locale_changed = gis_welcome_page_locale_changed;
   object_class->constructed = gis_welcome_page_constructed;
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]