[gnome-initial-setup/wip/pwithnall/misc-fixes: 26/70] summary: show a different message on live sessions
- From: Philip Withnall <pwithnall src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup/wip/pwithnall/misc-fixes: 26/70] summary: show a different message on live sessions
- Date: Fri, 11 Sep 2020 13:29:12 +0000 (UTC)
commit 0382a72ce3606c87f68998ccc6858658072b32bd
Author: Alessandro Puccetti <alessandro kinvolk io>
Date: Fri May 12 11:23:22 2017 +0200
summary: show a different message on live sessions
When running on live sessions, we have to make sure the user is
well aware of the fact that anything he or she does with the system
is transient and all the files and settings will be lost after
the reboot.
The current summary page, however, doesn't handle that case.
Fix that by showing a boldened warning message, and rewording the
other labels to clearly state the transient-ness of the live usb
session. Unscientific straw polls of the London team concluded that
this is about the right point to wrap the text, and that a little extra
margin below makes the elements look more balanced.
https://phabricator.endlessm.com/T12547
https://phabricator.endlessm.com/T17622
.../pages/summary/gis-summary-page.c | 16 ++++++++++++
.../pages/summary/gis-summary-page.ui | 30 +++++++++++++++++++---
2 files changed, 42 insertions(+), 4 deletions(-)
---
diff --git a/gnome-initial-setup/pages/summary/gis-summary-page.c
b/gnome-initial-setup/pages/summary/gis-summary-page.c
index 106cf48e..c525c4d2 100644
--- a/gnome-initial-setup/pages/summary/gis-summary-page.c
+++ b/gnome-initial-setup/pages/summary/gis-summary-page.c
@@ -41,6 +41,8 @@ struct _GisSummaryPagePrivate {
GtkWidget *start_button;
GtkWidget *start_button_label;
GtkWidget *tagline;
+ GtkWidget *title;
+ GtkWidget *warning_box;
ActUser *user_account;
const gchar *user_password;
@@ -255,6 +257,18 @@ gis_summary_page_constructed (GObject *object)
gis_page_set_complete (GIS_PAGE (page), TRUE);
+ gtk_widget_set_visible (priv->warning_box,
+ gis_driver_is_live_session (GIS_PAGE (object)->driver));
+
+ if (gis_driver_is_live_session (GIS_PAGE (object)->driver))
+ {
+ gtk_label_set_label (GTK_LABEL (priv->title),
+ _("You're ready to try Endless OS"));
+ gtk_label_set_markup (GTK_LABEL (priv->tagline),
+ _("<b>Any files you download or documents you create will be "
+ "lost forever when you restart or shutdown the computer.</b>"));
+ }
+
gtk_widget_show (GTK_WIDGET (page));
}
@@ -276,6 +290,8 @@ gis_summary_page_class_init (GisSummaryPageClass *klass)
gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), GisSummaryPage, start_button);
gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), GisSummaryPage,
start_button_label);
gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), GisSummaryPage, tagline);
+ gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), GisSummaryPage, title);
+ gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), GisSummaryPage, warning_box);
page_class->page_id = PAGE_ID;
page_class->locale_changed = gis_summary_page_locale_changed;
diff --git a/gnome-initial-setup/pages/summary/gis-summary-page.ui
b/gnome-initial-setup/pages/summary/gis-summary-page.ui
index 9f9c5eb2..dd760503 100644
--- a/gnome-initial-setup/pages/summary/gis-summary-page.ui
+++ b/gnome-initial-setup/pages/summary/gis-summary-page.ui
@@ -53,11 +53,33 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="tagline">
+ <object class="GtkBox" id="warning_box">
<property name="visible">True</property>
- <property name="justify">center</property>
- <property name="wrap">True</property>
- <property name="max-width-chars">60</property>
+ <property name="halign">center</property>
+ <property name="valign">center</property>
+ <property name="orientation">horizontal</property>
+ <property name="margin_start">24</property>
+ <property name="margin_end">24</property>
+ <property name="margin_bottom">6</property>
+ <property name="spacing">6</property>
+ <child>
+ <object class="GtkImage" id="warning_icon">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="icon-name">dialog-warning-symbolic</property>
+ <property name="pixel_size">24</property>
+ <property name="valign">center</property>
+ <property name="hexpand">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkLabel" id="tagline">
+ <property name="visible">True</property>
+ <property name="justify">left</property>
+ <property name="wrap">True</property>
+ <property name="max-width-chars">60</property>
+ </object>
+ </child>
</object>
<packing>
<property name="pack_type">end</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]