aboutsummaryrefslogtreecommitdiff
path: root/src/flat-button.vala
diff options
context:
space:
mode:
authorRobert Ancell <robert.ancell@canonical.com>2014-11-04 15:54:24 +1300
committerMike Gabriel <mike.gabriel@das-netzwerkteam.de>2015-10-27 17:02:38 +0100
commit138bf144001e5a4aa3536ef4da8ef3312b53ba8a (patch)
tree83d3fe6f0ab23872a32b370b5c7e475c54bfd100 /src/flat-button.vala
parentc1726b336b0cdb3844cc28527584f885f21e6a4d (diff)
downloadarctica-greeter-138bf144001e5a4aa3536ef4da8ef3312b53ba8a.tar.gz
arctica-greeter-138bf144001e5a4aa3536ef4da8ef3312b53ba8a.tar.bz2
arctica-greeter-138bf144001e5a4aa3536ef4da8ef3312b53ba8a.zip
Don't use deprecated Gtk.Widget API
Ported to ArcticaGreeter: Mike Gabriel <mike.gabriel@das-netzwerkteam.de>
Diffstat (limited to 'src/flat-button.vala')
-rw-r--r--src/flat-button.vala9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/flat-button.vala b/src/flat-button.vala
index 1ce23a7..e11647e 100644
--- a/src/flat-button.vala
+++ b/src/flat-button.vala
@@ -46,21 +46,22 @@ public class FlatButton : Gtk.Button
return base.draw (c);
}
- public override void pressed ()
+ public override bool button_press_event (Gdk.EventButton event)
{
// Do nothing. The normal handler sets priv->button_down which
// internally causes draw() to draw a special border and background
// that we don't want.
did_press = true;
+ return true;
}
- public override void released ()
+ public override bool button_release_event (Gdk.EventButton event)
{
if (did_press)
{
- base.pressed (); // fake an insta-click
+ base.button_press_event (event); // fake an insta-click
did_press = false;
}
- base.released ();
+ return base.button_release_event (event);
}
}