[cheese/three-point-oh] Taking Photos works
- From: Yuvaraj Pandian <yuvipanda src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese/three-point-oh] Taking Photos works
- Date: Sun, 6 Jun 2010 22:28:34 +0000 (UTC)
commit ad19f0633e2a673304e7f46b6d30abb520a1f986
Author: Yuvaraj Pandian T <yuvipanda gmail com>
Date: Mon Jun 7 02:39:35 2010 +0530
Taking Photos works
valasrc/cheese-window.vala | 13 ++++++++++---
valasrc/vapi/cheese-common.vapi | 5 ++---
2 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/valasrc/cheese-window.vala b/valasrc/cheese-window.vala
index e7ccb63..029d509 100644
--- a/valasrc/cheese-window.vala
+++ b/valasrc/cheese-window.vala
@@ -41,6 +41,7 @@ public class Cheese.MainWindow : Gtk.Window {
private Gtk.Button[] buttons;
private Cheese.Camera camera;
+ private Cheese.FileUtil fileutil;
[CCode (instance_pos = -1)]
internal void on_quit (Action action ) {
@@ -224,7 +225,7 @@ public class Cheese.MainWindow : Gtk.Window {
[CCode (instance_pos = -1)]
internal void on_take_action (Action action ) {
- camera.take_photo("/home/yuvipanda/image.jpg");
+ camera.take_photo(fileutil.get_new_media_filename(this.current_mode));
}
public void setup_ui () {
@@ -265,15 +266,21 @@ public class Cheese.MainWindow : Gtk.Window {
take_action_button,
effects_toggle_button,
leave_fullscreen_button};
+
+ Clutter.Texture r = new Clutter.Texture();
+
+ camera = new Camera(r, "/dev/video0", 1024, 768);
+ fileutil = new FileUtil();
- Clutter.Texture r = new Clutter.Texture();
r.width = 600;
r.height = 600;
r.x = 0;
r.y = 0;
// r.color = Clutter.Color.from_string("Red");
viewport.add_actor(r);
- camera = new Camera(r, "/dev/video0", 1024, 768);
+
+
+
thumb_view = new Cheese.ThumbView();
thumb_nav = new Eog.ThumbNav(thumb_view, false);
diff --git a/valasrc/vapi/cheese-common.vapi b/valasrc/vapi/cheese-common.vapi
index a89395c..38ccb96 100644
--- a/valasrc/vapi/cheese-common.vapi
+++ b/valasrc/vapi/cheese-common.vapi
@@ -65,10 +65,8 @@ namespace Cheese {
}
- [Compact]
[CCode (cheader_filename = "cheese-fileutil.h")]
- public class FileUtil {
- public weak GLib.Object parent;
+ public class FileUtil : GLib.Object{
[CCode (cname = "cheese_fileutil_new", has_construct_function = false)]
public FileUtil ();
[CCode (cname = "cheese_fileutil_get_log_path")]
@@ -84,6 +82,7 @@ namespace Cheese {
[CCode (cname = "cheese_fileutil_reset_burst")]
public void reset_burst ();
}
+
[Compact]
[CCode (cheader_filename = "cheese-flash.h")]
public class Flash {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]