[gnome-initial-setup/youre-welcome: 2/5] Add a welcome page




commit d9a3a6822569b76571db9c191fe9c8156a63a3b9
Author: Matthias Clasen <mclasen redhat com>
Date:   Wed Aug 5 18:32:42 2020 -0400

    Add a welcome page
    
    This is a new starting page for getting in the mood.
    
    Fixes: #7

 gnome-initial-setup/gis-page.c                     |   8 +-
 gnome-initial-setup/gnome-initial-setup.c          |   2 +
 gnome-initial-setup/pages/meson.build              |   1 +
 .../pages/welcome/gis-welcome-page.c               | 266 +++++++++++++++++++++
 .../pages/welcome/gis-welcome-page.h               |  37 +++
 .../pages/welcome/gis-welcome-page.ui              |  67 ++++++
 .../pages/welcome/initial-setup-welcome.svg        |   1 +
 gnome-initial-setup/pages/welcome/meson.build      |  10 +
 .../pages/welcome/welcome.gresource.xml            |   7 +
 meson.build                                        |   1 +
 po/POTFILES.in                                     |   2 +
 11 files changed, 399 insertions(+), 3 deletions(-)
---
diff --git a/gnome-initial-setup/gis-page.c b/gnome-initial-setup/gis-page.c
index 7aa12c2f..7c6e867a 100644
--- a/gnome-initial-setup/gis-page.c
+++ b/gnome-initial-setup/gis-page.c
@@ -37,7 +37,7 @@ struct _GisPagePrivate
   guint complete : 1;
   guint skippable : 1;
   guint needs_accept : 1;
-  guint has_forward: 1;
+  guint has_forward : 1;
   guint padding : 5;
 };
 typedef struct _GisPagePrivate GisPagePrivate;
@@ -319,8 +319,10 @@ void
 gis_page_set_has_forward (GisPage *page, gboolean has_forward)
 {
   GisPagePrivate *priv = gis_page_get_instance_private (page);
-  priv->has_forward = has_forward;
-  g_object_notify_by_pspec (G_OBJECT (page), obj_props[PROP_HAS_FORWARD]);
+  if (priv->has_forward != has_forward) {
+    priv->has_forward = has_forward;
+    g_object_notify_by_pspec (G_OBJECT (page), obj_props[PROP_HAS_FORWARD]);
+  }
 }
 
 void
diff --git a/gnome-initial-setup/gnome-initial-setup.c b/gnome-initial-setup/gnome-initial-setup.c
index 12625b87..7e2a5dc3 100644
--- a/gnome-initial-setup/gnome-initial-setup.c
+++ b/gnome-initial-setup/gnome-initial-setup.c
@@ -32,6 +32,7 @@
 #include <cheese-gtk.h>
 #endif
 
+#include "pages/welcome/gis-welcome-page.h"
 #include "pages/language/gis-language-page.h"
 #include "pages/keyboard/gis-keyboard-page.h"
 #include "pages/network/gis-network-page.h"
