[Gtk-sharp-list] GnomeDb sample doesn't compile

Marius Andreiana mandreiana@rdslink.ro
Fri, 21 Nov 2003 21:35:13 +0200


--=-ByhrrhAVUO9sto3z3ok8
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Vi, 2003-11-21 at 18:04, Mike Kestner wrote:
> gtk_button_new_from_stock is now called by the Button (string) ctor, so
> the static method is no longer needed.  The sample just needs updating.
ok, I attached a patch.
It works now, thanks

-- 
Marius Andreiana
Galuna - Solutii Linux in Romania
http://www.galuna.ro

--=-ByhrrhAVUO9sto3z3ok8
Content-Disposition: attachment; filename=client.cs.patch
Content-Type: text/x-patch; name=client.cs.patch; charset=UTF-8
Content-Transfer-Encoding: 7bit

--- client.cs.old	2003-11-21 21:32:36.000000000 +0200
+++ client.cs	2003-11-21 21:33:50.000000000 +0200
@@ -130,7 +130,7 @@
 		
 		tableau = new Gtk.Table ((uint) dataList.Count + 1, 3, false);
 		DrawTitles (tableau);
-		tableau.ColSpacings = 10;
+		//tableau.ColSpacings = 10;
 		uint i = 1;
 		foreach (Record r in dataList) {
 			tableau.Attach (new Label (r.ID.ToString ()), 0, 1, i, i + 1);
@@ -181,13 +181,13 @@
 		dialog.VBox.PackStart (frame, true, true, 0);
 
 		Button button = null;
-		button = Button.NewFromStock (Stock.Add);
+		button = new Button();
 		button.Clicked += new EventHandler (Insert_Action);
 		button.CanDefault = true;
 		dialog.ActionArea.PackStart (button, true, true, 0);
 		button.GrabDefault ();
 
-		button = Button.NewFromStock (Stock.Cancel);
+		button = new Button();
 		button.Clicked += new EventHandler (Dialog_Cancel);
 		dialog.ActionArea.PackStart (button, true, true, 0);
 		dialog.Modal = true;
@@ -211,13 +211,13 @@
 		dialog.VBox.PackStart (frame, true, true, 0);
 
 		Button button = null;
-		button = Button.NewFromStock (Stock.Remove);
+		button = new Button();
 		button.Clicked += new EventHandler (Remove_Action);
 		button.CanDefault = true;
 		dialog.ActionArea.PackStart (button, true, true, 0);
 		button.GrabDefault ();
 
-		button = Button.NewFromStock (Stock.Cancel);
+		button = new Button();
 		button.Clicked += new EventHandler (Dialog_Cancel);
 		dialog.ActionArea.PackStart (button, true, true, 0);
 
@@ -233,8 +233,8 @@
 		
 		Table table = new Table (3, 3, false);
 		hbox.PackStart (table);
-		table.ColSpacings = 4;
-		table.RowSpacings = 4;
+		//table.ColSpacings = 4;
+		//table.RowSpacings = 4;
 		Label label = null;
 
 		label = Label.NewWithMnemonic ("_ID");
@@ -275,13 +275,13 @@
 		dialog.VBox.PackStart (frame, true, true, 0);
 
 		Button button = null;
-		button = Button.NewFromStock (Stock.Apply);
+		button = new Button();
 		button.Clicked += new EventHandler (Update_Action);
 		button.CanDefault = true;
 		dialog.ActionArea.PackStart (button, true, true, 0);
 		button.GrabDefault ();
 
-		button = Button.NewFromStock (Stock.Cancel);
+		button = new Button();
 		button.Clicked += new EventHandler (Dialog_Cancel);
 		dialog.ActionArea.PackStart (button, true, true, 0);
 
@@ -546,4 +546,3 @@
 		Dispose (false);
 	}
 }
-

--=-ByhrrhAVUO9sto3z3ok8--