[chronojump] webcam/preferences button_video_preview.Sentive if combo pixel_format ok



commit 911f41e9c61c08565eb5727f0970666ab149f12a
Author: Xavier de Blas <xaviblas gmail com>
Date:   Thu Jul 11 13:05:15 2019 +0200

    webcam/preferences button_video_preview.Sentive if combo pixel_format ok

 glade/preferences_win.glade | 1 +
 src/gui/preferences.cs      | 3 +++
 2 files changed, 4 insertions(+)
---
diff --git a/glade/preferences_win.glade b/glade/preferences_win.glade
index 6a6285ed..09f28725 100644
--- a/glade/preferences_win.glade
+++ b/glade/preferences_win.glade
@@ -3926,6 +3926,7 @@ Other</property>
                                 <child>
                                   <widget class="GtkButton" id="button_video_preview">
                                     <property name="visible">True</property>
+                                    <property name="sensitive">False</property>
                                     <property name="can_focus">True</property>
                                     <property name="receives_default">True</property>
                                     <property name="tooltip" translatable="yes">Preview video</property>
diff --git a/src/gui/preferences.cs b/src/gui/preferences.cs
index 3ab2dd1d..fe1d0780 100644
--- a/src/gui/preferences.cs
+++ b/src/gui/preferences.cs
@@ -168,6 +168,7 @@ public class PreferencesWindow
        [Widget] Gtk.Image image_multimedia_audio;
        [Widget] Gtk.Image image_multimedia_video;
        [Widget] Gtk.Image image_video_preview;
+       [Widget] Gtk.Button button_video_preview;
        [Widget] Gtk.CheckButton check_camera_stop_after;
        [Widget] Gtk.CheckButton check_camera_advanced;
        [Widget] Gtk.Frame frame_camera_advanced;
@@ -699,6 +700,7 @@ public class PreferencesWindow
                        pixelFormats.Add(pixelFormat);
                        UtilGtk.ComboUpdate(combo_camera_pixel_format, pixelFormats);
                        combo_camera_pixel_format.Active = 0;
+                       button_video_preview.Sensitive = true;
                }
 
                hbox_combo_camera_pixel_format.PackStart(combo_camera_pixel_format, true, true, 0);
@@ -817,6 +819,7 @@ public class PreferencesWindow
                        string currentResolution = getSelectedResolution();
                        UtilGtk.ComboUpdate(combo_camera_resolution, 
wfsm.PopulateListByPixelFormat(pixelFormat));
                        combo_camera_resolution.Active = UtilGtk.ComboMakeActive(combo_camera_resolution, 
currentResolution);
+                       button_video_preview.Sensitive = true;
                }
        }
        private void on_combo_camera_resolution_changed (object o, EventArgs args)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]