[gnome-initial-setup/shell/4765: 58/362] Empty skeleton for Endless EULA page
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup/shell/4765: 58/362] Empty skeleton for Endless EULA page
- Date: Thu, 19 Mar 2015 01:25:56 +0000 (UTC)
commit 856c72dc3207b1a138f702843008e39ed653e06b
Author: Cosimo Cecchi <cosimo endlessm com>
Date: Thu Jun 12 19:03:19 2014 -0700
Empty skeleton for Endless EULA page
[endlessm/eos-shell#2728]
configure.ac | 1 +
gnome-initial-setup/Makefile.am | 1 +
gnome-initial-setup/gnome-initial-setup.c | 2 +
gnome-initial-setup/pages/Makefile.am | 1 +
gnome-initial-setup/pages/endless-eula/Makefile.am | 26 ++++++
.../pages/endless-eula/endless-eula.gresource.xml | 7 ++
.../pages/endless-eula/gis-endless-eula-page.c | 82 ++++++++++++++++++++
.../pages/endless-eula/gis-endless-eula-page.h | 57 ++++++++++++++
.../pages/endless-eula/gis-endless-eula-page.ui | 9 ++
9 files changed, 186 insertions(+), 0 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index e64b417..33e5c0a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -136,6 +136,7 @@ data/Makefile
gnome-initial-setup/Makefile
gnome-initial-setup/pages/Makefile
gnome-initial-setup/pages/language/Makefile
+gnome-initial-setup/pages/endless-eula/Makefile
gnome-initial-setup/pages/eulas/Makefile
gnome-initial-setup/pages/account/Makefile
gnome-initial-setup/pages/location/Makefile
diff --git a/gnome-initial-setup/Makefile.am b/gnome-initial-setup/Makefile.am
index f7d611e..ca59bba 100644
--- a/gnome-initial-setup/Makefile.am
+++ b/gnome-initial-setup/Makefile.am
@@ -30,6 +30,7 @@ gnome_initial_setup_SOURCES = \
gnome_initial_setup_LDADD = \
pages/language/libgislanguage.la \
pages/keyboard/libgiskeyboard.la \
+ pages/endless-eula/libgisendlesseula.la \
pages/eulas/libgiseulas.la \
pages/network/libgisnetwork.la \
pages/location/libgislocation.la \
diff --git a/gnome-initial-setup/gnome-initial-setup.c b/gnome-initial-setup/gnome-initial-setup.c
index db143c1..02dfdd5 100644
--- a/gnome-initial-setup/gnome-initial-setup.c
+++ b/gnome-initial-setup/gnome-initial-setup.c
@@ -42,6 +42,7 @@
#include "pages/language/gis-language-page.h"
#include "pages/keyboard/gis-keyboard-page.h"
+#include "pages/endless-eula/gis-endless-eula-page.h"
#include "pages/eulas/gis-eula-pages.h"
#include "pages/network/gis-network-page.h"
#include "pages/account/gis-account-page.h"
@@ -70,6 +71,7 @@ static PageData page_table[] = {
PAGE (language),
PAGE (keyboard),
PAGE (eula),
+ PAGE (endless_eula),
PAGE (network),
PAGE (account),
PAGE (location),
diff --git a/gnome-initial-setup/pages/Makefile.am b/gnome-initial-setup/pages/Makefile.am
index fead043..033a9c1 100644
--- a/gnome-initial-setup/pages/Makefile.am
+++ b/gnome-initial-setup/pages/Makefile.am
@@ -2,6 +2,7 @@
SUBDIRS = \
language \
keyboard \
+ endless-eula \
eulas \
network \
account \
diff --git a/gnome-initial-setup/pages/endless-eula/Makefile.am
b/gnome-initial-setup/pages/endless-eula/Makefile.am
new file mode 100644
index 0000000..091a86d
--- /dev/null
+++ b/gnome-initial-setup/pages/endless-eula/Makefile.am
@@ -0,0 +1,26 @@
+
+noinst_LTLIBRARIES = libgisendlesseula.la
+
+AM_CPPFLAGS = \
+ $(INITIAL_SETUP_CFLAGS) \
+ -DLOCALSTATEDIR="\"$(localstatedir)\"" \
+ -DUIDIR="\"$(uidir)\""
+
+BUILT_SOURCES =
+
+resource_files = $(shell glib-compile-resources --sourcedir=$(srcdir) --generate-dependencies
$(srcdir)/endless-eula.gresource.xml)
+endless-eula-resources.c: endless-eula.gresource.xml $(resource_files)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-source $<
+endless-eula-resources.h: endless-eula.gresource.xml $(resource_files)
+ $(AM_V_GEN) $(GLIB_COMPILE_RESOURCES) --target=$@ --sourcedir=$(srcdir) --generate-header $<
+BUILT_SOURCES += endless-eula-resources.c endless-eula-resources.h
+
+libgisendlesseula_la_SOURCES = \
+ gis-endless-eula-page.c gis-endless-eula-page.h \
+ $(BUILT_SOURCES)
+
+libgisendlesseula_la_CFLAGS = $(INITIAL_SETUP_CFLAGS) -I "$(srcdir)/../.."
+libgisendlesseula_la_LIBADD = $(INITIAL_SETUP_LIBS)
+libgisendlesseula_la_LDFLAGS = -export_dynamic -avoid-version -module -no-undefined
+
+EXTRA_DIST = endless-eula.gresource.xml $(resource_files)
diff --git a/gnome-initial-setup/pages/endless-eula/endless-eula.gresource.xml
b/gnome-initial-setup/pages/endless-eula/endless-eula.gresource.xml
new file mode 100644
index 0000000..c4d146e
--- /dev/null
+++ b/gnome-initial-setup/pages/endless-eula/endless-eula.gresource.xml
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<gresources>
+ <gresource prefix="/org/gnome/initial-setup">
+ <file preprocess="xml-stripblanks" alias="gis-endless-eula-page.ui">gis-endless-eula-page.ui</file>
+ </gresource>
+</gresources>
+
diff --git a/gnome-initial-setup/pages/endless-eula/gis-endless-eula-page.c
b/gnome-initial-setup/pages/endless-eula/gis-endless-eula-page.c
new file mode 100644
index 0000000..438d880
--- /dev/null
+++ b/gnome-initial-setup/pages/endless-eula/gis-endless-eula-page.c
@@ -0,0 +1,82 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * Copyright (C) 2014 Endless Mobile, Inc.
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ * Written by:
+ * Cosimo Cecchi <cosimo endlessm com>
+ */
+
+/* Endless EULA page {{{1 */
+
+#define PAGE_ID "endless-eula"
+
+#include "config.h"
+#include "gis-endless-eula-page.h"
+
+#include "endless-eula-resources.h"
+
+#include <glib/gi18n.h>
+#include <gio/gio.h>
+
+G_DEFINE_TYPE (GisEndlessEulaPage, gis_endless_eula_page, GIS_TYPE_PAGE);
+
+#define OBJ(type,name) ((type)gtk_builder_get_object(GIS_PAGE(page)->builder,(name)))
+#define WID(name) OBJ(GtkWidget*,name)
+
+static void
+gis_endless_eula_page_constructed (GObject *object)
+{
+ GisEndlessEulaPage *page = GIS_ENDLESS_EULA_PAGE (object);
+
+ G_OBJECT_CLASS (gis_endless_eula_page_parent_class)->constructed (object);
+
+ gtk_container_add (GTK_CONTAINER (page), WID ("endless-eula-page"));
+ gtk_widget_show (GTK_WIDGET (page));
+}
+
+static void
+gis_endless_eula_page_locale_changed (GisPage *page)
+{
+ gis_page_set_title (page, _("Privacy and License Agreements"));
+}
+
+static void
+gis_endless_eula_page_class_init (GisEndlessEulaPageClass *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_endless_eula_page_locale_changed;
+ object_class->constructed = gis_endless_eula_page_constructed;
+}
+
+static void
+gis_endless_eula_page_init (GisEndlessEulaPage *page)
+{
+ g_resources_register (endless_eula_get_resource ());
+}
+
+void
+gis_prepare_endless_eula_page (GisDriver *driver)
+{
+ gis_driver_add_page (driver,
+ g_object_new (GIS_TYPE_ENDLESS_EULA_PAGE,
+ "driver", driver,
+ NULL));
+}
diff --git a/gnome-initial-setup/pages/endless-eula/gis-endless-eula-page.h
b/gnome-initial-setup/pages/endless-eula/gis-endless-eula-page.h
new file mode 100644
index 0000000..92a3f02
--- /dev/null
+++ b/gnome-initial-setup/pages/endless-eula/gis-endless-eula-page.h
@@ -0,0 +1,57 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+/*
+ * Copyright (C) 2014 Endless Mobile, Inc
+ *
+ * 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, write to the Free Software
+ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+ * 02111-1307, USA.
+ *
+ * Written by:
+ * Cosimo Cecchi <cosimo endlessm com>
+ */
+
+#ifndef __GIS_ENDLESS_EULA_PAGE_H__
+#define __GIS_ENDLESS_EULA_PAGE_H__
+
+#include "gnome-initial-setup.h"
+
+G_BEGIN_DECLS
+
+#define GIS_TYPE_ENDLESS_EULA_PAGE (gis_endless_eula_page_get_type ())
+#define GIS_ENDLESS_EULA_PAGE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),
GIS_TYPE_ENDLESS_EULA_PAGE, GisEndlessEulaPage))
+#define GIS_ENDLESS_EULA_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass),
GIS_TYPE_ENDLESS_EULA_PAGE, GisEndlessEulaPageClass))
+#define GIS_IS_ENDLESS_EULA_PAGE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),
GIS_TYPE_ENDLESS_EULA_PAGE))
+#define GIS_IS_ENDLESS_EULA_PAGE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass),
GIS_TYPE_ENDLESS_EULA_PAGE))
+#define GIS_ENDLESS_EULA_PAGE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj),
GIS_TYPE_ENDLESS_EULA_PAGE, GisEndlessEulaPageClass))
+
+typedef struct _GisEndlessEulaPage GisEndlessEulaPage;
+typedef struct _GisEndlessEulaPageClass GisEndlessEulaPageClass;
+
+struct _GisEndlessEulaPage
+{
+ GisPage parent;
+};
+
+struct _GisEndlessEulaPageClass
+{
+ GisPageClass parent_class;
+};
+
+GType gis_endless_eula_page_get_type (void);
+
+void gis_prepare_endless_eula_page (GisDriver *driver);
+
+G_END_DECLS
+
+#endif /* __GIS_ENDLESS_EULA_PAGE_H__ */
diff --git a/gnome-initial-setup/pages/endless-eula/gis-endless-eula-page.ui
b/gnome-initial-setup/pages/endless-eula/gis-endless-eula-page.ui
new file mode 100644
index 0000000..eee32eb
--- /dev/null
+++ b/gnome-initial-setup/pages/endless-eula/gis-endless-eula-page.ui
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <!-- interface-requires gtk+ 3.0 -->
+ <object class="GtkGrid" id="endless-eula-page">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">center</property>
+ </object>
+</interface>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]