[cheese/three-point-oh] Removed some hardcoded values
- From: Yuvaraj Pandian <yuvipanda src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese/three-point-oh] Removed some hardcoded values
- Date: Sat, 10 Jul 2010 21:19:30 +0000 (UTC)
commit 532160306e9045375db574bd022629c92bf32a34
Author: Yuvaraj Pandian T <yuvipanda gmail com>
Date: Sun Jul 11 02:49:00 2010 +0530
Removed some hardcoded values
src/cheese-window.vala | 20 +++++++++++++-------
1 files changed, 13 insertions(+), 7 deletions(-)
---
diff --git a/src/cheese-window.vala b/src/cheese-window.vala
index 8c36075..a72201e 100644
--- a/src/cheese-window.vala
+++ b/src/cheese-window.vala
@@ -85,14 +85,15 @@ public class Cheese.MainWindow : Gtk.Window
internal void on_file_open (Gtk.Action action)
{
string filename, uri;
+
Gdk.Screen screen;
-
+
filename = thumb_view.get_selected_image ();
- if (filename == null)
- return; // Nothing selected.
-
- uri = GLib.Filename.to_uri (filename);
+ if (filename == null)
+ return; /* Nothing selected. */
+
+ uri = GLib.Filename.to_uri (filename);
screen = this.get_screen ();
Gtk.show_uri (screen, uri, Gtk.get_current_event_time ());
@@ -434,7 +435,9 @@ public class Cheese.MainWindow : Gtk.Window
take_action_button.related_action.sensitive = false;
effects_toggle_action.sensitive = false;
burst_take_photo ();
- GLib.Timeout.add (3500, burst_take_photo);
+
+ /* 3500 ms is approximate time for countdown animation to finish */
+ GLib.Timeout.add ((conf.gconf_prop_burst_delay / 1000) * 3500, burst_take_photo);
}
}
@@ -632,7 +635,10 @@ public class Cheese.MainWindow : Gtk.Window
viewport.add_actor (background_layer);
viewport_layout.set_layout_manager (viewport_layout_manager);
- camera = new Camera (video_preview, "/dev/video0", 1024, 768);
+ camera = new Camera (video_preview,
+ conf.gconf_prop_camera,
+ conf.gconf_prop_x_resolution,
+ conf.gconf_prop_y_resolution);
viewport.add_actor (viewport_layout);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]