From 7bdaeb7fb9d5d5e908c05d6d1c25bdf65bff4cc2 Mon Sep 17 00:00:00 2001 From: Boris Breidenbach Date: Tue, 19 Jan 2021 00:46:50 +0100 Subject: [PATCH] Update settings if switch camera is clicked Fixes issue: https://gitlab.gnome.org/GNOME/cheese/-/issues/19 The camera settings was not updated if the switch camera button was used to switch to another camera. --- data/org.gnome.Cheese.gschema.xml | 2 +- src/cheese-window.vala | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/data/org.gnome.Cheese.gschema.xml b/data/org.gnome.Cheese.gschema.xml index 7275b5e5..457cde45 100644 --- a/data/org.gnome.Cheese.gschema.xml +++ b/data/org.gnome.Cheese.gschema.xml @@ -22,7 +22,7 @@ Camera device string indicator - The path to the device node which points to the camera, for example /dev/video0 + The display name of the camera, for example 'HD Pro Webcam C920' '' diff --git a/src/cheese-window.vala b/src/cheese-window.vala index cc119b68..d964f3bf 100644 --- a/src/cheese-window.vala +++ b/src/cheese-window.vala @@ -1232,7 +1232,7 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow { return; } - + cameras = camera.get_camera_devices (); for (i = 0; i < cameras.length; i++) @@ -1262,6 +1262,7 @@ public class Cheese.MainWindow : Gtk.ApplicationWindow camera.set_device (next); camera.switch_camera_device (); + settings.set_string ("camera", next.get_name ()); } /** -- GitLab