@@ -63,6 +64,7 @@ typedef struct {
 #define PAGE(name, new_user_only) { #name, gis_prepare_ ## name ## _page, new_user_only }
 
 static PageData page_table[] = {
+  PAGE (welcome, FALSE),
   PAGE (language, FALSE),
   PAGE (keyboard, FALSE),
   PAGE (network,  FALSE),
diff --git a/gnome-initial-setup/pages/meson.build b/gnome-initial-setup/pages/meson.build
index 72383833..45f77d72 100644
--- a/gnome-initial-setup/pages/meson.build
+++ b/gnome-initial-setup/pages/meson.build
@@ -8,6 +8,7 @@ pages = [
    'goa',
    'password',
    'summary',
+   'welcome',
 ]
 
 if libmalcontent_dep.found() and libmalcontent_ui_dep.found()
diff --git a/gnome-initial-setup/pages/welcome/gis-welcome-page.c 
b/gnome-initial-setup/pages/welcome/gis-welcome-page.c
new file mode 100644
index 00000000..a43d3938
--- /dev/null
+++ b/gnome-initial-setup/pages/welcome/gis-welcome-page.c
@@ -0,0 +1,266 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * Copyright (C) 2020 Red Hat
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
+ *
+ * Written by:
+ *     Matthias Clasen <mclasen redhat com>
+ */
+
+/* Welcome page {{{1 */
+
+#define PAGE_ID "welcome"
+
+#include "config.h"
+#include "welcome-resources.h"
+#include "gis-welcome-page.h"
+#include "gis-assistant.h"
+
+
+struct _GisWelcomePage
+{
+  GisPage parent;
+};
+
+typedef struct
+{
+  GtkWidget *header;
+  GtkWidget *title;
+} GisWelcomePagePrivate;
+
+G_DEFINE_TYPE_WITH_PRIVATE (GisWelcomePage, gis_welcome_page, GIS_TYPE_PAGE)
+
+static void
+update_welcome_header (GisWelcomePage *page)
+{
+  GisWelcomePagePrivate *priv = gis_welcome_page_get_instance_private (page);
+  const char *path = "/org/gnome/initial-setup/initial-setup-welcome.svg";
+  g_autoptr(GdkPixbuf) pixbuf = NULL;
+
+  pixbuf = gdk_pixbuf_new_from_resource_at_scale (path, 1000, -1, TRUE, NULL);
+  gtk_image_set_from_pixbuf (GTK_IMAGE (priv->header), pixbuf);
+}
+
+typedef struct
+{
+  char *major;
+  char *minor;
+  char *micro;
+  char *distributor;
+  char *date;
+  char **current;
+} VersionData;
+
+static void
+version_data_free (VersionData *data)
+{
+  g_free (data->major);
+  g_free (data->minor);
+  g_free (data->micro);
+  g_free (data->distributor);
+  g_free (data->date);
+  g_free (data);
+}
+
+G_DEFINE_AUTOPTR_CLEANUP_FUNC (VersionData, version_data_free);
+
+static void
+version_start_element_handler (GMarkupParseContext      *ctx,
+                               const char               *element_name,
+                               const char              **attr_names,
+                               const char              **attr_values,
+                               gpointer                  user_data,
+                               GError                  **error)
+{
+  VersionData *data = user_data;
+  if (g_str_equal (element_name, "platform"))
+    data->current = &data->major;
+  else if (g_str_equal (element_name, "minor"))
+    data->current = &data->minor;
+  else if (g_str_equal (element_name, "micro"))
+    data->current = &data->micro;
+  else if (g_str_equal (element_name, "distributor"))
+    data->current = &data->distributor;
+  else if (g_str_equal (element_name, "date"))
+    data->current = &data->date;
+  else
+    data->current = NULL;
+}
+
+static void
+version_end_element_handler (GMarkupParseContext      *ctx,
+                             const char               *element_name,
+                             gpointer                  user_data,
+                             GError                  **error)
+{
+  VersionData *data = user_data;
+  data->current = NULL;
+}
+
+static void
+version_text_handler (GMarkupParseContext *ctx,
+                      const char          *text,
+                      gsize                text_len,
+                      gpointer             user_data,
+                      GError             **error)
+{
+  VersionData *data = user_data;
+  if (data->current != NULL)
+    {
+      g_autofree char *stripped = NULL;
+
+      stripped = g_strstrip (g_strdup (text));
+      g_free (*data->current);
+      *data->current = g_steal_pointer (&stripped);
+    }
+}
+
+static gboolean
+load_gnome_version (char **version,
+                    char **distributor,
+                    char **date)
+{
+  GMarkupParser version_parser = {
+    version_start_element_handler,
+    version_end_element_handler,
+    version_text_handler,
+    NULL,
+    NULL,
+  };
+  g_autoptr(GError) error = NULL;
+  g_autoptr(GMarkupParseContext) ctx = NULL;
+  g_autofree char *contents = NULL;
+  gsize length;
+  g_autoptr(VersionData) data = NULL;
+
+  if (!g_file_get_contents (DATADIR "/gnome/gnome-version.xml",
+                            &contents,
+                            &length,
+                            &error))
+    return FALSE;
+
+  data = g_new0 (VersionData, 1);
+  ctx = g_markup_parse_context_new (&version_parser, 0, data, NULL);
+  if (!g_markup_parse_context_parse (ctx, contents, length, &error))
+    {
+      g_warning ("Invalid version file: '%s'", error->message);
+    }
+  else
+    {
+      if (version != NULL)
+        {
+          if (strcmp (data->micro, "0") == 0)
+            *version = g_strdup_printf ("%s.%s", data->major, data->minor);
+          else
+            *version = g_strdup_printf ("%s.%s.%s", data->major, data->minor, data->micro);
+        }
+
+      if (distributor != NULL)
+        *distributor = g_strdup (data->distributor);
+      if (date != NULL)
+        *date = g_strdup (data->date);
+
+      return TRUE;
+    }
+
+  return FALSE;
+};
+
+static void
+update_welcome_title (GisWelcomePage *page)
+{
+  GisWelcomePagePrivate *priv = gis_welcome_page_get_instance_private (page);
+  g_autofree char *name = g_get_os_info (G_OS_INFO_KEY_NAME);
+  g_autofree char *entity = NULL;
+  g_autofree char *text = NULL;
+
+  if (name != NULL) {
+    g_autofree char *version = g_get_os_info (G_OS_INFO_KEY_VERSION_ID);
+    entity = g_strdup_printf ("%s %s", name, version);
+  }
+  else {
+    g_autofree char *version = NULL;
+    load_gnome_version (&version, NULL, NULL);
+    entity = g_strdup_printf ("GNOME %s", version);
+  }
+
+  /* Translators: This is meant to be a warm, engaging welcome message,
+   * like greeting somebody at the door. If the exclamation mark is not
+   * suitable for this in your language you may replace it. The space
+   * before the exclamation mark in this string is a typographical thin
+   * space (U200a) to improve the spacing in the title, which you can
+   * keep or remove. The %s is getting replaced with the name and version
+   * of the OS, e.g. "GNOME 3.38"
+   */
+  text = g_strdup_printf (_("Welcome to %s !"), entity);
+
+  gtk_label_set_label (GTK_LABEL (priv->title), text);
+}
+
+static void
+gis_welcome_page_constructed (GObject *object)
+{
+  GisWelcomePage *page = GIS_WELCOME_PAGE (object);
+
+  G_OBJECT_CLASS (gis_welcome_page_parent_class)->constructed (object);
+
+  update_welcome_header (page);
+  update_welcome_title (page);
+
+  gis_page_set_complete (GIS_PAGE (page), TRUE);
+  gtk_widget_show (GTK_WIDGET (page));
+}
+
+static void
+start_setup (GtkButton *button, GisWelcomePage *page)
+{
+  GisAssistant *assistant;
+
+  assistant = GIS_ASSISTANT (gtk_widget_get_ancestor (GTK_WIDGET (page), GIS_TYPE_ASSISTANT));
+
+  gis_assistant_next_page (assistant);
+}
+
+static void
+gis_welcome_page_class_init (GisWelcomePageClass *klass)
+{
+  GisPageClass *page_class = GIS_PAGE_CLASS (klass);
+  GObjectClass *object_class = G_OBJECT_CLASS (klass);
+
+  gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), 
"/org/gnome/initial-setup/gis-welcome-page.ui");
+
+  gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), GisWelcomePage, header);
+  gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), GisWelcomePage, title);
+  gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (klass), start_setup);
+
+  page_class->page_id = PAGE_ID;
+  object_class->constructed = gis_welcome_page_constructed;
+}
+
+static void
+gis_welcome_page_init (GisWelcomePage *page)
+{
+  g_resources_register (welcome_get_resource ());
+
+  gtk_widget_init_template (GTK_WIDGET (page));
+}
+
+GisPage *
+gis_prepare_welcome_page (GisDriver *driver)
+{
+  return g_object_new (GIS_TYPE_WELCOME_PAGE,
+                       "driver", driver,
+                       NULL);
+}
diff --git a/gnome-initial-setup/pages/welcome/gis-welcome-page.h 
b/gnome-initial-setup/pages/welcome/gis-welcome-page.h
new file mode 100644
index 00000000..73cb6e4f
--- /dev/null
+++ b/gnome-initial-setup/pages/welcome/gis-welcome-page.h
@@ -0,0 +1,37 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * Copyright (C) 2020 Red Hat
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
+ *
+ * Written by:
+ *     Matthias Clasen <mclasen redhat com>
+ */
+
+#pragma once
+
+#include <glib-object.h>
+
+#include "gnome-initial-setup.h"
+
+G_BEGIN_DECLS
+
+#define GIS_TYPE_WELCOME_PAGE (gis_welcome_page_get_type ())
+G_DECLARE_FINAL_TYPE (GisWelcomePage, gis_welcome_page, GIS, WELCOME_PAGE, GisPage)
+
+GType gis_welcome_page_get_type (void);
+
+GisPage *gis_prepare_welcome_page (GisDriver *driver);
+
+G_END_DECLS
diff --git a/gnome-initial-setup/pages/welcome/gis-welcome-page.ui 
b/gnome-initial-setup/pages/welcome/gis-welcome-page.ui
new file mode 100644
index 00000000..69936403
--- /dev/null
+++ b/gnome-initial-setup/pages/welcome/gis-welcome-page.ui
@@ -0,0 +1,67 @@
+<?xml version="1.0"?>
+<interface>
+  <requires lib="gtk+" version="3.0"/>
+  <template class="GisWelcomePage" parent="GisPage">
+    <property name="title" translatable="yes">Setup</property>
+    <property name="margin-top">0</property>
+    <property name="margin-bottom">0</property>
+    <property name="margin-start">0</property>
+    <property name="margin-end">0</property>
+    <property name="has-forward">1</property>
+    <child>
+      <object class="GtkBox" id="box">
+        <property name="visible">True</property>
+        <property name="orientation">vertical</property>
+        <property name="halign">fill</property>
+        <property name="valign">fill</property>
+        <child>
+          <object class="GtkImage" id="header">
+            <property name="visible">True</property>
+          </object>
+        </child>
+        <child>
+          <object class="GtkBox">
+            <property name="orientation">vertical</property>
+            <property name="visible">True</property>
+            <property name="vexpand">1</property>
+            <property name="halign">center</property>
+            <property name="valign">center</property>
+            <property name="spacing">20</property>
+            <child>
+              <object class="GtkLabel" id="title">
+                 <property name="visible">True</property>
+                 <!-- This is set to a translated string at runtime -->
+                 <property name="label">Welcome to the latest GNOME!</property>
+                 <style>
+                   <class name="title-1"/>
+                 </style>
+              </object>
+            </child>
+            <child>
+              <object class="GtkLabel">
+                 <property name="visible">True</property>
+                 <property name="label" translatable="yes">Setup will guide you through making an account 
and enabling some features. We’ll have you up and running in no time.</property>
+                 <property name="wrap">1</property>
+                 <property name="width-chars">35</property>
+                 <property name="max-width-chars">35</property>
+                 <property name="justify">center</property>
+              </object>
+            </child>
+            <child>
+              <object class="GtkButton">
+                 <property name="visible">True</property>
+                 <property name="halign">center</property>
+                 <property name="label" translatable="yes">_Start Setup</property>
+                 <property name="use-underline">1</property>
+                 <signal name="clicked" handler="start_setup"/>
+                 <style>
+                   <class name="suggested-action"/>
+                 </style>
+              </object>
+            </child>
+          </object>
+        </child>
+      </object>
+    </child>
+  </template>
+</interface>
diff --git a/gnome-initial-setup/pages/welcome/initial-setup-welcome.svg 
b/gnome-initial-setup/pages/welcome/initial-setup-welcome.svg
new file mode 100644
index 00000000..9edc14f3
--- /dev/null
+++ b/gnome-initial-setup/pages/welcome/initial-setup-welcome.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg"; xmlns:xlink="http://www.w3.org/1999/xlink"; width="1920" 
height="754"><defs><linearGradient xlink:href="#c" id="m" gradientUnits="userSpaceOnUse" 
gradientTransform="matrix(1.3 0 0 .83333 -19.2 34)" x1="64" y1="180" x2="64" y2="250"/><linearGradient 
y2="250" x2="64" y1="180" x1="64" gradientTransform="matrix(1.3 0 0 .83333 -19.2 34)" 
gradientUnits="userSpaceOnUse" id="k" xlink:href="#c"/><linearGradient id="a"><stop offset="0" 
stop-color="#d0bb8e"/><stop offset="1" stop-color="#fff"/></linearGradient><linearGradient xlink:href="#b" 
id="g" gradientUnits="userSpaceOnUse" gradientTransform="matrix(1.3 0 0 1 -19.2 16.87)" x1="64" y1="254" 
x2="64" y2="292"/><linearGradient id="b"><stop offset="0" stop-color="#cdab8f"/><stop offset="1" 
stop-color="#d3b69d"/></linearGradient><linearGradient xlink:href="#b" id="l" gradientUnits="userSpaceOnUse" 
gradientTransform="matrix(1.3 0 0 1 -19.2 -4)" x1="64" y1="254" x2="64" y2="292"/><linearGradient xlink:href="
 #a" id="e" gradientUnits="userSpaceOnUse" x1="128.817" y1="-97.698" x2="158.518" y2="-127.399" 
