[cheese/cheese-vala] Update for vala 0.7



commit 2e79df33e4f91f24e48f247ec569e835c7e8e000
Author: Jaap A. Haitsma <jaap haitsma org>
Date:   Sun Apr 19 00:16:14 2009 +0200

    Update for vala 0.7
---
 src/cheese-effect-chooser.vala |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/src/cheese-effect-chooser.vala b/src/cheese-effect-chooser.vala
index 088a8c0..df7319a 100644
--- a/src/cheese-effect-chooser.vala
+++ b/src/cheese-effect-chooser.vala
@@ -137,7 +137,7 @@ public class Cheese.CairoContext : Cairo.Context {
 
 		set_font_size (0.09);
 		TextExtents extents;
-		text_extents (effect_data.name, ref extents);
+		text_extents (effect_data.name, out extents);
 		int x = (int)(0.5 - (extents.width / 2 + extents.x_bearing));
 		int y = (int)(0.92 - (extents.height / 2 + extents.y_bearing));
 
@@ -164,12 +164,12 @@ public class Cheese.EffectChooser : DrawingArea {
 	public Effect effect {get; set;}
 		
 	construct {
-		add_event (EventMask.BUTTON_PRESS_MASK);
+		add_events (EventMask.BUTTON_PRESS_MASK);
 		button_press_event += on_button_press;
 		expose_event += on_expose;
 		selected[0] = false;
 		for (int i = 1;  i < NUM_EFFECTS; i++) {
-			selected[i] = effect & (1 << (i - 1)) != 0;
+			selected[i] = (effect & (1 << (i - 1))) != 0;
 		}
 	}
 
@@ -204,7 +204,7 @@ public class Cheese.EffectChooser : DrawingArea {
 		return true;
 	}
 	
-	bool on_button_press (Gdk.EventButton event) {
+	bool on_button_press (Widget sender, Gdk.EventButton event) {
 		int col = (int) (event.x / allocation.width * BOARD_COLS);
 		int row = (int) (event.y / allocation.height * BOARD_ROWS);
 		int slot = (row * BOARD_COLS + col);
@@ -216,6 +216,7 @@ public class Cheese.EffectChooser : DrawingArea {
 				selected[i] = false;
 		}
 		queue_draw ();
+		return true;
 	}
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]