From 6f5bbc2259573bf143b5ba8ea3c6530ec57cb0b5 Mon Sep 17 00:00:00 2001 From: Duncan Mak Date: Wed, 17 Jul 2002 18:31:51 +0000 Subject: [PATCH] 2002-07-18 Duncan Mak * TestMenus.cs: Use null instead of new SList (IntPtr.Zero); and remove try... catch block. svn path=/trunk/gtk-sharp/; revision=5879 --- sample/test/ChangeLog | 6 ++++++ sample/test/TestMenus.cs | 11 +++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/sample/test/ChangeLog b/sample/test/ChangeLog index 2d5c6c609..1d897228a 100644 --- a/sample/test/ChangeLog +++ b/sample/test/ChangeLog @@ -1,3 +1,8 @@ +2002-07-18 Duncan Mak + + * TestMenus.cs: Use null instead of new SList (IntPtr.Zero); and + remove try... catch block. + 2002-07-18 Duncan Mak * TestCheckButton.cs: @@ -5,6 +10,7 @@ * TestFileSelection.cs: * TestFlipping.cs: * TestMenus.cs: + * TestRadioButton.cs: * TestRange.cs: * TestStatusbar.cs: diff --git a/sample/test/TestMenus.cs b/sample/test/TestMenus.cs index f70e391a9..905f97633 100644 --- a/sample/test/TestMenus.cs +++ b/sample/test/TestMenus.cs @@ -110,7 +110,7 @@ namespace WidgetViewer { Menu menu = new Menu (); MenuItem menuitem = null; string label = null; - GLib.SList group = new GLib.SList (IntPtr.Zero); + GLib.SList group = null; if (tearoff) { menuitem = new TearoffMenuItem (); @@ -122,11 +122,8 @@ namespace WidgetViewer { label = String.Format ("item {0} - {1}", depth, j); Console.WriteLine ("label: " + label); - try { - menuitem = RadioMenuItem.NewWithLabel (group, label); - } catch (Exception e) { - Console.WriteLine (e); - } + menuitem = RadioMenuItem.NewWithLabel (group, label); + group = ((RadioMenuItem) menuitem).Group; Console.WriteLine ("Pass"); @@ -146,9 +143,7 @@ namespace WidgetViewer { static void Close_Button (object o, EventArgs args) { - SignalArgs sa = (SignalArgs) args; window.Destroy (); - sa.RetVal = true; } } }