[cheese/three-point-oh] Cleaned up GConf wrapper, and Camera device is now read from GConf



commit bb40845015a93367f169b43922193395d49da006
Author: Yuvi Panda <yuvipanda gmail com>
Date:   Thu Jun 10 13:31:29 2010 +0530

    Cleaned up GConf wrapper, and Camera device is now read from GConf

 valasrc/cheese-window.vala      |    9 +++--
 valasrc/vapi/cheese-common.vapi |   61 ++++++++++++++++++++-------------------
 2 files changed, 36 insertions(+), 34 deletions(-)
---
diff --git a/valasrc/cheese-window.vala b/valasrc/cheese-window.vala
index 32022af..f9d0226 100644
--- a/valasrc/cheese-window.vala
+++ b/valasrc/cheese-window.vala
@@ -56,6 +56,7 @@ public class Cheese.MainWindow : Gtk.Window {
 	private Cheese.Camera camera;
 	private Cheese.FileUtil fileutil;
 	private Cheese.Flash flash;
+	private Cheese.GConf conf;
 	
 	[CCode (instance_pos = -1)]
 	internal void on_quit (Action action ) {
@@ -386,16 +387,16 @@ public class Cheese.MainWindow : Gtk.Window {
 		viewport.add_actor(viewport_layout);
 
 		viewport.allocation_changed.connect(on_stage_resize);
-	   		
-		
+	   				
 		thumb_view = new Cheese.ThumbView();
 		thumb_nav = new Eog.ThumbNav(thumb_view, false);
 		
 		viewport.show_all();
 
-		camera.setup("/dev/video0");
+		camera.setup(conf.camera);
 		camera.play();
-		set_wide_mode(false, true);
+
+		set_wide_mode(true, true);
 		set_mode(MediaMode.PHOTO);
 		
 		this.add(main_vbox);
diff --git a/valasrc/vapi/cheese-common.vapi b/valasrc/vapi/cheese-common.vapi
index 2742d96..c09bdd0 100644
--- a/valasrc/vapi/cheese-common.vapi
+++ b/valasrc/vapi/cheese-common.vapi
@@ -94,37 +94,38 @@ namespace Cheese {
 	public class GConf : GLib.Object {
 		[CCode (has_construct_function = false)]
 		public GConf ();
-		[NoAccessorMethod]
-		public double gconf_prop_brightness { get; set; }
-		[NoAccessorMethod]
-		public int gconf_prop_burst_delay { get; set; }
-		[NoAccessorMethod]
-		public int gconf_prop_burst_repeat { get; set; }
-		[NoAccessorMethod]
-		public string gconf_prop_camera { owned get; set; }
-		[NoAccessorMethod]
-		public double gconf_prop_contrast { get; set; }
-		[NoAccessorMethod]
-		public bool gconf_prop_countdown { get; set; }
-		[NoAccessorMethod]
-		public bool gconf_prop_enable_delete { get; set; }
-		[NoAccessorMethod]
-		public double gconf_prop_hue { get; set; }
-		[NoAccessorMethod]
-		public string gconf_prop_photo_path { owned get; set; }
-		[NoAccessorMethod]
-		public double gconf_prop_saturation { get; set; }
-		[NoAccessorMethod]
-		public string gconf_prop_selected_effects { owned get; set; }
-		[NoAccessorMethod]
-		public string gconf_prop_video_path { owned get; set; }
-		[NoAccessorMethod]
-		public bool gconf_prop_wide_mode { get; set; }
-		[NoAccessorMethod]
-		public int gconf_prop_x_resolution { get; set; }
-		[NoAccessorMethod]
-		public int gconf_prop_y_resolution { get; set; }
+		[NoAccessorMethod, CCode (cname="gconf_prop_brightness")]
+		public double brightness { get; set; }
+		[NoAccessorMethod, CCode (cname="gconf_prop_burst_delay")]
+		public int burst_delay { get; set; }
+		[NoAccessorMethod, CCode (cname="gconf_prop_burst_repeat")]
+		public int burst_repeat { get; set; }
+		[NoAccessorMethod, CCode (cname="gconf_prop_camera")]
+		public string camera { owned get; set; }
+		[NoAccessorMethod, CCode (cname="gconf_prop_contrast")]
+		public double contrast { get; set; }
+		[NoAccessorMethod, CCode (cname="gconf_prop_countdown")]
+		public bool countdown { get; set; }
+		[NoAccessorMethod, CCode (cname="gconf_prop_enable_delete")]
+		public bool enable_delete { get; set; }
+		[NoAccessorMethod, CCode (cname="gconf_prop_hue")]
+		public double hue { get; set; }
+		[NoAccessorMethod, CCode (cname="gconf_prop_photo_path")]
+		public string photo_path { owned get; set; }
+		[NoAccessorMethod, CCode (cname="gconf_prop_saturation")]
+		public double saturation { get; set; }
+		[NoAccessorMethod, CCode (cname="gconf_prop_selected_effects")]
+		public string selected_effects { owned get; set; }
+		[NoAccessorMethod, CCode (cname="gconf_prop_video_path")]
+		public string video_path { owned get; set; }
+		[NoAccessorMethod, CCode (cname="gconf_prop_wide_mode")]
+		public bool wide_mode { get; set; }
+		[NoAccessorMethod, CCode (cname="gconf_prop_x_resolution")]
+		public int x_resolution { get; set; }
+		[NoAccessorMethod, CCode (cname="gconf_prop_y_resolution")]
+		public int y_resolution { get; set; }
 	}
+	
 	[Compact]
 	[CCode (type_id = "CHEESE_TYPE_VIDEO_FORMAT", cheader_filename = "cheese-camera-device.h")]
 	public class VideoFormat {



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