windowsclone: Transform some lambdas to override-methods

This commit is contained in:
Rico Tzschichholz 2015-03-12 14:14:26 +01:00
parent 24bd250891
commit 8ddf5cf111

View File

@ -122,14 +122,6 @@ namespace Gala
close_window ();
return true;
});
enter_event.connect (() => {
close_button.opacity = 255;
return false;
});
leave_event.connect (() => {
close_button.opacity = 0;
return false;
});
window_icon = new WindowIcon (window, WINDOW_ICON_SIZE);
window_icon.opacity = 0;
@ -146,11 +138,6 @@ namespace Gala
load_clone ();
}
public override bool button_press_event (Clutter.ButtonEvent event)
{
return true;
}
~WindowClone ()
{
window.unmanaged.disconnect (unmanaged);
@ -390,6 +377,25 @@ namespace Gala
clone.allocate (alloc, flags);
}
public override bool button_press_event (Clutter.ButtonEvent event)
{
return true;
}
public override bool enter_event (Clutter.CrossingEvent event)
{
close_button.opacity = 255;
return false;
}
public override bool leave_event (Clutter.CrossingEvent event)
{
close_button.opacity = 0;
return false;
}
/**
* Place the widgets, that is the close button and the WindowIcon of the window,
* at their positions inside the actor for a given width and height.