diff --git a/sample/CanvasExample.cs b/sample/CanvasExample.cs index 43197a545..4aaf8294f 100644 --- a/sample/CanvasExample.cs +++ b/sample/CanvasExample.cs @@ -100,7 +100,6 @@ namespace GtkSamples { void Item_Event (object obj, GnomeSharp.CanvasEventArgs args) { EventButton ev = EventButton.New (args.Event.Handle); - SignalArgs sa = (SignalArgs) args; CanvasRE item = (CanvasRE) obj; switch (ev.type) { @@ -108,17 +107,17 @@ namespace GtkSamples { if (ev.button == 1) { remember_x = ev.x; remember_y = ev.y; - sa.RetVal = true; + args.RetVal = true; return; } else if (ev.button == 3) { item.Destroy (); - sa.RetVal = true; + args.RetVal = true; return; } break; case EventType.TwoButtonPress: ChangeItemColor (item); - sa.RetVal = true; + args.RetVal = true; return; case EventType.MotionNotify: Gdk.ModifierType state = (Gdk.ModifierType) ev.state; @@ -127,21 +126,21 @@ namespace GtkSamples { item.Move (new_x - remember_x, new_y - remember_y); remember_x = new_x; remember_y = new_y; - sa.RetVal = true; + args.RetVal = true; return; } break; case EventType.EnterNotify: item.WidthUnits = 3.0; - sa.RetVal = true; + args.RetVal = true; return; case EventType.LeaveNotify: item.WidthUnits = 1.0; - sa.RetVal = true; + args.RetVal = true; return; } - sa.RetVal = false; + args.RetVal = false; return; } @@ -152,9 +151,8 @@ namespace GtkSamples { void Window_Delete (object obj, DeleteEventArgs args) { - SignalArgs sa = (SignalArgs) args; Application.Quit (); - sa.RetVal = true; + args.RetVal = true; } public static int Main (string[] args) diff --git a/sample/GnomeHelloWorld.cs b/sample/GnomeHelloWorld.cs index 65f771e04..371a1d7f5 100644 --- a/sample/GnomeHelloWorld.cs +++ b/sample/GnomeHelloWorld.cs @@ -120,9 +120,8 @@ namespace GtkSamples { static void Window_Delete (object obj, DeleteEventArgs args) { - SignalArgs sa = (SignalArgs) args; Application.Quit (); - sa.RetVal = true; + args.RetVal = true; } static void exit_cb (object o, EventArgs args) diff --git a/sample/HelloWorld.cs b/sample/HelloWorld.cs index c4c946ee5..ce0191589 100755 --- a/sample/HelloWorld.cs +++ b/sample/HelloWorld.cs @@ -25,9 +25,8 @@ namespace GtkSamples { static void Window_Delete (object obj, DeleteEventArgs args) { - SignalArgs sa = (SignalArgs) args; Application.Quit (); - sa.RetVal = true; + args.RetVal = true; } } diff --git a/sample/Menu.cs b/sample/Menu.cs index fb0549e1e..6b5ecb570 100755 --- a/sample/Menu.cs +++ b/sample/Menu.cs @@ -43,9 +43,8 @@ namespace GtkSharp.Samples { static void delete_cb (object o, DeleteEventArgs args) { - SignalArgs sa = (SignalArgs) args; Application.Quit (); - sa.RetVal = true; + args.RetVal = true; } static void exit_cb (object o, EventArgs args) diff --git a/sample/Scribble.cs b/sample/Scribble.cs index 065b380f3..28909ce97 100644 --- a/sample/Scribble.cs +++ b/sample/Scribble.cs @@ -42,9 +42,8 @@ namespace GtkSamples { static void Window_Delete (object obj, DeleteEventArgs args) { - SignalArgs sa = (SignalArgs) args; Application.Quit (); - sa.RetVal = true; + args.RetVal = true; } static void ExposeEvent (object obj, ExposeEventArgs args) @@ -60,8 +59,7 @@ namespace GtkSamples { area.x, area.y, area.width, area.height); - SignalArgs sa = (SignalArgs) args; - sa.RetVal = false; + args.RetVal = false; } static void ConfigureEvent (object obj, ConfigureEventArgs args) @@ -79,8 +77,7 @@ namespace GtkSamples { pixmap.DrawRectangle (darea.Style.WhiteGC, true, 0, 0, allocation.width, allocation.height); - SignalArgs sa = (SignalArgs) args; - sa.RetVal = true; + args.RetVal = true; } static void DrawBrush (double x, double y) @@ -104,8 +101,7 @@ namespace GtkSamples { if (ev.button == 1 && pixmap != null) DrawBrush (ev.x, ev.y); - SignalArgs sa = (SignalArgs) args; - sa.RetVal = true; + args.RetVal = true; } static void MotionNotifyEvent (object obj, MotionNotifyEventArgs args) @@ -128,8 +124,7 @@ namespace GtkSamples { if ((state & Gdk.ModifierType.Button1Mask) != 0 && pixmap != null) DrawBrush (x, y); - SignalArgs sa = (SignalArgs) args; - sa.RetVal = true; + args.RetVal = true; } } } diff --git a/sample/Size.cs b/sample/Size.cs index f3f218bf0..0e895b56f 100644 --- a/sample/Size.cs +++ b/sample/Size.cs @@ -26,9 +26,8 @@ namespace GtkSamples { static void Window_Delete (object obj, DeleteEventArgs args) { - SignalArgs sa = (SignalArgs) args; Application.Quit (); - sa.RetVal = true; + args.RetVal = true; } static void Size_Allocated (object obj, SizeAllocatedArgs args)