gradientTransform="matrix(-.03667 .05186 .03667 .05186 180.124 169.116)"/><linearGradient id="c"><stop 
offset="0" stop-color="#e3cfbf"/><stop offset="1" stop-color="#e7d5c7"/></linearGradient><linearGradient 
y2="292" x2="64" y1="254" x1="64" gradientTransform="matrix(1.3 0 0 1 -19.2 -4)" 
gradientUnits="userSpaceOnUse" id="h" xlink:href="#b"/><linearGradient y2="250" x2="64" y1="180" x1="64" 
gradientTransform="matrix(1.3 0 0 .83333 -19.2 34)" gradientUnits="userSpaceOnUse" id="i" 
xlink:href="#c"/><linearGradient y2="292" x2="64" y1="254" x1="64" gradientTransform="matrix(1.3 0 0 1 -19.2 
-4)" gradientUnits="userSpaceOnUse" id="j" xlink:href="#b"/><clipPath clipPathUnits="userSpaceOnUse" 
id="d"><path d="M2330.729-970.526h1007.5V-1366.5h-1007.5z" style="marker:none" color="#000" 
overflow="visible" fill="#4a86cf" stroke-width="1.357"/></clipPath></defs><path d="M0 754h1920V0H0z" 
style="marker:n
 one" color="#000" overflow="visible" fill="#1c71d8"/><g clip-path="url(#d)" transform="translate(-4440.203 
