[chronojump] Preferences webcam. Better sensitivity on change camera.
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Preferences webcam. Better sensitivity on change camera.
- Date: Mon, 4 Nov 2019 13:31:42 +0000 (UTC)
commit a510500c6cea519115703ee1bf5215a673fe7322
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Nov 4 14:31:20 2019 +0100
Preferences webcam. Better sensitivity on change camera.
src/gui/preferences.cs | 22 ++++++++++++++++++++++
src/utilGtk.cs | 6 ++++++
2 files changed, 28 insertions(+)
---
diff --git a/src/gui/preferences.cs b/src/gui/preferences.cs
index ba25bdd9..55d059fe 100644
--- a/src/gui/preferences.cs
+++ b/src/gui/preferences.cs
@@ -699,6 +699,7 @@ public class PreferencesWindow
//UtilGtk.ComboUpdate(combo_camera, wd_list.GetCodes());
UtilGtk.ComboUpdate(combo_camera, wd_list.GetFullnames());
hbox_combo_camera.PackStart(combo_camera, true, true, 0);
+ combo_camera.Changed += new EventHandler (on_combo_camera_changed);
hbox_combo_camera.ShowAll();
//if(current >= devices.Count)
@@ -836,6 +837,26 @@ public class PreferencesWindow
hbox_camera_stop_after_seconds.Visible = check_camera_stop_after.Active;
}
+ private void on_combo_camera_changed (object o, EventArgs args)
+ {
+ //if camera changes then do not allow to view/change format, resolution, framerate, or
preview until configure button is clicked
+ label_camera_pixel_format_current.Visible = false;
+ label_camera_resolution_current.Visible = false;
+ label_camera_framerate_current.Visible = false;
+
+ hbox_combo_camera_pixel_format.Visible = false;
+ hbox_combo_camera_resolution.Visible = false;
+ hbox_combo_camera_framerate.Visible = false;
+
+ //blank camera values
+ UtilGtk.ComboDelAll(combo_camera_pixel_format);
+ UtilGtk.ComboDelAll(combo_camera_resolution);
+ UtilGtk.ComboDelAll(combo_camera_framerate);
+
+ //do not allow to preview
+ button_video_preview.Sensitive = false;
+ }
+
private void on_combo_camera_pixel_format_changed (object o, EventArgs args)
{
string pixelFormat = UtilGtk.ComboGetActive(combo_camera_pixel_format);
@@ -957,6 +978,7 @@ public class PreferencesWindow
string currentPixelFormat = getSelectedPixelFormat();
UtilGtk.ComboUpdate(combo_camera_pixel_format, wfsm.GetPixelFormats());
combo_camera_pixel_format.Active = UtilGtk.ComboMakeActive(combo_camera_pixel_format,
currentPixelFormat);
+ button_video_preview.Sensitive = true;
/*
//not shown because label is shown
diff --git a/src/utilGtk.cs b/src/utilGtk.cs
index 38b30faf..b7d39077 100644
--- a/src/utilGtk.cs
+++ b/src/utilGtk.cs
@@ -128,6 +128,12 @@ public class UtilGtk
} while (myCombo.Model.IterNext (ref iter));
}
+ //used on gui/preferences camera
+ public static void ComboDelAll(ComboBox myCombo)
+ {
+ comboDelAll(myCombo);
+ }
+
private static void comboDelAll(ComboBox myCombo) {
//myCombo = ComboBox.NewText(); don't work
TreeIter myIter;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]