[gnome-initial-setup] gnome-initial-setup: Remove main GtkBuilder file



commit 37f04cdf87b854b712e79c28f8883f247f0c2ed2
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Jul 16 19:37:19 2012 -0400

    gnome-initial-setup: Remove main GtkBuilder file
    
    There's no purpose, at this point.

 gnome-initial-setup/Makefile.am           |    1 -
 gnome-initial-setup/gnome-initial-setup.c |   22 ++++++++++++----------
 gnome-initial-setup/setup.gresource.xml   |    1 -
 gnome-initial-setup/setup.ui              |   19 -------------------
 4 files changed, 12 insertions(+), 31 deletions(-)
---
diff --git a/gnome-initial-setup/Makefile.am b/gnome-initial-setup/Makefile.am
index cc40647..80e0981 100644
--- a/gnome-initial-setup/Makefile.am
+++ b/gnome-initial-setup/Makefile.am
@@ -18,7 +18,6 @@ libexec_PROGRAMS = gnome-initial-setup
 BUILT_SOURCES =
 
 UI_FILES = \
-	setup.ui \
 	pages/language/gis-language-page.ui \
 	pages/network/gis-network-page.ui \
 	pages/account/gis-account-page.ui \
diff --git a/gnome-initial-setup/gnome-initial-setup.c b/gnome-initial-setup/gnome-initial-setup.c
index e96d805..44f07ef 100644
--- a/gnome-initial-setup/gnome-initial-setup.c
+++ b/gnome-initial-setup/gnome-initial-setup.c
@@ -28,7 +28,6 @@
 struct _SetupData {
   GtkWindow *main_window;
   GKeyFile *overrides;
-  GtkBuilder *builder;
   GisAssistant *assistant;
 
   GSList *finals;
@@ -41,9 +40,6 @@ struct _AsyncClosure {
   gpointer user_data;
 };
 
-#define OBJ(type,name) ((type)gtk_builder_get_object(setup->builder,(name)))
-#define WID(name) OBJ(GtkWidget*,name)
-
 static void
 run_finals (SetupData *setup)
 {
@@ -78,9 +74,6 @@ recenter_window (GdkScreen *screen, SetupData *setup)
 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);
 
@@ -158,10 +151,19 @@ main (int argc, char *argv[])
     exit (1);
   }
 
-  /* Make sure GisAssistant is initialized. */
-  g_type_ensure (GIS_TYPE_ASSISTANT_CLUTTER);
+  setup->main_window = g_object_new (GTK_TYPE_WINDOW,
+                                     "type", GTK_WINDOW_TOPLEVEL,
+                                     "border-width", 12,
+                                     "icon-name", "preferences-system",
+                                     "deletable", FALSE,
+                                     "resizable", FALSE,
+                                     "window-position", GTK_WIN_POS_CENTER_ALWAYS,
+                                     NULL);
+
+  setup->assistant = g_object_new (GIS_TYPE_ASSISTANT_CLUTTER, NULL);
+  gtk_container_add (GTK_CONTAINER (setup->main_window), GTK_WIDGET (setup->assistant));
 
-  setup->builder = gis_builder ("setup");
+  gtk_widget_show (GTK_WIDGET (setup->assistant));
 
   setup->overrides = g_key_file_new ();
   filename = g_build_filename (UIDIR, "overrides.ini", NULL);
diff --git a/gnome-initial-setup/setup.gresource.xml b/gnome-initial-setup/setup.gresource.xml
index a4c83ba..771c622 100644
--- a/gnome-initial-setup/setup.gresource.xml
+++ b/gnome-initial-setup/setup.gresource.xml
@@ -1,7 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <gresources>
   <gresource prefix="/ui">
-    <file preprocess="xml-stripblanks">setup.ui</file>
     <file preprocess="xml-stripblanks" alias="gis-language-page.ui">pages/language/gis-language-page.ui</file>
     <file preprocess="xml-stripblanks" alias="gis-account-page.ui">pages/account/gis-account-page.ui</file>
     <file preprocess="xml-stripblanks" alias="gis-location-page.ui">pages/location/gis-location-page.ui</file>



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