2603.279) scale(1.90507)"><g transform="matrix(0 2.88666 -2.88666 0 3741.302 -1534.524)"><path 
style="marker:none" d="M170.003 170.124l-1.993 1.993h3.986z" fill="url(#e)"/><path d="M170.003 
170.124l-.797.797h1.595z" style="marker:none" fill="#424048"/><path d="M171.598 172.117h-3.189v27.633h3.189z" 
fill="#f6d32d"/><path d="M169.184 172.117h-1.174v27.643l1.174-.01z" fill="#f9f06b"/><path d="M170.823 
172.117h1.173v27.643l-1.173-.01z" fill="#e5a50a"/><rect ry="1.554" rx="1.554" y="199.76" x="168.01" 
height="3.969" width="3.969" style="marker:none" fill="#f66151"/><path style="marker:none" d="M169.565 
199.76c-.056 0-.111.003-.166.01a1.55 1.55 0 011.39 1.545v.86a1.55 1.55 0 01-1.39 
1.545c.055.006.11.01.166.01h.86c.86 0 1.554-.694 1.554-1.555v-.86c0-.861-.693-1.555-1.554-1.555z" 
fill="#ed333b"/><rect style="marker:none" width="3.969" height="1.323" x="168.01" y="199.76" rx="0" ry="0"
  fill="#f6f5f4"/><rect ry="0" rx="0" y="199.76" x="170.789" height="1.323" width="1.191" style="marker:none" 
fill="#deddda"/></g><g transform="matrix(2.19794 0 0 2.19794 2477.53 -1455.549)"><rect style="marker:none" 
width="23.283" height="35.454" x="248.708" y="158.75" rx="11.642" ry="11.642" fill-opacity=".102"/><rect 
ry="11.642" rx="11.642" y="157.692" x="248.708" height="35.454" width="23.283" style="marker:none" 
fill="#deddda"/><rect style="marker:none" width="23.283" height="35.454" x="248.708" y="156.104" rx="11.642" 
ry="11.642" fill="#f6f5f4"/><path d="M260.615 170.656v-14.552" fill="none" stroke="#c0bfbc" 
stroke-width=".265"/><rect style="marker:none" width="5.292" height="13.229" x="257.969" y="160.073" 
rx="2.646" ry="2.646" fill="#77767b"/><circle r="1.455" cy="162.003" cx="260.603" style="marker:none" 
fill="#c0bfbc" fill-opacity=".102"/></g><g transform="scale(.95548) rotate(45 2986.865 2708.27)"><path 
d="M69.202 198.092c-2.25 2.117-4.37 6.101-4.37 13.602l-.014 34.5-10.17
 9 10.178a1.92 1.92 0 00-1.343.158l-12.125 6.088c-4.633-2.888-10.848-2.327-14.864 1.688-4.671 4.672-4.672 
