Brown paper bag patch



Michael Meeks caught this minor screw-up in my OAF patch. Checking in
now so I can minimize my continuing embarassment:


2000-04-25  Maciej Stachowiak  <mjs@eazel.com>

	* samples/controls/sample-control-container.c,
	samples/controls/bonobo-clock-control.c,
	samples/controls/bonobo-calculator-control.c: Add forgotten
	USING_OAF conditionals which made this not work with
	gnorba. Thanks to Michael Meeks <michael@helixcode.com> for
	catching this problem.

Index: samples/controls/bonobo-calculator-control.c
===================================================================
RCS file: /cvs/gnome/bonobo/samples/controls/bonobo-calculator-control.c,v
retrieving revision 1.6
diff -u -r1.6 bonobo-calculator-control.c
--- samples/controls/bonobo-calculator-control.c	2000/04/18 20:24:45	1.6
+++ samples/controls/bonobo-calculator-control.c	2000/04/25 08:54:52
@@ -87,10 +87,17 @@
 	if (bonobo_calc_control_factory != NULL)
 		return;
 
+#if USING_OAF
 	bonobo_calc_control_factory =
 		bonobo_generic_factory_new (
   		        "OAFIID:bonobo_calculator_factory:0f55cdac-47fc-4d5b-9111-26c84a244fe2",
 			bonobo_calculator_factory, NULL);
+#else
+	bonobo_calc_control_factory =
+		bonobo_generic_factory_new (
+  		        "control-factory:calculator",
+			bonobo_calculator_factory, NULL);
+#endif
 
 	if (bonobo_calc_control_factory == NULL)
 		g_error ("I could not register a BonoboCalculator factory.");
Index: samples/controls/bonobo-clock-control.c
===================================================================
RCS file: /cvs/gnome/bonobo/samples/controls/bonobo-clock-control.c,v
retrieving revision 1.12
diff -u -r1.12 bonobo-clock-control.c
--- samples/controls/bonobo-clock-control.c	2000/04/18 20:24:47	1.12
+++ samples/controls/bonobo-clock-control.c	2000/04/25 08:54:52
@@ -135,18 +135,32 @@
 	if (bonobo_clock_control_factory != NULL)
 		return;
 
+#if USING_OAF
 	bonobo_clock_control_factory =
 		bonobo_generic_factory_new (
 			"OAFIID:bonobo_clock_factory:ec4961f3-7a16-4ace-9463-b112e4bc4186",
 			bonobo_clock_factory, NULL);
+#else
+	bonobo_clock_control_factory =
+		bonobo_generic_factory_new (
+			"control-factory:clock",
+			bonobo_clock_factory, NULL);
+#endif
 
 	if (bonobo_clock_control_factory == NULL)
 		g_error ("I could not register a BonoboClock factory.");
 
+#if USING_OAF
 	bonobo_entry_control_factory =
 		bonobo_generic_factory_new (
 			"OAFIID:bonobo_entry_factory:ef3e3c33-43e2-4f7c-9ca9-9479104608d6",
 			bonobo_entry_factory, NULL);
+#else
+	bonobo_entry_control_factory =
+		bonobo_generic_factory_new (
+			"control-factory:entry",
+			bonobo_entry_factory, NULL);
+#endif
 
 	if (bonobo_entry_control_factory == NULL)
 		g_error ("I could not register an Entry factory.");
Index: samples/controls/sample-control-container.c
===================================================================
RCS file: /cvs/gnome/bonobo/samples/controls/sample-control-container.c,v
retrieving revision 1.13
diff -u -r1.13 sample-control-container.c
--- samples/controls/sample-control-container.c	2000/04/18 20:24:47	1.13
+++ samples/controls/sample-control-container.c	2000/04/25 08:54:52
@@ -165,25 +165,46 @@
 	box = gtk_vbox_new (FALSE, 0);
 	gnome_app_set_contents (GNOME_APP (app), box);
 
+#if USING_OAF
 	control = bonobo_widget_new_control (
 		"OAFIID:bonobo_calculator:fab8c2a7-9576-437c-aa3a-a8617408970f",
 		bonobo_object_corba_objref (BONOBO_OBJECT (uih)));
+#else
+	control = bonobo_widget_new_control (
+  	        "control:calculator",
+		bonobo_object_corba_objref (BONOBO_OBJECT (uih)));
+#endif
+
 	gtk_box_pack_start (GTK_BOX (box), control, TRUE, TRUE, 0);
 
 	button = gtk_button_new_with_label ("Increment result");
 	gtk_signal_connect (GTK_OBJECT (button), "clicked",
 			    (GtkSignalFunc)incr_calc, control);
 
+#if USING_OAF
 	control = bonobo_widget_new_control (
 		"OAFIID:bonobo_clock:d42cc651-44ae-4f69-a10d-a0b6b2cc6ecc",
 		bonobo_object_corba_objref (BONOBO_OBJECT (uih)));
+#else
+	control = bonobo_widget_new_control (
+		"control:clock",
+		bonobo_object_corba_objref (BONOBO_OBJECT (uih)));
+#endif
+
 	gtk_box_pack_start (GTK_BOX (box), control, TRUE, TRUE, 0);
 
 	proplist = create_proplist (control);
 
+#if USING_OAF
 	control = bonobo_widget_new_control (
 		"OAFIID:bonobo_entry_factory:ef3e3c33-43e2-4f7c-9ca9-9479104608d6",
 		bonobo_object_corba_objref (BONOBO_OBJECT (uih)));
+#else
+	control = bonobo_widget_new_control (
+		"control:entry",
+		bonobo_object_corba_objref (BONOBO_OBJECT (uih)));
+#endif
+
 	gtk_box_pack_start (GTK_BOX (box), control, TRUE, TRUE, 0);
 
 	gtk_box_pack_start (GTK_BOX (box), proplist, TRUE, TRUE, 0);




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