[gnome-initial-setup] eulas: Split out as well
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup] eulas: Split out as well
- Date: Tue, 12 Jun 2012 05:20:27 +0000 (UTC)
commit 1152a43a84b18f1ba5dac7b53005290412af3b37
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Tue Jun 12 00:34:07 2012 -0400
eulas: Split out as well
gnome-initial-setup/Makefile.am | 1 +
gnome-initial-setup/gis-eula-pages.c | 14 ++++++++++++--
gnome-initial-setup/gis-eula-pages.h | 20 ++++++++++++++++++++
gnome-initial-setup/gnome-initial-setup.c | 11 ++++++++---
gnome-initial-setup/gnome-initial-setup.h | 3 ++-
5 files changed, 43 insertions(+), 6 deletions(-)
---
diff --git a/gnome-initial-setup/Makefile.am b/gnome-initial-setup/Makefile.am
index f6de6b2..9a0b56a 100644
--- a/gnome-initial-setup/Makefile.am
+++ b/gnome-initial-setup/Makefile.am
@@ -34,6 +34,7 @@ endif
gnome_initial_setup_SOURCES = \
gnome-initial-setup.c gnome-initial-setup.h \
+ gis-eula-pages.c gis-eula-pages.h \
gis-location-page.c gis-location-page.h \
panel-cell-renderer-signal.c panel-cell-renderer-signal.h \
panel-cell-renderer-mode.c panel-cell-renderer-mode.h \
diff --git a/gnome-initial-setup/gis-eula-pages.c b/gnome-initial-setup/gis-eula-pages.c
index ceafdc4..54cae78 100644
--- a/gnome-initial-setup/gis-eula-pages.c
+++ b/gnome-initial-setup/gis-eula-pages.c
@@ -1,6 +1,15 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
/* EULA pages {{{1 */
+#include "config.h"
+#include "gis-eula-pages.h"
+
+#include <glib/gi18n.h>
+#include <gio/gio.h>
+
+#include <gtk/gtk.h>
+
/* heavily lifted from g_output_stream_splice */
static void
splice_buffer (GInputStream *stream,
@@ -110,14 +119,15 @@ build_eula_page (SetupData *setup,
g_object_set_data (G_OBJECT (checkbox), "assistant-page", vbox);
}
-static void
-prepare_eula_pages (SetupData *setup)
+void
+gis_prepare_eula_pages (EulasData *data)
{
gchar *eulas_dir_path;
GFile *eulas_dir;
GError *error = NULL;
GFileEnumerator *enumerator = NULL;
GFileInfo *info;
+ SetupData *setup = data->setup;
eulas_dir_path = g_build_filename (UIDIR, "eulas", NULL);
eulas_dir = g_file_new_for_path (eulas_dir_path);
diff --git a/gnome-initial-setup/gis-eula-pages.h b/gnome-initial-setup/gis-eula-pages.h
new file mode 100644
index 0000000..5bd2f6b
--- /dev/null
+++ b/gnome-initial-setup/gis-eula-pages.h
@@ -0,0 +1,20 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+
+#ifndef __GIS_EULA_PAGES_H__
+#define __GIS_EULA_PAGES_H__
+
+#include "gnome-initial-setup.h"
+
+G_BEGIN_DECLS
+
+typedef struct _EulasData EulasData;
+
+struct _EulasData {
+ SetupData *setup;
+};
+
+void gis_prepare_eula_pages (EulasData *data);
+
+G_END_DECLS
+
+#endif /* __GIS_EULA_PAGES_H__ */
diff --git a/gnome-initial-setup/gnome-initial-setup.c b/gnome-initial-setup/gnome-initial-setup.c
index c5f1786..719c188 100644
--- a/gnome-initial-setup/gnome-initial-setup.c
+++ b/gnome-initial-setup/gnome-initial-setup.c
@@ -44,13 +44,15 @@
#include <gnome-keyring.h>
+#include "gis-eula-pages.h"
#include "gis-location-page.h"
/* Setup data {{{1 */
struct _SetupData {
GtkBuilder *builder;
- GKeyFile *overrides;
GtkAssistant *assistant;
+
+ GKeyFile *overrides;
GdmGreeterClient *greeter_client;
/* network data */
@@ -80,6 +82,7 @@ struct _SetupData {
GdkPixbuf *avatar_pixbuf;
gchar *avatar_filename;
+ EulasData eulas_data;
LocationData location_data;
/* online data */
@@ -87,7 +90,6 @@ struct _SetupData {
};
#include "gis-welcome-page.c"
-#include "gis-eula-pages.c"
#include "gis-network-page.c"
#include "gis-account-page.c"
#include "gis-goa-page.c"
@@ -126,7 +128,10 @@ prepare_assistant (SetupData *setup)
connect_to_slave (setup);
prepare_welcome_page (setup);
- prepare_eula_pages (setup);
+
+ setup->eulas_data.setup = setup;
+ gis_prepare_eula_pages (&setup->eulas_data);
+
prepare_network_page (setup);
prepare_account_page (setup);
diff --git a/gnome-initial-setup/gnome-initial-setup.h b/gnome-initial-setup/gnome-initial-setup.h
index fa96f1a..ea01714 100644
--- a/gnome-initial-setup/gnome-initial-setup.h
+++ b/gnome-initial-setup/gnome-initial-setup.h
@@ -12,7 +12,8 @@ typedef struct _SetupData SetupData;
/* ugly hacks ugghh */
#ifndef GIS_COMP
struct _SetupData {
- GtkBuilder *builder;
+ GtkBuilder *builder;
+ GtkAssistant *assistant;
};
#endif
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]