gnome-bluetooth r599 - trunk/wizard



Author: hadess
Date: Thu Apr  9 23:01:31 2009
New Revision: 599
URL: http://svn.gnome.org/viewvc/gnome-bluetooth?rev=599&view=rev

Log:
Move the chooser setup to the GtkBuilder file


Modified:
   trunk/wizard/main.c
   trunk/wizard/wizard.ui

Modified: trunk/wizard/main.c
==============================================================================
--- trunk/wizard/main.c	(original)
+++ trunk/wizard/main.c	Thu Apr  9 23:01:31 2009
@@ -512,23 +512,16 @@
 	page_search = GTK_WIDGET(gtk_builder_get_object(builder, "page_search"));
 
 	/* The selector */
-	selector = BLUETOOTH_CHOOSER (bluetooth_chooser_new(_("Select the device you want to setup")));
-	gtk_container_set_border_width(GTK_CONTAINER(selector), 5);
-	gtk_widget_show(GTK_WIDGET (selector));
-	g_object_set(selector,
-		     "show-search", TRUE,
-		     "show-device-type", TRUE,
-		     "show-device-category", FALSE,
-		     "device-category-filter", BLUETOOTH_CATEGORY_NOT_PAIRED_OR_TRUSTED,
-		     NULL);
+	selector = BLUETOOTH_CHOOSER (gtk_builder_get_object (builder, "selector"));
+	g_object_set (selector,
+		      "device-category-filter", BLUETOOTH_CATEGORY_NOT_PAIRED_OR_TRUSTED,
+		      NULL);
 
 	g_signal_connect(selector, "selected-device-changed",
 			 G_CALLBACK(select_device_changed), NULL);
 	g_signal_connect(selector, "notify::device-selected-name",
 			 G_CALLBACK(device_selected_name_cb), NULL);
 
-	gtk_container_add(GTK_CONTAINER(page_search), GTK_WIDGET (selector));
-
 	/* Setup page */
 	page_setup = GTK_WIDGET(gtk_builder_get_object(builder, "page_setup"));
 	label_setup = GTK_WIDGET(gtk_builder_get_object(builder, "label_setup"));

Modified: trunk/wizard/wizard.ui
==============================================================================
--- trunk/wizard/wizard.ui	(original)
+++ trunk/wizard/wizard.ui	Thu Apr  9 23:01:31 2009
@@ -55,7 +55,16 @@
         <property name="border_width">24</property>
         <property name="spacing">6</property>
         <child>
-          <placeholder/>
+          <object class="BluetoothChooser" id="selector">
+            <property name="title" translatable="yes">Select the device you want to setup</property>
+            <property name="show-search">True</property>
+            <property name="show-device-type">True</property>
+            <property name="show-device-category">False</property>
+            <property name="visible">True</property>
+          </object>
+          <packing>
+            <property name="position">0</property>
+          </packing>
         </child>
         <child>
           <object class="GtkButton" id="passkey_option_button">



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