2002-07-18 Duncan Mak <duncan@ximian.com>

* TestMenus.cs: Use null instead of new SList (IntPtr.Zero); and
	remove try... catch block.

svn path=/trunk/gtk-sharp/; revision=5879
This commit is contained in:
Duncan Mak 2002-07-17 18:31:51 +00:00
parent d789d80bc0
commit 6f5bbc2259
2 changed files with 9 additions and 8 deletions

View File

@ -1,3 +1,8 @@
2002-07-18 Duncan Mak <duncan@ximian.com>
* TestMenus.cs: Use null instead of new SList (IntPtr.Zero); and
remove try... catch block.
2002-07-18 Duncan Mak <duncan@ximian.com> 2002-07-18 Duncan Mak <duncan@ximian.com>
* TestCheckButton.cs: * TestCheckButton.cs:
@ -5,6 +10,7 @@
* TestFileSelection.cs: * TestFileSelection.cs:
* TestFlipping.cs: * TestFlipping.cs:
* TestMenus.cs: * TestMenus.cs:
* TestRadioButton.cs: * TestRadioButton.cs:
* TestRange.cs: * TestRange.cs:
* TestStatusbar.cs: * TestStatusbar.cs:

View File

@ -110,7 +110,7 @@ namespace WidgetViewer {
Menu menu = new Menu (); Menu menu = new Menu ();
MenuItem menuitem = null; MenuItem menuitem = null;
string label = null; string label = null;
GLib.SList group = new GLib.SList (IntPtr.Zero); GLib.SList group = null;
if (tearoff) { if (tearoff) {
menuitem = new TearoffMenuItem (); menuitem = new TearoffMenuItem ();
@ -122,11 +122,8 @@ namespace WidgetViewer {
label = String.Format ("item {0} - {1}", depth, j); label = String.Format ("item {0} - {1}", depth, j);
Console.WriteLine ("label: " + label); Console.WriteLine ("label: " + label);
try { menuitem = RadioMenuItem.NewWithLabel (group, label);
menuitem = RadioMenuItem.NewWithLabel (group, label);
} catch (Exception e) {
Console.WriteLine (e);
}
group = ((RadioMenuItem) menuitem).Group; group = ((RadioMenuItem) menuitem).Group;
Console.WriteLine ("Pass"); Console.WriteLine ("Pass");
@ -146,9 +143,7 @@ namespace WidgetViewer {
static void Close_Button (object o, EventArgs args) static void Close_Button (object o, EventArgs args)
{ {
SignalArgs sa = (SignalArgs) args;
window.Destroy (); window.Destroy ();
sa.RetVal = true;
} }
} }
} }