[cheese/three-point-oh] Flash works



commit c014df9229b7d8898526ad44b4db985af12d4a57
Author: Yuvi Panda <yuvipanda gmail com>
Date:   Wed Jun 9 22:23:37 2010 +0530

    Flash works

 valasrc/cheese-window.vala      |    3 +++
 valasrc/vapi/cheese-common.vapi |    5 ++---
 2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/valasrc/cheese-window.vala b/valasrc/cheese-window.vala
index 5ce6d43..32022af 100644
--- a/valasrc/cheese-window.vala
+++ b/valasrc/cheese-window.vala
@@ -55,6 +55,7 @@ public class Cheese.MainWindow : Gtk.Window {
 
 	private Cheese.Camera camera;
 	private Cheese.FileUtil fileutil;
+	private Cheese.Flash flash;
 	
 	[CCode (instance_pos = -1)]
 	internal void on_quit (Action action ) {
@@ -273,6 +274,7 @@ public class Cheese.MainWindow : Gtk.Window {
 	
 	internal void take_photo() {
 		string file_name = fileutil.get_new_media_filename(this.current_mode);
+		flash.fire();
 		camera.take_photo(file_name);
 	}
 
@@ -329,6 +331,7 @@ public class Cheese.MainWindow : Gtk.Window {
 		gtk_builder = new Gtk.Builder();
 		clutter_builder = new Clutter.Script();
 		fileutil = new FileUtil();
+		flash = new Flash(this);
 
 		gtk_builder.add_from_file (GLib.Path.build_filename (Config.PACKAGE_DATADIR, "cheese-actions.ui"));
 		gtk_builder.add_from_file (GLib.Path.build_filename (Config.PACKAGE_DATADIR, "cheese-about.ui"));
diff --git a/valasrc/vapi/cheese-common.vapi b/valasrc/vapi/cheese-common.vapi
index 38ccb96..2742d96 100644
--- a/valasrc/vapi/cheese-common.vapi
+++ b/valasrc/vapi/cheese-common.vapi
@@ -83,14 +83,13 @@ namespace Cheese {
 		public void reset_burst ();
 	}
 	
-	[Compact]
 	[CCode (cheader_filename = "cheese-flash.h")]
-	public class Flash {
-		public weak GLib.Object parent_instance;
+	public class Flash : GLib.Object {
 		[CCode (has_construct_function = false)]
 		public Flash (Gtk.Widget parent);
 		public void fire ();
 	}
+	
 	[CCode (cheader_filename = "cheese-gconf.h")]
 	public class GConf : GLib.Object {
 		[CCode (has_construct_function = false)]



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