diff --git a/sample/test/ChangeLog b/sample/test/ChangeLog index 58ba3f82e..2d5c6c609 100644 --- a/sample/test/ChangeLog +++ b/sample/test/ChangeLog @@ -1,3 +1,16 @@ +2002-07-18 Duncan Mak + + * TestCheckButton.cs: + * TestDialog.cs: + * TestFileSelection.cs: + * TestFlipping.cs: + * TestMenus.cs: + * TestRadioButton.cs: + * TestRange.cs: + * TestStatusbar.cs: + * TestTooltip.cs: Removed erroneous references to SignalArgs, and + changed EventHandlers to more appropriate specialized Handlers instead. + 2002-07-17 Duncan Mak * Makefile: diff --git a/sample/test/TestCheckButton.cs b/sample/test/TestCheckButton.cs index 3dcf958c3..3871634c2 100644 --- a/sample/test/TestCheckButton.cs +++ b/sample/test/TestCheckButton.cs @@ -61,9 +61,7 @@ namespace WidgetViewer { static void Close_Button (object o, EventArgs args) { - SignalArgs sa = (SignalArgs) args; window.Destroy (); - sa.RetVal = true; } } } diff --git a/sample/test/TestColorSelection.cs b/sample/test/TestColorSelection.cs index 4b0740fdf..7f8d096f8 100644 --- a/sample/test/TestColorSelection.cs +++ b/sample/test/TestColorSelection.cs @@ -78,11 +78,9 @@ namespace WidgetViewer { static void Color_Selection_Cancel (object o, EventArgs args) { - SignalArgs sa = (SignalArgs) args; if (dialog != null) dialog.Destroy (); window.Destroy (); - sa.RetVal = true; } static void Display_Result (Gdk.Color color) diff --git a/sample/test/TestDialog.cs b/sample/test/TestDialog.cs index 59cc510a4..71a176b9c 100644 --- a/sample/test/TestDialog.cs +++ b/sample/test/TestDialog.cs @@ -21,7 +21,7 @@ namespace WidgetViewer { public static Gtk.Window Create () { window = new Dialog (); - window.Response += new EventHandler (Print_Response); + window.Response += new ResponseHandler (Print_Response); window.SetDefaultSize (200, 100); window.Title = "GtkDialog"; @@ -46,16 +46,12 @@ namespace WidgetViewer { static void Close_Button (object o, EventArgs args) { - SignalArgs sa = (SignalArgs) args; window.Destroy (); - sa.RetVal = true; } - static void Print_Response (object o, EventArgs args) + static void Print_Response (object o, ResponseArgs args) { - SignalArgs sa = (SignalArgs) args; - Console.WriteLine ("Received response signal: " + sa.Args [1]); - sa.RetVal = true; + Console.WriteLine ("Received response signal: " + args.ResponseId); } static void Label_Toggle (object o, EventArgs args) diff --git a/sample/test/TestFileSelection.cs b/sample/test/TestFileSelection.cs index 3f6924b0b..2b70d499b 100644 --- a/sample/test/TestFileSelection.cs +++ b/sample/test/TestFileSelection.cs @@ -57,9 +57,7 @@ namespace WidgetViewer { static void file_selection_cancel (object o, EventArgs args) { - SignalArgs sa = (SignalArgs) args; window.Destroy (); - sa.RetVal = true; } } } diff --git a/sample/test/TestFlipping.cs b/sample/test/TestFlipping.cs index 1ecf7cc83..496244d8f 100644 --- a/sample/test/TestFlipping.cs +++ b/sample/test/TestFlipping.cs @@ -63,9 +63,7 @@ namespace WidgetViewer { static void Close_Button (object o, EventArgs args) { - SignalArgs sa = (SignalArgs) args; window.Destroy (); - sa.RetVal = true; } } } diff --git a/sample/test/TestMenus.cs b/sample/test/TestMenus.cs index 621c0dc27..f70e391a9 100644 --- a/sample/test/TestMenus.cs +++ b/sample/test/TestMenus.cs @@ -135,7 +135,10 @@ namespace WidgetViewer { if (i == 3) menuitem.Sensitive = false; - menuitem.Submenu = Create_Menu ((depth - 1), true); + Menu child = Create_Menu ((depth - 1), true); + + if (child != null) + menuitem.Submenu = child; } return menu; diff --git a/sample/test/TestRadioButton.cs b/sample/test/TestRadioButton.cs index b5028c880..346a23329 100644 --- a/sample/test/TestRadioButton.cs +++ b/sample/test/TestRadioButton.cs @@ -80,9 +80,7 @@ namespace WidgetViewer { static void Close_Button (object o, EventArgs args) { - SignalArgs sa = (SignalArgs) args; window.Destroy (); - sa.RetVal = true; } } } diff --git a/sample/test/TestRange.cs b/sample/test/TestRange.cs index 468a75bc4..0011ae922 100644 --- a/sample/test/TestRange.cs +++ b/sample/test/TestRange.cs @@ -88,9 +88,7 @@ namespace WidgetViewer { static void Close_Button (object o, EventArgs args) { - SignalArgs sa = (SignalArgs) args; window.Destroy (); - sa.RetVal = true; } static void reformat_value (object o, EventArgs args) diff --git a/sample/test/TestStatusbar.cs b/sample/test/TestStatusbar.cs index 5b7aa5384..d6d18e495 100644 --- a/sample/test/TestStatusbar.cs +++ b/sample/test/TestStatusbar.cs @@ -74,9 +74,7 @@ namespace WidgetViewer { static void Close_Button (object o, EventArgs args) { - SignalArgs sa = (SignalArgs) args; window.Destroy (); - sa.RetVal = true; } } } diff --git a/sample/test/TestTooltip.cs b/sample/test/TestTooltip.cs index e0fe0c2f2..c212f8247 100644 --- a/sample/test/TestTooltip.cs +++ b/sample/test/TestTooltip.cs @@ -30,9 +30,7 @@ namespace WidgetViewer { static void Window_Delete (object o, EventArgs args) { - SignalArgs sa = (SignalArgs) args; window.Destroy (); - sa.RetVal = true; } } }