[monet/vala] [gtk] fix the prototypes of functions overriding parent functions
- From: Thomas Wood <thos src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [monet/vala] [gtk] fix the prototypes of functions overriding parent functions
- Date: Wed, 23 Dec 2009 18:11:01 +0000 (UTC)
commit ac95b01f87fe301fab7a61067337b301b419cc53
Author: Thomas Wood <thomas pepper localdomain>
Date: Wed Dec 23 17:57:26 2009 +0000
[gtk] fix the prototypes of functions overriding parent functions
monet-gtk/mn-gtk-rcstyle.vala | 4 ++--
monet-gtk/mn-gtk-style.vala | 16 +++++++++++-----
2 files changed, 13 insertions(+), 7 deletions(-)
---
diff --git a/monet-gtk/mn-gtk-rcstyle.vala b/monet-gtk/mn-gtk-rcstyle.vala
index a633f11..1b3a3b2 100644
--- a/monet-gtk/mn-gtk-rcstyle.vala
+++ b/monet-gtk/mn-gtk-rcstyle.vala
@@ -4,9 +4,9 @@ namespace Monet
{
public class RcStyle : Gtk.RcStyle
{
- public Gtk.Style create_style ()
+ public override weak Gtk.Style create_style ()
{
- return new Monet.Style ();
+ return (Gtk.Style*) new Monet.Style ();
}
}
}
diff --git a/monet-gtk/mn-gtk-style.vala b/monet-gtk/mn-gtk-style.vala
index 270f87e..0beef34 100644
--- a/monet-gtk/mn-gtk-style.vala
+++ b/monet-gtk/mn-gtk-style.vala
@@ -5,12 +5,18 @@ namespace Monet
{
public class Style : Gtk.Style
{
- public void draw_box (Gtk.Window window,
- Gtk.StateType state_type, Gtk.ShadowType shadow_type,
- Gdk.Rectangle area, Gtk.Widget widget, string detail,
- int x, int y, int width, int height)
+ public override void draw_box (Gdk.Window window,
+ Gtk.StateType state_type,
+ Gtk.ShadowType shadow_type,
+ Gdk.Rectangle area,
+ Gtk.Widget widget,
+ string detail,
+ int x,
+ int y,
+ int width,
+ int height)
{
- stdout.printf ("draw_box");
+ stdout.printf ("draw %s\n", detail);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]