12.321 0 16.993 4.67 4.671 12.32 4.671 16.992 0l.043-.044.005.045 15.556-15.556.017.017 5.892-5.896-.004 
7.829h.025v21.999l.035-.028v.06c0 6.606 5.41 12.016 12.016 12.016s12.014-5.409 
12.014-12.015c0-5.68-3.998-10.471-9.317-11.705l-4.269-12.879a1.92 1.92 0 
00-.838-1.06v-13.889l24.027-24.047c11.314-11.314 4.496-18.132 4.496-18.132l-28.523 28.523v-40.845s-2.72 
0-5.272 2.4zm-39.36 69.75a6.978 6.978 0 019.922 0 6.979 6.979 0 010 9.921 6.979 6.979 0 01-9.922 0 6.978 
6.978 0 010-9.921zm42.069 16.91a6.994 6.994 0 014.972-2.043 6.979 6.979 0 017.015 7.017 6.978 6.978 0 
01-7.015 7.015 6.979 6.979 0 01-7.016-7.016c0-1.952.778-3.706 2.044-4.972z" style="marker:none" 
fill-opacity=".102" fill-rule="evenodd"/><path d="M65.995 268.962h6v-72l-1.415-1.414s-6.585 5.061-6.585 
17.414l.005 27.19.097 2.723 1.898 2.087z" fill="#9a9996" fill-rule="evenodd"/><use xlink:href="#f" 
transform="scale(-1 1) ro
 tate(-45 -.464 413.359)" width="100%" height="100%"/><g id="f" display="inline"><path d="M55.975 
290h9.667v-72S56 218 56 234z" fill="#fff" fill-rule="evenodd" transform="scale(-1 1) rotate(-45 -31.3 
415.202)"/><g transform="scale(-1 1) rotate(-45 -32.3 412.788)"><path d="M54 312v-24c0-2 2-2 
2-2h6.037s1.918-.136 2.444 1.45l4.397 13.27z" fill="#ed333b" fill-rule="evenodd"/><circle r="9.516" 
cy="312.033" cx="-66.05" transform="scale(-1 1)" fill="none" stroke="#ed333b" stroke-width="5" 
stroke-linecap="round" stroke-linejoin="round"/><circle cx="-66" cy="312" r="7" transform="scale(-1 1)" 
fill="none" stroke="#e01b24" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></g></g><circle 
transform="scale(-1 1) rotate(-45)" cx="-223.446" cy="125.865" r="2" fill="#3d3846"/></g><g 
transform="matrix(0 2.88666 2.88666 0 2747.647 -1526.123)"><rect style="marker:none" width="3.44" 
height="2.117" x="173.567" y="198.702" rx=".468" ry=".468" fill="#1a5fb4"/><path style="marker:none" d="M1
 74.805 157.427h.963c.1 0 .164.083.18.184l1.058 6.482c.043.261-.208.478-.467.478h-2.505c-.259 
0-.51-.217-.467-.478l1.058-6.482c.016-.1.08-.184.18-.184z" fill="#1a5fb4"/><path style="marker:none" 
fill="#fff" d="M173.302 164.042h3.969v35.719h-3.969z"/><rect style="marker:none" width=".794" height="2.381" 
x="174.89" y="155.84" rx=".397" ry=".468" fill="#1a5fb4"/><rect style="marker:none" width="1.323" 
height="1.058" x="174.625" y="156.633" rx="0" ry="0" fill="#fff"/><path style="marker:none" fill="#f6f5f4" 
d="M175.948 164.042h1.323v35.719h-1.323z"/></g><g transform="matrix(2.43265 0 0 2.43265 2602.769 
-1538.917)"><rect style="marker:none" width="95.25" height="58.208" x="47.625" y="84.667" rx="2.884" 
ry="2.884"/><rect ry="2.884" rx="2.884" y="145.256" x="47.625" height="58.208" width="95.25" 
style="marker:none" fill-opacity=".102"/><rect style="marker:none" width="95.25" height="58.208" x="47.625" 
y="144.198" rx="2.884" ry="2.884" fill="#deddda"/><rect ry="2.884" rx="2.884" y="142.875" 
 x="47.625" height="58.208" width="95.25" style="marker:none" fill="#f6f5f4"/><rect style="marker:none" 
width="84.667" height="29.104" x="52.917" y="148.167" rx="1.958" ry="1.958" fill="#c0bfbc"/><rect ry="1.958" 
rx="1.958" y="148.696" x="52.917" height="29.104" width="84.667" style="marker:none" fill="#deddda"/><rect 
ry=".826" rx=".826" y="137.583" x="63.5" height="7.408" width="63.5" style="marker:none"/><rect ry="2.884" 
rx="2.884" y="179.917" x="82.021" height="15.875" width="26.458" style="marker:none" fill="#deddda"/><rect 
ry="1.574" rx="1.574" y="86.284" x="49.158" height="54.975" width="92.183" style="marker:none" 
fill="#62a0ea"/><rect style="marker:none" width="46.302" height="5.292" x="74.083" y="170.656" rx="1.013" 
ry="1.013" fill="#241f31"/><rect ry="1.013" rx="1.013" y="170.656" x="121.708" height="5.292" width="6.615" 
style="marker:none" fill="#241f31"/><rect style="marker:none" width="6.615" height="5.292" x="129.646" 
y="170.656" rx="1.013" ry="1.013" fill="#241f31"/><r
 ect ry="1.013" rx="1.013" y="164.042" x="125.677" height="5.292" width="5.292" style="marker:none" 
