Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/xwt.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLluis Sanchez <lluis@xamarin.com>2012-01-11 23:03:40 +0400
committerLluis Sanchez <lluis@xamarin.com>2012-01-11 23:06:32 +0400
commitb521d65957699b475e782e2e9ca451331f2a0264 (patch)
tree1c94fd094b564796bf4b789e01b3b8849677bcfb /Xwt.Gtk/Xwt.GtkBackend/ButtonBackend.cs
parent804b4f6fa519267ad9c38165b0f89b200b69c8b8 (diff)
Don't fire the click event when changing the Active property.
Diffstat (limited to 'Xwt.Gtk/Xwt.GtkBackend/ButtonBackend.cs')
-rwxr-xr-xXwt.Gtk/Xwt.GtkBackend/ButtonBackend.cs10
1 files changed, 7 insertions, 3 deletions
diff --git a/Xwt.Gtk/Xwt.GtkBackend/ButtonBackend.cs b/Xwt.Gtk/Xwt.GtkBackend/ButtonBackend.cs
index b8e3a728..caef5967 100755
--- a/Xwt.Gtk/Xwt.GtkBackend/ButtonBackend.cs
+++ b/Xwt.Gtk/Xwt.GtkBackend/ButtonBackend.cs
@@ -32,6 +32,8 @@ namespace Xwt.GtkBackend
{
public class ButtonBackend: WidgetBackend, IButtonBackend
{
+ protected bool ignoreClickEvents;
+
public ButtonBackend ()
{
}
@@ -152,9 +154,11 @@ namespace Xwt.GtkBackend
void HandleWidgetClicked (object sender, EventArgs e)
{
- Toolkit.Invoke (delegate {
- EventSink.OnClicked ();
- });
+ if (!ignoreClickEvents) {
+ Toolkit.Invoke (delegate {
+ EventSink.OnClicked ();
+ });
+ }
}
}
}