2004-01-10 John Luke <jluke@cfl.rr.com>

* samples/GtkDemo/*.cs: make it compile
	patch from Yves Kurz <ml_yves@magnific.ch>

svn path=/trunk/gtk-sharp/; revision=21925
This commit is contained in:
John Luke 2004-01-11 02:58:08 +00:00
parent bed0c03a8d
commit a5b70aa2f9
7 changed files with 24 additions and 13 deletions

View File

@ -1,3 +1,8 @@
2004-01-10 John Luke <jluke@cfl.rr.com>
* samples/GtkDemo/*.cs: make it compile
patch from Yves Kurz <ml_yves@magnific.ch>
2004-01-09 Mike Kestner <mkestner@ximian.com>
* gtk/Gtk.metadata : hide NotebookPage.Num method

View File

@ -65,13 +65,13 @@ namespace GtkDemo
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 @@ namespace GtkDemo
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;

View File

@ -50,8 +50,8 @@ namespace GtkDemo
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 ();
}

View File

@ -94,16 +94,22 @@ namespace GtkDemo
menuitem = new CheckMenuItem ("Accelerate Me");
menu.Append (menuitem);
menuitem.AddAccelerator ("activate", accel_group, 0xFFBE, 0, AccelFlags.Visible);
AccelKey ak = new AccelKey ();
ak.accel_key = 0xFFBE;
menuitem.AddAccelerator ("activate", accel_group, ak, 0, AccelFlags.Visible);
menuitem = new CheckMenuItem ("Accelerator locked");
menu.Append (menuitem);
menuitem.AddAccelerator ("activate", accel_group, 0xFFBF, 0, AccelFlags.Visible | AccelFlags.Locked);
AccelKey ak2 = new AccelKey ();
ak2.accel_key = 0xFFBF;
menuitem.AddAccelerator ("activate", accel_group, ak2, 0, AccelFlags.Visible | AccelFlags.Locked);
menuitem = new CheckMenuItem ("Accelerator Frozen");
menu.Append (menuitem);
menuitem.AddAccelerator ("activate", accel_group, 0xFFBF, 0, AccelFlags.Visible);
menuitem.AddAccelerator ("activate", accel_group, 0xFFC0, 0, AccelFlags.Visible);
AccelKey ak3 = new AccelKey ();
ak3.accel_key = 0xFFC0;
menuitem.AddAccelerator ("activate", accel_group, ak2, 0, AccelFlags.Visible);
menuitem.AddAccelerator ("activate", accel_group, ak3, 0, AccelFlags.Visible);
OptionMenu option_menu = new OptionMenu ();
option_menu.Menu = menu;

View File

@ -109,7 +109,7 @@ namespace GtkDemo
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,

View File

@ -3,7 +3,7 @@ CSC = mcs
DLLS = /r:gtk-sharp.dll /r:glib-sharp.dll /r:pango-sharp.dll /r:gdk-sharp.dll /r:System.Drawing.dll
all:
all: *.cs
$(CSC) -g /out:GtkDemo.exe *.cs $(DLLS)
clean:

View File

@ -1,4 +1,4 @@
This port of gtk-demo.c is still INCOMPLETE. If you can't contribute to it
This port of gtk-demo.c is still INCOMPLETE. If you can contribute to it
don't hesistate to mail your patches at the gtk-sharp-list@lists.ximian.com