fill="#241f31"/><rect style="marker:none" width="6.615" height="5.292" x="117.74" y="164.042" rx="1.013" 
ry="1.013" fill="#241f31"/><rect ry="1.013" rx="1.013" y="164.042" x="109.802" height="5.292" width="6.615" 
style="marker:none" fill="#241f31"/><rect style="marker:none" width="6.615" height="5.292" x="101.865" 
y="164.042" rx="1.013" ry="1.013" fill="#241f31"/><rect ry="1.013" rx="1.013" y="164.042" x="93.927" 
height="5.292" width="6.615" style="marker:none" fill="#241f31"/><rect style="marker:none" width="6.615" 
height="5.292" x="85.99" y="164.042" rx="1.013" ry="1.013" fill="#241f31"/><rect ry="1.013" rx="1.013" 
y="164.042" x="78.052" height="5.292" width="6.615" style="marker:none" fill="#241f31"/><rect 
style="marker:none" width="6.615" height="5.292" x="70.115" y="164.042" rx="1.013" ry="1.013" 
fill="#241f31"/><rect ry="1.013" rx="1.013" y="164.042" x="62.177" height="5.292" wid
 th="6.615" style="marker:none" fill="#241f31"/><rect style="marker:none" width="6.615" height="5.292" 
x="121.708" y="157.427" rx="1.013" ry="1.013" fill="#241f31"/><rect ry="1.013" rx="1.013" y="157.427" 
x="113.771" height="5.292" width="6.615" style="marker:none" fill="#241f31"/><rect style="marker:none" 
width="6.615" height="5.292" x="105.833" y="157.427" rx="1.013" ry="1.013" fill="#241f31"/><rect ry="1.013" 
rx="1.013" y="157.427" x="97.896" height="5.292" width="6.615" style="marker:none" fill="#241f31"/><rect 
style="marker:none" width="6.615" height="5.292" x="89.958" y="157.427" rx="1.013" ry="1.013" 
fill="#241f31"/><rect ry="1.013" rx="1.013" y="157.427" x="82.021" height="5.292" width="6.615" 
style="marker:none" fill="#241f31"/><rect style="marker:none" width="6.615" height="5.292" x="74.083" 
y="157.427" rx="1.013" ry="1.013" fill="#241f31"/><rect ry="1.013" rx="1.013" y="157.427" x="66.146" 
height="5.292" width="6.615" style="marker:none" fill="#241f31"/><rect style="marker
 :none" width="10.583" height="5.292" x="54.24" y="157.427" rx="1.013" ry="1.013" fill="#241f31"/><rect 
ry="1.013" rx="1.013" y="150.813" x="125.677" height="5.292" width="10.583" style="marker:none" 
fill="#241f31"/><rect style="marker:none" width="6.615" height="5.292" x="117.74" y="150.813" rx="1.013" 
ry="1.013" fill="#241f31"/><rect ry="1.013" rx="1.013" y="150.813" x="109.802" height="5.292" width="6.615" 
style="marker:none" fill="#241f31"/><rect style="marker:none" width="6.615" height="5.292" x="101.865" 
y="150.813" rx="1.013" ry="1.013" fill="#241f31"/><rect ry="1.013" rx="1.013" y="150.813" x="93.927" 
height="5.292" width="6.615" style="marker:none" fill="#241f31"/><rect style="marker:none" width="6.615" 
height="5.292" x="85.99" y="150.813" rx="1.013" ry="1.013" fill="#241f31"/><rect ry="1.013" rx="1.013" 
y="150.813" x="78.052" height="5.292" width="6.615" style="marker:none" fill="#241f31"/><rect 
style="marker:none" width="6.615" height="5.292" x="70.115" y="150.813" rx="1.0
 13" ry="1.013" fill="#241f31"/><rect ry="1.013" rx="1.013" y="150.813" x="62.177" height="5.292" 
width="6.615" style="marker:none" fill="#241f31"/><rect style="marker:none" width="6.615" height="5.292" 
x="54.24" y="150.813" rx="1.013" ry="1.013" fill="#241f31"/><rect style="marker:none" width="6.615" 
height="5.292" x="54.24" y="164.042" rx="1.013" ry="1.013" fill="#241f31"/><rect style="marker:none" 
width="6.615" height="5.292" x="66.146" y="170.656" rx="1.013" ry="1.013" fill="#241f31"/><rect ry="1.013" 
rx="1.013" y="170.656" x="54.24" height="5.292" width="10.583" style="marker:none" fill="#241f31"/><rect 
ry="1.013" rx="1.013" y="157.427" x="129.646" height="5.292" width="6.615" style="marker:none" 
fill="#241f31"/><rect style="marker:none" width="3.969" height="11.906" x="132.292" y="157.427" rx="1.013" 
ry="1.013" fill="#241f31"/><g stroke-width=".892" fill="#fff"><path d="M112.497 
102.02l12.984-12.984v12.985zM125.48 102.021l12.053 12.053H125.48z" opacity=".2"/><path d="M101.339 1
 38.053l12.053-12.062h-12.053z" opacity=".1"/><path d="M125.445 113.937l-12.053 12.053h12.053z" 
