[gnome-initial-setup/shell/4765: 154/362] display: change the wording on the overscan page
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup/shell/4765: 154/362] display: change the wording on the overscan page
- Date: Thu, 19 Mar 2015 01:34:00 +0000 (UTC)
commit 58d2ccb9393966f1a138647adb738fb9bbf60602
Author: Cosimo Cecchi <cosimo endlessm com>
Date: Tue Aug 12 11:40:11 2014 -0700
display: change the wording on the overscan page
Include a picture to explain the option instead of text.
[endlessm/eos-shell#3371]
.../pages/display/display-overscan.png | Bin 0 -> 26233 bytes
.../pages/display/display.gresource.xml | 1 +
.../pages/display/gis-display-page.c | 64 +++++++++++---
.../pages/display/gis-display-page.ui | 90 ++++++++++++++++----
4 files changed, 123 insertions(+), 32 deletions(-)
---
diff --git a/gnome-initial-setup/pages/display/display-overscan.png
b/gnome-initial-setup/pages/display/display-overscan.png
new file mode 100644
index 0000000..65480ae
Binary files /dev/null and b/gnome-initial-setup/pages/display/display-overscan.png differ
diff --git a/gnome-initial-setup/pages/display/display.gresource.xml
b/gnome-initial-setup/pages/display/display.gresource.xml
index c502aef..e8e46b5 100644
--- a/gnome-initial-setup/pages/display/display.gresource.xml
+++ b/gnome-initial-setup/pages/display/display.gresource.xml
@@ -2,6 +2,7 @@
<gresources>
<gresource prefix="/org/gnome/initial-setup">
<file preprocess="xml-stripblanks" alias="gis-display-page.ui">gis-display-page.ui</file>
+ <file>display-overscan.png</file>
</gresource>
</gresources>
diff --git a/gnome-initial-setup/pages/display/gis-display-page.c
b/gnome-initial-setup/pages/display/gis-display-page.c
index 41b84b2..ddd019b 100644
--- a/gnome-initial-setup/pages/display/gis-display-page.c
+++ b/gnome-initial-setup/pages/display/gis-display-page.c
@@ -55,7 +55,6 @@ read_screen_config (GisDisplayPage *page)
GnomeRRConfig *current;
GnomeRROutputInfo **outputs;
GnomeRROutputInfo *output;
- GtkWidget *check_button;
int i;
gnome_rr_screen_refresh (priv->screen, NULL);
@@ -84,18 +83,14 @@ read_screen_config (GisDisplayPage *page)
if (priv->current_output == NULL)
return FALSE;
- check_button = WID ("overscan_checkbutton");
- gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check_button),
- gnome_rr_output_info_get_underscanning (output));
return TRUE;
}
static void
-toggle_overscan (GisDisplayPage *page)
+toggle_overscan (GisDisplayPage *page,
+ gboolean value)
{
GisDisplayPagePrivate *priv = gis_display_page_get_instance_private (page);
- GtkWidget *check = WID ("overscan_checkbutton");
- gboolean value = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (check));
GError *error;
if (value == gnome_rr_output_info_get_underscanning (priv->current_output))
@@ -136,6 +131,43 @@ should_display_overscan (GisDisplayPage *page)
}
static void
+update_overscan (GisDisplayPage *page)
+{
+ GtkWidget *widget;
+ gboolean value;
+
+ widget = WID ("overscan_on");
+ value = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget));
+ toggle_overscan (page, value);
+}
+
+static void
+next_page_cb (GisAssistant *assistant,
+ GisPage *which_page,
+ GisPage *this_page)
+{
+ if (which_page == this_page)
+ update_overscan (GIS_DISPLAY_PAGE (this_page));
+}
+
+static void
+overscan_radio_toggled (GtkWidget *radio,
+ GisDisplayPage *page)
+{
+ GtkWidget *widget;
+
+ widget = WID ("overscan_default_selection");
+ if (gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)))
+ {
+ gis_page_set_complete (GIS_PAGE (page), FALSE);
+ return;
+ }
+
+ /* user has made a choice, page is complete */
+ gis_page_set_complete (GIS_PAGE (page), TRUE);
+}
+
+static void
gis_display_page_dispose (GObject *gobject)
{
GisDisplayPage *page = GIS_DISPLAY_PAGE (gobject);
@@ -158,6 +190,7 @@ gis_display_page_constructed (GObject *object)
{
GisDisplayPage *page = GIS_DISPLAY_PAGE (object);
GisDisplayPagePrivate *priv = gis_display_page_get_instance_private (page);
+ GisAssistant *assistant;
GtkWidget *widget;
GError *error = NULL;
gboolean visible = FALSE;
@@ -167,9 +200,6 @@ gis_display_page_constructed (GObject *object)
gtk_container_add (GTK_CONTAINER (page), WID ("display-page"));
gtk_widget_show (GTK_WIDGET (page));
- /* the page is always complete */
- gis_page_set_complete (GIS_PAGE (page), TRUE);
-
priv->screen = gnome_rr_screen_new (gdk_screen_get_default (), &error);
if (priv->screen == NULL)
{
@@ -197,10 +227,16 @@ gis_display_page_constructed (GObject *object)
G_CALLBACK (read_screen_config),
page);
- widget = WID ("overscan_checkbutton");
- g_signal_connect_swapped (widget, "toggled",
- G_CALLBACK (toggle_overscan),
- page);
+ assistant = gis_driver_get_assistant (GIS_PAGE (page)->driver);
+ g_signal_connect (assistant, "next-page", G_CALLBACK (next_page_cb), page);
+
+ widget = WID ("overscan_on");
+ g_signal_connect (widget, "toggled",
+ G_CALLBACK (overscan_radio_toggled), page);
+
+ widget = WID ("overscan_off");
+ g_signal_connect (widget, "toggled",
+ G_CALLBACK (overscan_radio_toggled), page);
out:
gtk_widget_set_visible (GTK_WIDGET (page), visible);
diff --git a/gnome-initial-setup/pages/display/gis-display-page.ui
b/gnome-initial-setup/pages/display/gis-display-page.ui
index ca842d6..54ca9bf 100644
--- a/gnome-initial-setup/pages/display/gis-display-page.ui
+++ b/gnome-initial-setup/pages/display/gis-display-page.ui
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
<interface>
- <requires lib="gtk+" version="3.0"/>
+ <!-- interface-requires gtk+ 3.0 -->
<object class="GtkGrid" id="display-page">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -24,7 +23,7 @@
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="valign">start</property>
- <property name="label" translatable="yes">Display</property>
+ <property name="label" translatable="yes">Adjust for TV screen</property>
<attributes>
<attribute name="weight" value="bold"/>
<attribute name="scale" value="1.2"/>
@@ -41,14 +40,10 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
- <property name="label" translatable="yes">Endless can be used with computer monitors or
television sets. If you have a television set you may need to adjust it to see the full contents of the
screen.</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">Do you see this at the bottom right corner of your
screen?</property>
<property name="wrap">True</property>
- <property name="width_chars">50</property>
<property name="max_width_chars">50</property>
- <property name="xalign">0</property>
- <attributes>
- <attribute name="scale" value="0.82999999999999996"/>
- </attributes>
</object>
<packing>
<property name="expand">False</property>
@@ -57,13 +52,13 @@
</packing>
</child>
<child>
- <object class="GtkCheckButton" id="overscan_checkbutton">
- <property name="label" translatable="yes">Are you using Endless with a television set?</property>
+ <object class="GtkImage" id="image1">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">False</property>
- <property name="xalign">0</property>
- <property name="draw_indicator">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_top">16</property>
+ <property name="margin_bottom">16</property>
+ <property name="stock">gtk-missing-image</property>
+ <property name="resource">/org/gnome/initial-setup/display-overscan.png</property>
</object>
<packing>
<property name="expand">False</property>
@@ -71,14 +66,73 @@
<property name="position">2</property>
</packing>
</child>
+ <child>
+ <object class="GtkBox" id="box1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">vertical</property>
+ <property name="spacing">3</property>
+ <child>
+ <object class="GtkRadioButton" id="overscan_default_selection">
+ <property name="label" translatable="yes">radiobutton</property>
+ <property name="can_focus">False</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="overscan_off">
+ <property name="label" translatable="yes">I see it</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">overscan_default_selection</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkRadioButton" id="overscan_on">
+ <property name="label" translatable="yes">I do not see it. Shrink screen to fit
TV.</property>
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="receives_default">False</property>
+ <property name="xalign">0</property>
+ <property name="active">True</property>
+ <property name="draw_indicator">True</property>
+ <property name="group">overscan_default_selection</property>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">True</property>
+ <property name="position">3</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
+ <property name="width">1</property>
+ <property name="height">1</property>
</packing>
</child>
- <child>
- <placeholder/>
- </child>
</object>
</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]