[Gtk-sharp-list] GtkDemo path was: RE: [Mono-list] Updating or Redoing go-mono.net

Yves Kurz ml_yves@magnific.ch
Sun, 11 Jan 2004 03:50:34 +0100


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

Hello

On Sun, 2004-01-11 at 03:22, Daniel Morgan wrote:
> The same thing could be said about GTK#.
> 
> A new release came out - 0.15, but the tests do not even compile!  The
> GtkDemo does not either!   And I'm sure the GTK# docs in the Mono Handbook
> are obsolete too.
> 

I did a patch to fix the compilation problem with GtkDemo. Since it's my
first patch i don't know if i did it right (if not please tell me whats
wrong thank). 
The changes are simple. I converted all Label x =
Label.NewWithMenemonic(..) to new Label (..)

Hope it helps..

yves


--=-X2Zmcp8hG2gLqMoD5p/x
Content-Disposition: attachment; filename=GtkDemo_label.patch
Content-Type: text/x-patch; name=GtkDemo_label.patch; charset=ANSI_X3.4-1968
Content-Transfer-Encoding: 7bit

Index: sample/GtkDemo/DemoDialog.cs
===================================================================
RCS file: /mono/gtk-sharp/sample/GtkDemo/DemoDialog.cs,v
retrieving revision 1.1
diff -u -r1.1 DemoDialog.cs
--- sample/GtkDemo/DemoDialog.cs	30 Oct 2003 23:57:41 -0000	1.1
+++ sample/GtkDemo/DemoDialog.cs	11 Jan 2004 03:49:46 -0000
@@ -65,13 +65,13 @@
 			table.ColumnSpacing = 4;
 			hbox.PackStart (table);
 
-			Label label = Label.NewWithMnemonic ("_Entry1");
+			Label label = new Label ("_Entry1");
 			table.Attach (label, 0, 1, 0, 1);
 			entry1 = new Entry ();
 			table.Attach (entry1, 1, 2, 0, 1);
 			label.MnemonicWidget = entry1;
 			
-			label = Label.NewWithMnemonic ("E_ntry2");
+			label = new Label ("E_ntry2");
 			table.Attach (label,0,1,1,2);
 			entry2 = new Entry ();
 			table.Attach (entry2, 1, 2, 1, 2);
@@ -119,14 +119,14 @@
 			table.ColumnSpacing = 4;
 			hbox.PackStart (table, false, false, 0);
 
-			Label label = Label.NewWithMnemonic ("_Entry1");
+			Label label = new Label ("_Entry1");
 			table.Attach (label, 0, 1, 0, 1);
 			Entry localEntry1 = new Entry();
 			localEntry1.Text = entry1.Text;
 			table.Attach (localEntry1, 1, 2, 0, 1);
 			label.MnemonicWidget = localEntry1;
 
-			label = Label.NewWithMnemonic ("E_ntry2");
+			label = new Label ("E_ntry2");
 			table.Attach (label, 0, 1, 1, 2);
 			Entry localEntry2 = new Entry();
 			localEntry2.Text = entry2.Text;
Index: sample/GtkDemo/DemoMain.cs
===================================================================
RCS file: /mono/gtk-sharp/sample/GtkDemo/DemoMain.cs,v
retrieving revision 1.2
diff -u -r1.2 DemoMain.cs
--- sample/GtkDemo/DemoMain.cs	2 Nov 2003 20:35:55 -0000	1.2
+++ sample/GtkDemo/DemoMain.cs	11 Jan 2004 03:49:46 -0000
@@ -50,8 +50,8 @@
 			Notebook notebook = new Notebook ();
 			hbox.PackStart (notebook, true, true, 0);
 
-			notebook.AppendPage (CreateText (infoBuffer, false), Label.NewWithMnemonic ("_Info"));
-			notebook.AppendPage (CreateText (sourceBuffer, true), Label.NewWithMnemonic ("_Source"));
+			notebook.AppendPage (CreateText (infoBuffer, false), new Label ("_Info"));
+			notebook.AppendPage (CreateText (sourceBuffer, true), new Label ("_Source"));
 
 			window.ShowAll ();
 		}
Index: sample/GtkDemo/DemoSizeGroup.cs
===================================================================
RCS file: /mono/gtk-sharp/sample/GtkDemo/DemoSizeGroup.cs,v
retrieving revision 1.2
diff -u -r1.2 DemoSizeGroup.cs
--- sample/GtkDemo/DemoSizeGroup.cs	20 Nov 2003 01:07:35 -0000	1.2
+++ sample/GtkDemo/DemoSizeGroup.cs	11 Jan 2004 03:49:46 -0000
@@ -109,7 +109,7 @@
 
  		private void AddRow (Table table, uint row, SizeGroup sizeGroup, string labelText, string [] options)
  		{
- 			Label label = Label.NewWithMnemonic (labelText);
+ 			Label label = new Label (labelText);
  			label.SetAlignment (0, 1);
 
 			table.Attach (label,

--=-X2Zmcp8hG2gLqMoD5p/x--