opacity=".2"/></g></g><g transform="matrix(2.09898 0 0 2.09898 3311.213 -1533.99)"><g transform="matrix(.5269 
0 0 .5269 161.93 58.874)"><rect ry="8" rx="8" y="190.009" x="-348" height="104" width="88" 
style="marker:none" fill-opacity=".102"/><rect style="marker:none" width="88" height="104" x="-348" y="188" 
rx="8" ry="8" fill="#1e737e"/><rect ry="8" rx="8" y="188" x="-348" height="102" width="88" 
style="marker:none" fill="#f6f5f4"/><path d="M-340.177 188h64.72a7.805 7.805 0 017.823 7.822l-.102 
94.178h-72.441a7.805 7.805 0 01-7.823-7.822v-86.356a7.805 7.805 0 017.823-7.822z" style="marker:none" 
fill="#fff"/><rect ry="8" rx="8" y="180" x="-348" height="100" width="88" style="marker:none" 
fill="#1e737e"/><rect style="marker:none" width="88" height="98" x="-348" y="180" rx="8" ry="8" 
fill="#27a0a4"/></g><g transform="matrix(.5269 0 0 .5269 -31.97 60.455)" fill="#3d3846" stroke="#241f31" 
stroke
 -width="2"><circle cx="32" cy="187" r="3"/><circle r="3" cy="187" cx="96"/><circle cx="48" cy="187" 
r="3"/><circle cx="64" cy="187" r="3"/><circle r="3" cy="187" cx="80"/></g><path d="M-15.125 149.486a1.054 
1.054 0 00-1.037 1.069v8.43a1.054 1.054 0 102.107 0v-8.43a1.054 1.054 0 00-1.07-1.069zm8.432 0a1.054 1.054 0 
00-1.04 1.069v8.43a1.054 1.054 0 102.108 0v-8.43a1.054 1.054 0 00-1.068-1.069zm8.43 0a1.054 1.054 0 00-1.038 
1.069v8.43a1.054 1.054 0 102.108 0v-8.43a1.054 1.054 0 00-1.07-1.069zm8.429 0a1.054 1.054 0 00-1.037 
1.069v8.43a1.054 1.054 0 102.107 0v-8.43a1.054 1.054 0 00-1.07-1.069zm8.432 0a1.054 1.054 0 00-1.04 
1.069v8.43a1.054 1.054 0 102.108 0v-8.43a1.054 1.054 0 00-1.068-1.069z" 
style="line-height:normal;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration-line:none;text-decoration-style:solid;text-decoration-
 
color:#000;text-transform:none;text-orientation:mixed;white-space:normal;shape-padding:0;isolation:auto;mix-blend-mode:normal;solid-color:#000;solid-opacity:1"
 color="#000" font-weight="400" font-family="sans-serif" overflow="visible" fill="#deddda"/><circle r="1.058" 
