[gnome-initial-setup] gnome-initial-setup: Reindent
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-initial-setup] gnome-initial-setup: Reindent
- Date: Fri, 22 Jun 2012 21:15:37 +0000 (UTC)
commit 1d9863df1484b2085959b4eb0a483eabfafa0677
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Fri Jun 22 17:14:18 2012 -0400
gnome-initial-setup: Reindent
gnome-initial-setup/gnome-initial-setup.c | 152 ++++++++++++++--------------
1 files changed, 76 insertions(+), 76 deletions(-)
---
diff --git a/gnome-initial-setup/gnome-initial-setup.c b/gnome-initial-setup/gnome-initial-setup.c
index f0ec8bf..783b2ac 100644
--- a/gnome-initial-setup/gnome-initial-setup.c
+++ b/gnome-initial-setup/gnome-initial-setup.c
@@ -51,82 +51,82 @@ struct _SetupData {
static void
copy_account_data (SetupData *setup)
{
- ActUser *user = setup->act_user;
- /* here is where we copy all the things we just
- * configured, from the current users home dir to the
- * account that was created in the first step
- */
- g_debug ("Copying account data");
- g_settings_sync ();
-
- gis_copy_account_file (user, ".config/dconf/user");
- gis_copy_account_file (user, ".config/goa-1.0/accounts.conf");
- gis_copy_account_file (user, ".gnome2/keyrings/Default.keyring");
+ ActUser *user = setup->act_user;
+ /* here is where we copy all the things we just
+ * configured, from the current users home dir to the
+ * account that was created in the first step
+ */
+ g_debug ("Copying account data");
+ g_settings_sync ();
+
+ gis_copy_account_file (user, ".config/dconf/user");
+ gis_copy_account_file (user, ".config/goa-1.0/accounts.conf");
+ gis_copy_account_file (user, ".gnome2/keyrings/Default.keyring");
}
static void
prepare_cb (GisAssistant *assi, GtkWidget *page, SetupData *setup)
{
- gchar *page_title;
+ gchar *page_title;
- g_debug ("Preparing page %s", gtk_widget_get_name (page));
+ g_debug ("Preparing page %s", gtk_widget_get_name (page));
- page_title = g_object_get_data (G_OBJECT (page), "gis-page-title");
- gtk_window_set_title (setup->main_window, page_title);
+ page_title = g_object_get_data (G_OBJECT (page), "gis-page-title");
+ gtk_window_set_title (setup->main_window, page_title);
- if (g_object_get_data (G_OBJECT (page), "gis-summary"))
- copy_account_data (setup);
+ if (g_object_get_data (G_OBJECT (page), "gis-summary"))
+ copy_account_data (setup);
}
static void
recenter_window (GdkScreen *screen, SetupData *setup)
{
- gtk_window_set_position (setup->main_window, GTK_WIN_POS_CENTER_ALWAYS);
+ gtk_window_set_position (setup->main_window, GTK_WIN_POS_CENTER_ALWAYS);
}
static void
prepare_main_window (SetupData *setup)
{
- setup->main_window = OBJ(GtkWindow*, "main-window");
- setup->assistant = OBJ(GisAssistant*, "assistant");
-
- g_signal_connect (gtk_widget_get_screen (GTK_WIDGET (setup->main_window)),
- "monitors-changed", G_CALLBACK (recenter_window), setup);
-
- g_signal_connect (setup->assistant, "prepare",
- G_CALLBACK (prepare_cb), setup);
-
- gis_prepare_welcome_page (setup);
- gis_prepare_eula_pages (setup);
- gis_prepare_network_page (setup);
- prepare_account_page (setup);
- gis_prepare_location_page (setup);
- gis_prepare_online_page (setup);
- gis_prepare_summary_page (setup);
+ setup->main_window = OBJ(GtkWindow*, "main-window");
+ setup->assistant = OBJ(GisAssistant*, "assistant");
+
+ g_signal_connect (gtk_widget_get_screen (GTK_WIDGET (setup->main_window)),
+ "monitors-changed", G_CALLBACK (recenter_window), setup);
+
+ g_signal_connect (setup->assistant, "prepare",
+ G_CALLBACK (prepare_cb), setup);
+
+ gis_prepare_welcome_page (setup);
+ gis_prepare_eula_pages (setup);
+ gis_prepare_network_page (setup);
+ prepare_account_page (setup);
+ gis_prepare_location_page (setup);
+ gis_prepare_online_page (setup);
+ gis_prepare_summary_page (setup);
}
GKeyFile *
gis_get_overrides (SetupData *setup)
{
- return g_key_file_ref (setup->overrides);
+ return g_key_file_ref (setup->overrides);
}
GtkWindow *
gis_get_main_window (SetupData *setup)
{
- return setup->main_window;
+ return setup->main_window;
}
GisAssistant *
gis_get_assistant (SetupData *setup)
{
- return setup->assistant;
+ return setup->assistant;
}
ActUser *
gis_get_act_user (SetupData *setup)
{
- return setup->act_user;
+ return setup->act_user;
}
/* main {{{1 */
@@ -134,59 +134,59 @@ gis_get_act_user (SetupData *setup)
int
main (int argc, char *argv[])
{
- SetupData *setup;
- gchar *filename;
- GError *error;
- GOptionEntry entries[] = {
- { "skip-account", 0, 0, G_OPTION_ARG_NONE, &skip_account, "Skip account creation", NULL },
- { NULL, 0 }
- };
+ SetupData *setup;
+ gchar *filename;
+ GError *error;
+ GOptionEntry entries[] = {
+ { "skip-account", 0, 0, G_OPTION_ARG_NONE, &skip_account, "Skip account creation", NULL },
+ { NULL, 0 }
+ };
- bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
- bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+ bindtextdomain (GETTEXT_PACKAGE, GNOMELOCALEDIR);
+ bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
#ifdef HAVE_CHEESE
- cheese_gtk_init (NULL, NULL);
+ cheese_gtk_init (NULL, NULL);
#endif
- setup = g_new0 (SetupData, 1);
+ setup = g_new0 (SetupData, 1);
- gtk_init_with_args (&argc, &argv, "", entries, GETTEXT_PACKAGE, NULL);
+ gtk_init_with_args (&argc, &argv, "", entries, GETTEXT_PACKAGE, NULL);
- if (gtk_clutter_init (NULL, NULL) != CLUTTER_INIT_SUCCESS) {
- g_critical ("Clutter-GTK init failed");
- exit (1);
- }
+ if (gtk_clutter_init (NULL, NULL) != CLUTTER_INIT_SUCCESS) {
+ g_critical ("Clutter-GTK init failed");
+ exit (1);
+ }
- error = NULL;
- if (g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error) == NULL) {
- g_error ("Couldn't get on session bus: %s", error->message);
- exit (1);
- };
+ error = NULL;
+ if (g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, &error) == NULL) {
+ g_error ("Couldn't get on session bus: %s", error->message);
+ exit (1);
+ };
- /* Make sure GisAssistant is initialized. */
- g_debug ("Registering: %s\n", g_type_name (gis_assistant_get_type ()));
+ /* Make sure GisAssistant is initialized. */
+ g_debug ("Registering: %s\n", g_type_name (gis_assistant_get_type ()));
- setup->builder = gis_builder ("setup");
+ setup->builder = gis_builder ("setup");
- setup->overrides = g_key_file_new ();
- filename = g_build_filename (UIDIR, "overrides.ini", NULL);
- if (!g_key_file_load_from_file (setup->overrides, filename, 0, &error)) {
- if (!g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT)) {
- g_error ("%s", error->message);
- exit (1);
- }
- g_error_free (error);
- }
- g_free (filename);
+ setup->overrides = g_key_file_new ();
+ filename = g_build_filename (UIDIR, "overrides.ini", NULL);
+ if (!g_key_file_load_from_file (setup->overrides, filename, 0, &error)) {
+ if (!g_error_matches (error, G_FILE_ERROR, G_FILE_ERROR_NOENT)) {
+ g_error ("%s", error->message);
+ exit (1);
+ }
+ g_error_free (error);
+ }
+ g_free (filename);
- prepare_main_window (setup);
+ prepare_main_window (setup);
- gtk_window_present (GTK_WINDOW (setup->main_window));
+ gtk_window_present (GTK_WINDOW (setup->main_window));
- gtk_main ();
+ gtk_main ();
- return 0;
+ return 0;
}
/* Epilogue {{{1 */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]