Merge ~azzar1/ubuntu/+source/gnome-initial-setup:ubuntu/master into ~ubuntu-desktop/ubuntu/+source/gnome-initial-setup:ubuntu/master

Proposed by Andrea Azzarone
Status: Merged
Approved by: Didier Roche-Tolomelli
Approved revision: daae3d7fd1692b660aef40b164f3ace32e6e7f66
Merged at revision: daae3d7fd1692b660aef40b164f3ace32e6e7f66
Proposed branch: ~azzar1/ubuntu/+source/gnome-initial-setup:ubuntu/master
Merge into: ~ubuntu-desktop/ubuntu/+source/gnome-initial-setup:ubuntu/master
Diff against target: 678 lines (+29/-45)
2 files modified
debian/changelog (+7/-0)
debian/patches/0001-Add-Ubuntu-mode-with-special-pages.patch (+22/-45)
Reviewer Review Type Date Requested Status
Didier Roche-Tolomelli Approve
Review via email: mp+355424@code.launchpad.net

Commit message

Drop ubuntu-changes page.

To post a comment you must log in.
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

LGTM and builds fine! Thanks :)

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/debian/changelog b/debian/changelog
2index 14b234b..5faa898 100644
3--- a/debian/changelog
4+++ b/debian/changelog
5@@ -1,3 +1,10 @@
6+gnome-initial-setup (3.29.92-1ubuntu3) UNRELEASED; urgency=medium
7+
8+ * debian/patches/0001-Add-Ubuntu-mode-with-special-pages.patch:
9+ Drop ubuntu-changes page (LP: #1790146).
10+
11+ -- Andrea Azzarone <andrea.azzarone@canonical.com> Thu, 20 Sep 2018 13:38:11 +0000
12+
13 gnome-initial-setup (3.29.92-1ubuntu2) cosmic; urgency=medium
14
15 * debian/patches/0001-Add-Ubuntu-mode-with-special-pages.patch:
16diff --git a/debian/patches/0001-Add-Ubuntu-mode-with-special-pages.patch b/debian/patches/0001-Add-Ubuntu-mode-with-special-pages.patch
17index 01953c3..f39b104 100644
18--- a/debian/patches/0001-Add-Ubuntu-mode-with-special-pages.patch
19+++ b/debian/patches/0001-Add-Ubuntu-mode-with-special-pages.patch
20@@ -3,18 +3,18 @@ Date: Tue, 20 Mar 2018 11:51:30 +1300
21 Subject: Add Ubuntu mode with special pages
22
23 ---
24- configure.ac | 9 +-
25+ configure.ac | 8 +-
26 data/Makefile.am | 8 +
27 data/com.ubuntu.welcome.policy.in | 21 +
28 data/its/polkit.its | 8 +
29 data/its/polkit.loc | 6 +
30 data/meson.build | 23 +
31- gnome-initial-setup/Makefile.am | 4 +
32+ gnome-initial-setup/Makefile.am | 3 +
33 gnome-initial-setup/gis-driver.c | 35 ++
34 gnome-initial-setup/gis-driver.h | 6 +
35- gnome-initial-setup/gnome-initial-setup.c | 42 +-
36+ gnome-initial-setup/gnome-initial-setup.c | 40 +-
37 gnome-initial-setup/meson.build | 3 +
38- gnome-initial-setup/pages/Makefile.am | 8 +-
39+ gnome-initial-setup/pages/Makefile.am | 5 +-
40 gnome-initial-setup/pages/apps/Makefile.am | 23 +
41 gnome-initial-setup/pages/apps/apps.gresource.xml | 8 +
42 .../pages/apps/default-snap-icon.svg | 1 +
43@@ -32,16 +32,9 @@ Subject: Add Ubuntu mode with special pages
44 .../pages/livepatch/livepatch.gresource.xml | 9 +
45 gnome-initial-setup/pages/livepatch/livepatch.svg | 1 +
46 gnome-initial-setup/pages/livepatch/meson.build | 12 +
47- gnome-initial-setup/pages/meson.build | 6 +-
48+ gnome-initial-setup/pages/meson.build | 5 +-
49 .../pages/privacy/gis-privacy-page.c | 2 +-
50 .../pages/summary/gis-summary-page.c | 2 +-
51- .../pages/ubuntu-changes/Makefile.am | 23 +
52- .../pages/ubuntu-changes/gis-ubuntu-changes-page.c | 175 +++++++
53- .../pages/ubuntu-changes/gis-ubuntu-changes-page.h | 52 ++
54- .../ubuntu-changes/gis-ubuntu-changes-page.ui | 118 +++++
55- .../pages/ubuntu-changes/meson.build | 10 +
56- .../ubuntu-changes/ubuntu-changes.gresource.xml | 8 +
57- .../pages/ubuntu-changes/ubuntu-changes.png | Bin 0 -> 183653 bytes
58 .../pages/ubuntu-report/Makefile.am | 23 +
59 .../pages/ubuntu-report/gis-ubuntu-report-page.c | 241 ++++++++++
60 .../pages/ubuntu-report/gis-ubuntu-report-page.h | 52 ++
61@@ -50,8 +43,8 @@ Subject: Add Ubuntu mode with special pages
62 .../ubuntu-report/ubuntu-report.gresource.xml | 8 +
63 .../pages/ubuntu-report/ubuntu-report.svg | 1 +
64 meson.build | 3 +
65- po/POTFILES.in | 14 +
66- 48 files changed, 3398 insertions(+), 8 deletions(-)
67+ po/POTFILES.in | 12 +
68+ 41 files changed, 3003 insertions(+), 7 deletions(-)
69 create mode 100644 data/com.ubuntu.welcome.policy.in
70 create mode 100644 data/its/polkit.its
71 create mode 100644 data/its/polkit.loc
72@@ -72,13 +65,6 @@ Subject: Add Ubuntu mode with special pages
73 create mode 100644 gnome-initial-setup/pages/livepatch/livepatch.gresource.xml
74 create mode 100644 gnome-initial-setup/pages/livepatch/livepatch.svg
75 create mode 100644 gnome-initial-setup/pages/livepatch/meson.build
76- create mode 100644 gnome-initial-setup/pages/ubuntu-changes/Makefile.am
77- create mode 100644 gnome-initial-setup/pages/ubuntu-changes/gis-ubuntu-changes-page.c
78- create mode 100644 gnome-initial-setup/pages/ubuntu-changes/gis-ubuntu-changes-page.h
79- create mode 100644 gnome-initial-setup/pages/ubuntu-changes/gis-ubuntu-changes-page.ui
80- create mode 100644 gnome-initial-setup/pages/ubuntu-changes/meson.build
81- create mode 100644 gnome-initial-setup/pages/ubuntu-changes/ubuntu-changes.gresource.xml
82- create mode 100644 gnome-initial-setup/pages/ubuntu-changes/ubuntu-changes.png
83 create mode 100644 gnome-initial-setup/pages/ubuntu-report/Makefile.am
84 create mode 100644 gnome-initial-setup/pages/ubuntu-report/gis-ubuntu-report-page.c
85 create mode 100644 gnome-initial-setup/pages/ubuntu-report/gis-ubuntu-report-page.h
86@@ -88,7 +74,7 @@ Subject: Add Ubuntu mode with special pages
87 create mode 100644 gnome-initial-setup/pages/ubuntu-report/ubuntu-report.svg
88
89 diff --git a/configure.ac b/configure.ac
90-index 8175f06..baacd1c 100644
91+index e028226..1aa25b6 100644
92 --- a/configure.ac
93 +++ b/configure.ac
94 @@ -59,7 +59,10 @@ PKG_CHECK_MODULES(INITIAL_SETUP,
95@@ -103,13 +89,12 @@ index 8175f06..baacd1c 100644
96
97 INITIAL_SETUP_CFLAGS="$INITIAL_SETUP_CFLAGS -DNM_VERSION_MIN_REQUIRED=NM_VERSION_1_2"
98 INITIAL_SETUP_CFLAGS="$INITIAL_SETUP_CFLAGS -DNM_VERSION_MAX_ALLOWED=NM_VERSION_1_2"
99-@@ -149,6 +152,10 @@ gnome-initial-setup/pages/account/Makefile
100+@@ -149,6 +152,9 @@ gnome-initial-setup/pages/account/Makefile
101 gnome-initial-setup/pages/password/Makefile
102 gnome-initial-setup/pages/software/Makefile
103 gnome-initial-setup/pages/summary/Makefile
104 +gnome-initial-setup/pages/ubuntu-report/Makefile
105 +gnome-initial-setup/pages/livepatch/Makefile
106-+gnome-initial-setup/pages/ubuntu-changes/Makefile
107 +gnome-initial-setup/pages/apps/Makefile
108 po/Makefile.in
109 ])
110@@ -238,16 +223,15 @@ index ac14976..84f517a 100644
111 install_data('20-gnome-initial-setup.rules', install_dir: rules_dir)
112
113 diff --git a/gnome-initial-setup/Makefile.am b/gnome-initial-setup/Makefile.am
114-index 6b6d5fb..7c8ca30 100644
115+index 6b6d5fb..d8640a9 100644
116 --- a/gnome-initial-setup/Makefile.am
117 +++ b/gnome-initial-setup/Makefile.am
118-@@ -44,6 +44,10 @@ gnome_initial_setup_LDADD = \
119+@@ -44,6 +44,9 @@ gnome_initial_setup_LDADD = \
120 pages/password/libgispassword.la \
121 pages/software/libgissoftware.la \
122 pages/summary/libgissummary.la \
123 + pages/ubuntu-report/libgisubuntu-report.la \
124 + pages/livepatch/libgislivepatch.la \
125-+ pages/ubuntu-changes/libgisubuntu-changes.la \
126 + pages/apps/libgisapps.la \
127 $(INITIAL_SETUP_LIBS) \
128 -lm
129@@ -323,26 +307,24 @@ index 9eb408e..c5261fa 100644
130
131 G_END_DECLS
132 diff --git a/gnome-initial-setup/gnome-initial-setup.c b/gnome-initial-setup/gnome-initial-setup.c
133-index bfcc03c..8755875 100644
134+index bfcc03c..2676e1d 100644
135 --- a/gnome-initial-setup/gnome-initial-setup.c
136 +++ b/gnome-initial-setup/gnome-initial-setup.c
137-@@ -44,6 +44,10 @@
138+@@ -44,6 +44,9 @@
139 #include "pages/account/gis-account-pages.h"
140 #include "pages/password/gis-password-page.h"
141 #include "pages/summary/gis-summary-page.h"
142 +#include "pages/ubuntu-report/gis-ubuntu-report-page.h"
143 +#include "pages/livepatch/gis-livepatch-page.h"
144-+#include "pages/ubuntu-changes/gis-ubuntu-changes-page.h"
145 +#include "pages/apps/gis-apps-page.h"
146
147 #define VENDOR_PAGES_GROUP "pages"
148 #define VENDOR_SKIP_KEY "skip"
149-@@ -82,6 +86,17 @@ static PageData page_table[] = {
150+@@ -82,6 +85,16 @@ static PageData page_table[] = {
151 { NULL },
152 };
153
154 +static PageData ubuntu_page_table[] = {
155-+ PAGE (ubuntu_changes, FALSE),
156 + PAGE (goa, FALSE),
157 + PAGE (livepatch, FALSE),
158 + PAGE (ubuntu_report, FALSE),
159@@ -355,7 +337,7 @@ index bfcc03c..8755875 100644
160 #undef PAGE
161
162 static gboolean
163-@@ -188,6 +203,25 @@ destroy_pages_after (GisAssistant *assistant,
164+@@ -188,6 +201,25 @@ destroy_pages_after (GisAssistant *assistant,
165 }
166 }
167
168@@ -381,7 +363,7 @@ index bfcc03c..8755875 100644
169 static void
170 rebuild_pages_cb (GisDriver *driver)
171 {
172-@@ -200,7 +234,11 @@ rebuild_pages_cb (GisDriver *driver)
173+@@ -200,7 +232,11 @@ rebuild_pages_cb (GisDriver *driver)
174
175 assistant = gis_driver_get_assistant (driver);
176 current_page = gis_assistant_get_current_page (assistant);
177@@ -394,7 +376,7 @@ index bfcc03c..8755875 100644
178
179 g_ptr_array_free (skipped_pages, TRUE);
180 skipped_pages = g_ptr_array_new_with_free_func ((GDestroyNotify) gtk_widget_destroy);
181-@@ -208,7 +246,7 @@ rebuild_pages_cb (GisDriver *driver)
182+@@ -208,7 +244,7 @@ rebuild_pages_cb (GisDriver *driver)
183 if (current_page != NULL) {
184 destroy_pages_after (assistant, current_page);
185
186@@ -418,10 +400,10 @@ index c461562..6bc8df9 100644
187 cheese_gtk_dep,
188 pkgkit_dep,
189 diff --git a/gnome-initial-setup/pages/Makefile.am b/gnome-initial-setup/pages/Makefile.am
190-index 4ddf574..df484db 100644
191+index 4ddf574..0928dd2 100644
192 --- a/gnome-initial-setup/pages/Makefile.am
193 +++ b/gnome-initial-setup/pages/Makefile.am
194-@@ -11,8 +11,12 @@ SUBDIRS = \
195+@@ -11,7 +11,10 @@ SUBDIRS = \
196 account \
197 password \
198 summary \
199@@ -429,14 +411,10 @@ index 4ddf574..df484db 100644
200 + software \
201 + ubuntu-report \
202 + livepatch \
203-+ ubuntu-changes \
204 + apps
205
206 EXTRA_DIST = \
207 meson.build \
208-- $(NULL)
209-+ $(NULL)
210-\ No newline at end of file
211 diff --git a/gnome-initial-setup/pages/apps/Makefile.am b/gnome-initial-setup/pages/apps/Makefile.am
212 new file mode 100644
213 index 0000000..a3d8992
214@@ -2047,7 +2025,7 @@ index 0000000..2f3c742
215 +</interface>
216 diff --git a/gnome-initial-setup/pages/livepatch/gis-livepatch-page.c b/gnome-initial-setup/pages/livepatch/gis-livepatch-page.c
217 new file mode 100644
218-index 0000000..4ef7d2e
219+index 0000000..e604819
220 --- /dev/null
221 +++ b/gnome-initial-setup/pages/livepatch/gis-livepatch-page.c
222 @@ -0,0 +1,533 @@
223@@ -2845,10 +2823,10 @@ index 0000000..14d89ed
224 + 'gis-auth-dialog.h',
225 +)
226 diff --git a/gnome-initial-setup/pages/meson.build b/gnome-initial-setup/pages/meson.build
227-index 7366385..8496608 100644
228+index 7366385..2cc02aa 100644
229 --- a/gnome-initial-setup/pages/meson.build
230 +++ b/gnome-initial-setup/pages/meson.build
231-@@ -9,7 +9,11 @@ pages = [
232+@@ -9,7 +9,10 @@ pages = [
233 'goa',
234 'password',
235 'summary',
236@@ -2856,7 +2834,6 @@ index 7366385..8496608 100644
237 + 'software',
238 + 'ubuntu-report',
239 + 'livepatch',
240-+ 'ubuntu-changes',
241 + 'apps'
242 ]
243
244@@ -2887,1060 +2864,6 @@ index 150fe57..5b47be3 100644
245 default:
246 break;
247 }
248-diff --git a/gnome-initial-setup/pages/ubuntu-changes/Makefile.am b/gnome-initial-setup/pages/ubuntu-changes/Makefile.am
249-new file mode 100644
250-index 0000000..3409262
251---- /dev/null
252-+++ b/gnome-initial-setup/pages/ubuntu-changes/Makefile.am
253-@@ -0,0 +1,23 @@
254-+
255-+noinst_LTLIBRARIES = libgisubuntu-changes.la
256-+
257-+BUILT_SOURCES =
258-+
259-+resource_files = $(shell glib-compile-resources --sourcedir=$(srcdir) --generate-dependencies $(srcdir)/ubuntu-changes.gresource.xml)
260-+ubuntu-changes-resources.c: ubuntu-changes.gresource.xml $(resource_files)
261-+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $<
262-+ubuntu-changes-resources.h: ubuntu-changes.gresource.xml $(resource_files)
263-+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-header $<
264-+BUILT_SOURCES += ubuntu-changes-resources.c ubuntu-changes-resources.h
265-+
266-+libgisubuntu_changes_la_SOURCES = \
267-+ gis-ubuntu-changes-page.c gis-ubuntu-changes-page.h \
268-+ $(BUILT_SOURCES)
269-+
270-+libgisubuntu_changes_la_CFLAGS = $(INITIAL_SETUP_CFLAGS) -I "$(srcdir)/../.." -I "$(top_srcdir)" -I "$(top_builddir)"
271-+libgisubuntu_changes_la_LIBADD = $(INITIAL_SETUP_LIBS)
272-+libgisubuntu_changes_la_LDFLAGS = -export_dynamic -avoid-version -module -no-undefined
273-+
274-+EXTRA_DIST = ubuntu-changes.gresource.xml $(resource_files)
275-+
276-+CLEANFILES = $(BUILT_SOURCES)
277-diff --git a/gnome-initial-setup/pages/ubuntu-changes/gis-ubuntu-changes-page.c b/gnome-initial-setup/pages/ubuntu-changes/gis-ubuntu-changes-page.c
278-new file mode 100644
279-index 0000000..833d848
280---- /dev/null
281-+++ b/gnome-initial-setup/pages/ubuntu-changes/gis-ubuntu-changes-page.c
282-@@ -0,0 +1,175 @@
283-+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
284-+/*
285-+ * Copyright (C) 2018 Canonical Ltd.
286-+ *
287-+ * This program is free software; you can redistribute it and/or
288-+ * modify it under the terms of the GNU General Public License as
289-+ * published by the Free Software Foundation; either version 2 of the
290-+ * License, or (at your option) any later version.
291-+ *
292-+ * This program is distributed in the hope that it will be useful, but
293-+ * WITHOUT ANY WARRANTY; without even the implied warranty of
294-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
295-+ * General Public License for more details.
296-+ *
297-+ * You should have received a copy of the GNU General Public License
298-+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
299-+ */
300-+
301-+/* Ubuntu changes page {{{1 */
302-+
303-+#define PAGE_ID "ubuntu-changes"
304-+
305-+#include "config.h"
306-+#include "gis-ubuntu-changes-page.h"
307-+#include "ubuntu-changes-resources.h"
308-+
309-+#include <glib/gi18n.h>
310-+#include <gio/gio.h>
311-+
312-+struct _GisUbuntuChangesPagePrivate {
313-+ GtkWidget *changes_image;
314-+ GtkWidget *window_switcher_label;
315-+ GtkWidget *launcher_label;
316-+ GtkWidget *apps_button_label;
317-+ GtkWidget *app_menu_label;
318-+ GtkWidget *clock_calendar_label;
319-+ GtkWidget *system_menu_label;
320-+ GtkWidget *close_button_label;
321-+};
322-+typedef struct _GisUbuntuChangesPagePrivate GisUbuntuChangesPagePrivate;
323-+
324-+G_DEFINE_TYPE_WITH_PRIVATE (GisUbuntuChangesPage, gis_ubuntu_changes_page, GIS_TYPE_PAGE);
325-+
326-+static void
327-+gis_ubuntu_changes_page_constructed (GObject *object)
328-+{
329-+ GisUbuntuChangesPage *page = GIS_UBUNTU_CHANGES_PAGE (object);
330-+
331-+ G_OBJECT_CLASS (gis_ubuntu_changes_page_parent_class)->constructed (object);
332-+
333-+ gis_page_set_skippable (GIS_PAGE (page), TRUE);
334-+
335-+ gis_page_set_complete (GIS_PAGE (page), TRUE);
336-+ gtk_widget_show (GTK_WIDGET (page));
337-+}
338-+
339-+static void
340-+allocate_image (GtkWidget *fixed,
341-+ GdkRectangle *allocation,
342-+ GisUbuntuChangesPage *page)
343-+{
344-+ GisUbuntuChangesPagePrivate *priv = gis_ubuntu_changes_page_get_instance_private (page);
345-+ gint image_width, image_height;
346-+ gint window_switcher_width, window_switcher_height;
347-+ gint launcher_width, launcher_height;
348-+ gint apps_button_width, apps_button_height;
349-+ gint app_menu_width, app_menu_height;
350-+ gint clock_calendar_width, clock_calendar_height;
351-+ gint system_menu_width, system_menu_height;
352-+ gint close_button_width, close_button_height;
353-+ gint image_x = 0, image_y = 0;
354-+
355-+ gtk_widget_get_preferred_width (priv->changes_image, NULL, &image_width);
356-+ gtk_widget_get_preferred_height (priv->changes_image, NULL, &image_height);
357-+ gtk_widget_get_preferred_width (priv->window_switcher_label, NULL, &window_switcher_width);
358-+ gtk_widget_get_preferred_height (priv->window_switcher_label, NULL, &window_switcher_height);
359-+ gtk_widget_get_preferred_width (priv->launcher_label, NULL, &launcher_width);
360-+ gtk_widget_get_preferred_height (priv->launcher_label, NULL, &launcher_height);
361-+ gtk_widget_get_preferred_width (priv->apps_button_label, NULL, &apps_button_width);
362-+ gtk_widget_get_preferred_height (priv->apps_button_label, NULL, &apps_button_height);
363-+ gtk_widget_get_preferred_width (priv->app_menu_label, NULL, &app_menu_width);
364-+ gtk_widget_get_preferred_height (priv->app_menu_label, NULL, &app_menu_height);
365-+ gtk_widget_get_preferred_width (priv->clock_calendar_label, NULL, &clock_calendar_width);
366-+ gtk_widget_get_preferred_height (priv->clock_calendar_label, NULL, &clock_calendar_height);
367-+ gtk_widget_get_preferred_width (priv->system_menu_label, NULL, &system_menu_width);
368-+ gtk_widget_get_preferred_height (priv->system_menu_label, NULL, &system_menu_height);
369-+ gtk_widget_get_preferred_width (priv->close_button_label, NULL, &close_button_width);
370-+ gtk_widget_get_preferred_height (priv->close_button_label, NULL, &close_button_height);
371-+
372-+ /* Place image horizontally so all labels fit */
373-+ if (window_switcher_width > image_x)
374-+ image_x = window_switcher_width;
375-+ if (launcher_width > image_x)
376-+ image_x = launcher_width;
377-+ if (apps_button_width > image_x)
378-+ image_x = apps_button_width;
379-+ if (system_menu_width > image_x)
380-+ image_x = system_menu_width;
381-+ if (close_button_width > image_x)
382-+ image_x = close_button_width;
383-+
384-+ /* Place image vertically so all labels fit */
385-+ if (app_menu_height > image_y)
386-+ image_y = app_menu_height;
387-+ if (clock_calendar_height > image_y)
388-+ image_y = clock_calendar_height;
389-+
390-+ /* Use remaining space to center image */
391-+ image_x += (allocation->width - (image_width + image_x * 2)) / 2;
392-+ image_y += (allocation->height - (image_height + image_y * 2)) / 2;
393-+
394-+ gtk_fixed_move (GTK_FIXED (fixed), priv->changes_image, image_x, image_y);
395-+ gtk_fixed_move (GTK_FIXED (fixed), priv->window_switcher_label, image_x - window_switcher_width, image_y + 46 - window_switcher_height / 2);
396-+ gtk_fixed_move (GTK_FIXED (fixed), priv->launcher_label, image_x - launcher_width, image_y + 138 - launcher_height / 2);
397-+ gtk_fixed_move (GTK_FIXED (fixed), priv->apps_button_label, image_x - apps_button_width, image_y + 278 - apps_button_height / 2);
398-+ gtk_fixed_move (GTK_FIXED (fixed), priv->app_menu_label, image_x + 139 - app_menu_width / 2, image_y - app_menu_height);
399-+ gtk_fixed_move (GTK_FIXED (fixed), priv->clock_calendar_label, image_x + 249, image_y - clock_calendar_height);
400-+ gtk_fixed_move (GTK_FIXED (fixed), priv->system_menu_label, image_x + image_width, image_y + 46 - system_menu_height / 2);
401-+ gtk_fixed_move (GTK_FIXED (fixed), priv->close_button_label, image_x + image_width, image_y + 125 - system_menu_height / 2);
402-+}
403-+
404-+static gboolean
405-+activate_link (GtkLabel *label,
406-+ const gchar *uri,
407-+ GisUbuntuChangesPage *page)
408-+{
409-+ /* FIXME: Show changes */
410-+
411-+ return TRUE;
412-+}
413-+
414-+static void
415-+gis_ubuntu_changes_page_locale_changed (GisPage *page)
416-+{
417-+ gis_page_set_title (GIS_PAGE (page), _("What's new in Ubuntu"));
418-+}
419-+
420-+static void
421-+gis_ubuntu_changes_page_class_init (GisUbuntuChangesPageClass *klass)
422-+{
423-+ GisPageClass *page_class = GIS_PAGE_CLASS (klass);
424-+ GObjectClass *object_class = G_OBJECT_CLASS (klass);
425-+
426-+ gtk_widget_class_set_template_from_resource (GTK_WIDGET_CLASS (klass), "/org/gnome/initial-setup/gis-ubuntu-changes-page.ui");
427-+ gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), GisUbuntuChangesPage, changes_image);
428-+ gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), GisUbuntuChangesPage, window_switcher_label);
429-+ gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), GisUbuntuChangesPage, launcher_label);
430-+ gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), GisUbuntuChangesPage, apps_button_label);
431-+ gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), GisUbuntuChangesPage, app_menu_label);
432-+ gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), GisUbuntuChangesPage, clock_calendar_label);
433-+ gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), GisUbuntuChangesPage, system_menu_label);
434-+ gtk_widget_class_bind_template_child_private (GTK_WIDGET_CLASS (klass), GisUbuntuChangesPage, close_button_label);
435-+ gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (klass), allocate_image);
436-+ gtk_widget_class_bind_template_callback (GTK_WIDGET_CLASS (klass), activate_link);
437-+
438-+ page_class->page_id = PAGE_ID;
439-+ page_class->locale_changed = gis_ubuntu_changes_page_locale_changed;
440-+ object_class->constructed = gis_ubuntu_changes_page_constructed;
441-+}
442-+
443-+static void
444-+gis_ubuntu_changes_page_init (GisUbuntuChangesPage *page)
445-+{
446-+ g_resources_register (ubuntu_changes_get_resource ());
447-+
448-+ gtk_widget_init_template (GTK_WIDGET (page));
449-+}
450-+
451-+GisPage *
452-+gis_prepare_ubuntu_changes_page (GisDriver *driver)
453-+{
454-+ return g_object_new (GIS_TYPE_UBUNTU_CHANGES_PAGE,
455-+ "driver", driver,
456-+ NULL);
457-+}
458-diff --git a/gnome-initial-setup/pages/ubuntu-changes/gis-ubuntu-changes-page.h b/gnome-initial-setup/pages/ubuntu-changes/gis-ubuntu-changes-page.h
459-new file mode 100644
460-index 0000000..a1c1e59
461---- /dev/null
462-+++ b/gnome-initial-setup/pages/ubuntu-changes/gis-ubuntu-changes-page.h
463-@@ -0,0 +1,52 @@
464-+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
465-+/*
466-+ * Copyright (C) 2018 Canonical Ltd.
467-+ *
468-+ * This program is free software; you can redistribute it and/or
469-+ * modify it under the terms of the GNU General Public License as
470-+ * published by the Free Software Foundation; either version 2 of the
471-+ * License, or (at your option) any later version.
472-+ *
473-+ * This program is distributed in the hope that it will be useful, but
474-+ * WITHOUT ANY WARRANTY; without even the implied warranty of
475-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
476-+ * General Public License for more details.
477-+ *
478-+ * You should have received a copy of the GNU General Public License
479-+ * along with this program; if not, see <http://www.gnu.org/licenses/>.
480-+ */
481-+
482-+#ifndef __GIS_UBUNTU_CHANGES_PAGE_H__
483-+#define __GIS_UBUNTU_CHANGES_PAGE_H__
484-+
485-+#include "gnome-initial-setup.h"
486-+
487-+G_BEGIN_DECLS
488-+
489-+#define GIS_TYPE_UBUNTU_CHANGES_PAGE (gis_ubuntu_changes_page_get_type ())
490-+#define GIS_UBUNTU_CHANGES_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIS_TYPE_UBUNTU_CHANGES_PAGE, GisUbuntuChangesPage))
491-+#define GIS_UBUNTU_CHANGES_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIS_TYPE_UBUNTU_CHANGES_PAGE, GisUbuntuChangesPageClass))
492-+#define GIS_IS_UBUNTU_CHANGES_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIS_TYPE_UBUNTU_CHANGES_PAGE))
493-+#define GIS_IS_UBUNTU_CHANGES_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIS_TYPE_UBUNTU_CHANGES_PAGE))
494-+#define GIS_UBUNTU_CHANGES_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIS_TYPE_UBUNTU_CHANGES_PAGE, GisUbuntuChangesPageClass))
495-+
496-+typedef struct _GisUbuntuChangesPage GisUbuntuChangesPage;
497-+typedef struct _GisUbuntuChangesPageClass GisUbuntuChangesPageClass;
498-+
499-+struct _GisUbuntuChangesPage
500-+{
501-+ GisPage parent;
502-+};
503-+
504-+struct _GisUbuntuChangesPageClass
505-+{
506-+ GisPageClass parent_class;
507-+};
508-+
509-+GType gis_ubuntu_changes_page_get_type (void);
510-+
511-+GisPage *gis_prepare_ubuntu_changes_page (GisDriver *driver);
512-+
513-+G_END_DECLS
514-+
515-+#endif /* __GIS_UBUNTU_CHANGES_PAGE_H__ */
516-diff --git a/gnome-initial-setup/pages/ubuntu-changes/gis-ubuntu-changes-page.ui b/gnome-initial-setup/pages/ubuntu-changes/gis-ubuntu-changes-page.ui
517-new file mode 100644
518-index 0000000..7210cc6
519---- /dev/null
520-+++ b/gnome-initial-setup/pages/ubuntu-changes/gis-ubuntu-changes-page.ui
521-@@ -0,0 +1,118 @@
522-+<?xml version="1.0" encoding="UTF-8"?>
523-+<interface>
524-+ <!-- interface-requires gtk+ 3.0 -->
525-+ <template class="GisUbuntuChangesPage" parent="GisPage">
526-+ <child>
527-+ <object class="GtkBox" id="box">
528-+ <property name="visible">True</property>
529-+ <property name="can_focus">False</property>
530-+ <property name="halign">fill</property>
531-+ <property name="valign">fill</property>
532-+ <property name="orientation">vertical</property>
533-+ <property name="border_width">20</property>
534-+ <child>
535-+ <object class="GtkLabel" id="title">
536-+ <property name="visible">True</property>
537-+ <property name="can_focus">False</property>
538-+ <property name="halign">start</property>
539-+ <property name="hexpand">True</property>
540-+ <property name="valign">start</property>
541-+ <property name="label" translatable="yes">What's new in Ubuntu</property>
542-+ <attributes>
543-+ <attribute name="weight" value="bold"/>
544-+ <attribute name="scale" value="1.8"/>
545-+ </attributes>
546-+ </object>
547-+ </child>
548-+ <child>
549-+ <object class="GtkLabel">
550-+ <property name="visible">True</property>
551-+ <property name="can_focus">False</property>
552-+ <property name="max-width-chars">50</property>
553-+ <property name="halign">start</property>
554-+ <property name="hexpand">False</property>
555-+ <property name="margin_top">18</property>
556-+ <property name="label" translatable="yes">Ubuntu 18.04 works differently from older versions.</property>
557-+ <property name="wrap">True</property>
558-+ </object>
559-+ </child>
560-+ <child>
561-+ <object class="GtkFixed">
562-+ <property name="visible">True</property>
563-+ <property name="can_focus">False</property>
564-+ <property name="margin_top">50</property>
565-+ <signal name="size-allocate" handler="allocate_image"/>
566-+ <child>
567-+ <object class="GtkImage" id="changes_image">
568-+ <property name="visible">True</property>
569-+ <property name="can_focus">False</property>
570-+ <property name="resource">/org/gnome/initial-setup/ubuntu-changes.png</property>
571-+ </object>
572-+ </child>
573-+ <child>
574-+ <object class="GtkLabel" id="window_switcher_label">
575-+ <property name="visible">True</property>
576-+ <property name="can_focus">False</property>
577-+ <property name="label" translatable="yes">Window switcher</property>
578-+ </object>
579-+ </child>
580-+ <child>
581-+ <object class="GtkLabel" id="launcher_label">
582-+ <property name="visible">True</property>
583-+ <property name="can_focus">False</property>
584-+ <property name="label" translatable="yes">Dock</property>
585-+ </object>
586-+ </child>
587-+ <child>
588-+ <object class="GtkLabel" id="apps_button_label">
589-+ <property name="visible">True</property>
590-+ <property name="can_focus">False</property>
591-+ <property name="label" translatable="yes">Apps button</property>
592-+ </object>
593-+ </child>
594-+ <child>
595-+ <object class="GtkLabel" id="app_menu_label">
596-+ <property name="visible">True</property>
597-+ <property name="can_focus">False</property>
598-+ <property name="label" translatable="yes">Application menu</property>
599-+ </object>
600-+ </child>
601-+ <child>
602-+ <object class="GtkLabel" id="clock_calendar_label">
603-+ <property name="visible">True</property>
604-+ <property name="can_focus">False</property>
605-+ <property name="label" translatable="yes">Calendar and notifications</property>
606-+ </object>
607-+ </child>
608-+ <child>
609-+ <object class="GtkLabel" id="system_menu_label">
610-+ <property name="visible">True</property>
611-+ <property name="can_focus">False</property>
612-+ <property name="label" translatable="yes">System menu</property>
613-+ </object>
614-+ </child>
615-+ <child>
616-+ <object class="GtkLabel" id="close_button_label">
617-+ <property name="visible">True</property>
618-+ <property name="can_focus">False</property>
619-+ <property name="label" translatable="yes">Close button</property>
620-+ </object>
621-+ </child>
622-+ </object>
623-+ </child>
624-+ <child>
625-+ <object class="GtkLabel" id="guide_label">
626-+ <property name="visible">False</property>
627-+ <property name="can_focus">False</property>
628-+ <property name="halign">start</property>
629-+ <property name="margin_top">18</property>
630-+ <property name="label" translatable="yes">If you like, you can read a &lt;a href=""&gt;quick guide to the new system&lt;/a&gt;.</property>
631-+ <property name="use-markup">True</property>
632-+ <property name="wrap">True</property>
633-+ <signal name="activate-link" handler="activate_link"/>
634-+ </object>
635-+ </child>
636-+ </object>
637-+ </child>
638-+ </template>
639-+</interface>
640-diff --git a/gnome-initial-setup/pages/ubuntu-changes/meson.build b/gnome-initial-setup/pages/ubuntu-changes/meson.build
641-new file mode 100644
642-index 0000000..5312ecc
643---- /dev/null
644-+++ b/gnome-initial-setup/pages/ubuntu-changes/meson.build
645-@@ -0,0 +1,10 @@
646-+sources += gnome.compile_resources(
647-+ 'ubuntu-changes-resources',
648-+ files('ubuntu-changes.gresource.xml'),
649-+ c_name: 'ubuntu_changes'
650-+)
651-+
652-+sources += files(
653-+ 'gis-ubuntu-changes-page.c',
654-+ 'gis-ubuntu-changes-page.h',
655-+)
656-diff --git a/gnome-initial-setup/pages/ubuntu-changes/ubuntu-changes.gresource.xml b/gnome-initial-setup/pages/ubuntu-changes/ubuntu-changes.gresource.xml
657-new file mode 100644
658-index 0000000..946b23b
659---- /dev/null
660-+++ b/gnome-initial-setup/pages/ubuntu-changes/ubuntu-changes.gresource.xml
661-@@ -0,0 +1,8 @@
662-+<?xml version="1.0" encoding="UTF-8"?>
663-+<gresources>
664-+ <gresource prefix="/org/gnome/initial-setup">
665-+ <file preprocess="xml-stripblanks" alias="gis-ubuntu-changes-page.ui">gis-ubuntu-changes-page.ui</file>
666-+ <file alias="ubuntu-changes.png">ubuntu-changes.png</file>
667-+ </gresource>
668-+</gresources>
669-+
670-diff --git a/gnome-initial-setup/pages/ubuntu-changes/ubuntu-changes.png b/gnome-initial-setup/pages/ubuntu-changes/ubuntu-changes.png
671-new file mode 100644
672-index 0000000..7b787ac
673---- /dev/null
674-+++ b/gnome-initial-setup/pages/ubuntu-changes/ubuntu-changes.png
675-@@ -0,0 +1,625 @@
676-+�PNG
677-+
678-+

Subscribers

People subscribed via source and target branches