cy="151.642" cx="-15.081" style="marker:none" fill="#fff"/><circle style="marker:none" cx="-6.639" 
cy="151.642" r="1.058" fill="#fff"/><circle r="1.058" cy="151.642" cx="1.757" style="marker:none" 
fill="#fff"/><circle style="marker:none" cx="10.199" cy="151.642" r="1.058" fill="#fff"/><circle r="1.058" 
cy="151.642" cx="18.665" style="marker:none" fill="#fff"/></g><g transform="matrix(.93209 0 0 .93209 -1000.99 
4648.193)"><path fill="url(#g)" d="M12 232.87h104v76H12z" transform="translate(3662.15 -6599.407) 
scale(1.38952)"/><path fill="#ac815b" d="M3678.824-6343.47h144.51v93.972h-144.51z"/><path style="marker:none" 
opacity=".211" fill="#fff" d="M3678.824-6249.498h144.51v2.779h-144.51z"/><path d="M3823.141-6248.491v-95.0
 55l35.515 20.505v92.076z" fill="#e7d5c7"/><path style="marker:none" fill="#7d5738" 
d="M3678.868-6342.373h144.07v53.989h-144.07z"/><path d="M3678.859-6248.491v-95.055l-35.515 20.505v92.076z" 
fill="#e7d5c7"/><rect ry="0" rx="0" y="-6343.605" x="3678.625" height="1.25" width="144.375" 
style="marker:none" fill="#e7d5c7"/><path d="M3679-6249.48h145v39h-145z" style="marker:none" 
fill="#e7d5c7"/></g><path style="marker:none" fill-opacity=".102" 
d="M2210.672-1079.515h130.66v85.432h-130.66z"/><path fill="url(#h)" d="M12 212h104v76H12z" 
transform="translate(2195.596 -1360.94) scale(1.25635)"/><path fill="url(#i)" d="M12 184h104v68H12z" 
transform="translate(2195.596 -1360.94) scale(1.25635)"/><path style="marker:none" opacity=".05" 
d="M2210.672-1044.339h130.66v2.513h-130.66z"/><path style="marker:none" opacity=".2" fill="#fff" 
d="M2213.184-1129.77h2.513v85.431h-2.513zM2336.307-1129.77h2.513v85.431h-2.513z"/><path style="marker:none" 
fill-opacity=".102" d="M2348.87-1079.515h130.66v85.432h-130.6
 6z"/><path fill="url(#j)" d="M12 212h104v76H12z" transform="translate(2333.794 -1360.94) 
scale(1.25635)"/><path fill="url(#k)" d="M12 184h104v68H12z" transform="translate(2333.794 -1360.94) 
scale(1.25635)"/><path style="marker:none" opacity=".05" d="M2348.87-1044.339h130.66v2.513h-130.66z"/><path 
style="marker:none" opacity=".2" fill="#fff" 
d="M2351.383-1129.77h2.513v85.431h-2.513zM2474.505-1129.77h2.513v85.431h-2.513z"/><path style="marker:none" 
d="M2257.81-1130.138h83.672v85.76h-77.875l-5.796-4.96z" fill-opacity=".102"/><path style="marker:none" 
fill="#9a9996" d="M2341.332-1094.593v8.206h-130.66v-8.206zM2421.596-1085.003v8.205h-85.316v-8.205z"/><path 
style="marker:none" fill="#77767b" d="M2271.9-1044.338h8.205v45.129h-8.205z"/><path style="marker:none" 
d="M2349.05-1130.138h40.555l24.593 26.797v58.964h-65.149z" fill-opacity=".102"/><path style="marker:none" 
fill="#9a9996" d="M2271.9-1129.653h8.205v85.315h-8.205z"/><g><path fill="url(#l)" d="M12 212h104v76H12z" 
transform="translate(
 2242.906 -1411.193) scale(1.25635)"/><path fill="url(#m)" d="M12 184h104v68H12z" 
transform="translate(2242.906 -1411.193) scale(1.25635)"/><path style="marker:none" opacity=".05" 
d="M2257.982-1094.593h130.66v2.513h-130.66z"/><path style="marker:none" opacity=".2" fill="#fff" 
d="M2260.495-1180.025h2.512v85.432h-2.512zM2383.617-1180.025h2.513v85.432h-2.513z"/></g><path 
style="marker:none" fill="#77767b" d="M2403.555-1044.455h8.205v45.13h-8.205z"/><path style="marker:none" 
fill="#9a9996" d="M2403.555-1129.77h8.205v85.315h-8.205z"/><path style="marker:none" opacity=".136" 
d="M2430.86-1084.892h48.954v7.797h-48.955z"/><path style="marker:none" fill="#9a9996" 
d="M2479.472-1085.481v8.205L2430.116-1093v-8.205zM2388.644-1144.845v8.205h-130.66v-8.205z"/><path 
style="marker:none" fill="#77767b" d="M2319.209-1094.593h8.205v45.13h-8.205z"/><path style="marker:none" 
fill="#9a9996" d="M2319.209-1179.908h8.205v85.315h-8.205z"/></g></svg>
\ No newline at end of file
diff --git a/gnome-initial-setup/pages/welcome/meson.build b/gnome-initial-setup/pages/welcome/meson.build
new file mode 100644
index 00000000..be977dc9
--- /dev/null
+++ b/gnome-initial-setup/pages/welcome/meson.build
@@ -0,0 +1,10 @@
+sources += gnome.compile_resources(
+    'welcome-resources',
+    files('welcome.gresource.xml'),
+    c_name: 'welcome',
+)
+
+sources += files(
+    'gis-welcome-page.c',
+    'gis-welcome-page.h',
+)
diff --git a/gnome-initial-setup/pages/welcome/welcome.gresource.xml 
b/gnome-initial-setup/pages/welcome/welcome.gresource.xml
new file mode 100644
index 00000000..9a2f9c69
--- /dev/null
+++ b/gnome-initial-setup/pages/welcome/welcome.gresource.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+  <gresource prefix="/org/gnome/initial-setup">
+    <file preprocess="xml-stripblanks">gis-welcome-page.ui</file>
+    <file preprocess="xml-stripblanks">initial-setup-welcome.svg</file>
+  </gresource>
+</gresources>
diff --git a/meson.build b/meson.build
index 506707d4..9838aa2f 100644
--- a/meson.build
+++ b/meson.build
@@ -23,6 +23,7 @@ conf = configuration_data()
 conf.set_quoted('GETTEXT_PACKAGE', meson.project_name())
 conf.set_quoted('GNOMELOCALEDIR', locale_dir)
 conf.set_quoted('PKGDATADIR', pkgdata_dir)
+conf.set_quoted('DATADIR', data_dir)
 conf.set_quoted('PKGSYSCONFDIR', pkgsysconf_dir)
 conf.set('SECRET_API_SUBJECT_TO_CHANGE', true)
 conf.set_quoted('G_LOG_DOMAIN', 'InitialSetup')
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 9e511b11..cda56736 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -36,3 +36,5 @@ gnome-initial-setup/pages/summary/gis-summary-page.c
 gnome-initial-setup/pages/summary/gis-summary-page.ui
 gnome-initial-setup/pages/timezone/gis-timezone-page.c
 gnome-initial-setup/pages/timezone/gis-timezone-page.ui
+gnome-initial-setup/pages/welcome/gis-welcome-page.c
+gnome-initial-setup/pages/welcome/gis-welcome-page.ui


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