diff --git a/sample/test/ChangeLog b/sample/test/ChangeLog index a7accc51a..df637c90c 100644 --- a/sample/test/ChangeLog +++ b/sample/test/ChangeLog @@ -1,3 +1,13 @@ +2002-07-23 Duncan Mak + + * TestMenus.cs: Use MenuItem instead of ImageMenuItem, this test + works now. + + * TestFileSelection.cs: window.Selections is crashing, remove + it. OK Button doesn't do anything now. + + * WidgetViewer.cs: Add in a frame. + 2002-07-20 Duncan Mak * TestSizeGroup.cs: Minor aesthetic changes. diff --git a/sample/test/Makefile b/sample/test/Makefile index 3a99239bb..f50df4325 100644 --- a/sample/test/Makefile +++ b/sample/test/Makefile @@ -7,4 +7,4 @@ all: TestDialog.cs TestFlipping.cs TestMenus.cs TestSizeGroup.cs \ WidgetViewer.cs clean: - rm -f *.exe *~ + rm -f *.exe diff --git a/sample/test/TestFileSelection.cs b/sample/test/TestFileSelection.cs index 2b70d499b..f97d9c9e6 100644 --- a/sample/test/TestFileSelection.cs +++ b/sample/test/TestFileSelection.cs @@ -39,7 +39,6 @@ namespace WidgetViewer { static void file_selection_ok (object o, EventArgs args) { - Console.WriteLine (window.Selections); } static void show_fileops (object o, EventArgs args) diff --git a/sample/test/TestMenus.cs b/sample/test/TestMenus.cs index 61b56c984..7a439ad93 100644 --- a/sample/test/TestMenus.cs +++ b/sample/test/TestMenus.cs @@ -30,13 +30,11 @@ namespace WidgetViewer { box1.PackStart (menubar, false, false, 0); Menu menu = Create_Menu (2, true); - - MenuItem menuitem = new MenuItem ("test\nline2"); - + MenuItem menuitem = new MenuItem ("foo"); menuitem.Submenu = menu; menubar.Append (menuitem); - menuitem = new MenuItem ("foo"); + menuitem = new MenuItem ("bar"); menuitem.Submenu = Create_Menu (3, true); menubar.Append (menuitem); @@ -59,7 +57,7 @@ namespace WidgetViewer { VBox box2 = new VBox (false, 10); box2.BorderWidth = 10; - box1.PackStart (box1, true, true, 0); + box1.PackStart (box2, true, true, 0); menu = Create_Menu (1, false); menu.AccelGroup = accel_group; @@ -103,14 +101,13 @@ namespace WidgetViewer { static Menu Create_Menu (int depth, bool tearoff) { - Console.WriteLine ("Depth: " + depth); if (depth < 1) return null; Menu menu = new Menu (); MenuItem menuitem = null; string label = null; - GLib.SList group = null; + GLib.SList group = new GLib.SList (IntPtr.Zero); if (tearoff) { menuitem = new TearoffMenuItem (); @@ -121,12 +118,9 @@ namespace WidgetViewer { for (int i = 0, j = 1; i < 5; i++, j++) { label = String.Format ("item {0} - {1}", depth, j); - Console.WriteLine ("label: " + label); - menuitem = RadioMenuItem.NewWithLabel (group, label); - - - group = ((RadioMenuItem) menuitem).Group; - Console.WriteLine ("Pass"); +// menuitem = RadioMenuItem.NewWithLabel (group, label); +// group = ((RadioMenuItem) menuitem).Group; + menuitem = new MenuItem (label); menu.Append (menuitem); if (i == 3) diff --git a/sample/test/WidgetViewer.cs b/sample/test/WidgetViewer.cs index a8eaa3010..536ad1306 100644 --- a/sample/test/WidgetViewer.cs +++ b/sample/test/WidgetViewer.cs @@ -28,10 +28,15 @@ namespace WidgetViewer { VBox box1 = new VBox (false, 0); window.Add (box1); - + box2 = new VBox (false, 5); box2.BorderWidth = 10; - box1.PackStart (box2, true, true, 0); + + Frame frame = new Frame ("Select a widget"); + frame.BorderWidth = 5; + frame.Add (box2); + + box1.PackStart (frame, true, true, 0); AddButton ("Bi-directional flipping", new EventHandler (Flipping)); AddButton ("Check Buttons", new EventHandler (Check_Buttons)); @@ -82,6 +87,7 @@ namespace WidgetViewer { static void Viewer_Delete (object o, DeleteEventArgs args) { viewer.Destroy (); + viewer = null; args.RetVal = true; }