[cheese] Remember last used camera
- From: David King <davidk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese] Remember last used camera
- Date: Tue, 22 Sep 2020 08:59:51 +0000 (UTC)
commit c8dbff649229f28bc47493977f7c3f8ac8f7f0cc
Author: esoleyman <emil soleyman com>
Date: Thu Aug 13 10:21:27 2020 -0500
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: https://gitlab.gnome.org/GNOME/cheese/-/issues/76
src/cheese-application.vala | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/src/cheese-application.vala b/src/cheese-application.vala
index d14571cf..0bc02407 100644
--- a/src/cheese-application.vala
+++ b/src/cheese-application.vala
@@ -199,6 +199,14 @@ public class Cheese.Application : Gtk.Application
mode.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 ();
camera = new Camera (video_preview, device,
settings.get_int ("photo-x-resolution"),
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]