Commit c8dbff64 authored by esoleyman's avatar esoleyman Committed by David King

Remember last used camera

During setup_camera() in cheese-application.vala, we were not explicitly
assigning the camera from settings and only assigning the camera from
the command line.

This now checks for values from both the command line and from settings
and allows the command line to override settings.

Fixes: #76
parent 054c14aa
Pipeline #215582 passed with stage
in 6 minutes and 17 seconds
...@@ -199,6 +199,14 @@ public class Cheese.Application : Gtk.Application ...@@ -199,6 +199,14 @@ public class Cheese.Application : Gtk.Application
mode.set_enabled (false); mode.set_enabled (false);
shoot.set_enabled (false); shoot.set_enabled (false);
/* If no device has been given on the commandline, retrieve it from
* gsettings.
*/
if (device == null)
{
device = settings.get_string ("camera");
}
var video_preview = main_window.get_video_preview (); var video_preview = main_window.get_video_preview ();
camera = new Camera (video_preview, device, camera = new Camera (video_preview, device,
settings.get_int ("photo-x-resolution"), settings.get_int ("photo-x-resolution"),
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment