[chronojump] webcam preferences better gui



commit 39f41624fa0ffefa8109d9c27e725759f8516819
Author: Xavier de Blas <xaviblas gmail com>
Date:   Fri Jul 5 10:36:20 2019 +0200

    webcam preferences better gui

 glade/preferences_win.glade | 142 +++++++++++++++++++++++++++++++++++---------
 src/gui/preferences.cs      |   7 +++
 2 files changed, 120 insertions(+), 29 deletions(-)
---
diff --git a/glade/preferences_win.glade b/glade/preferences_win.glade
index ab4a1120..6851cc6e 100644
--- a/glade/preferences_win.glade
+++ b/glade/preferences_win.glade
@@ -3526,10 +3526,10 @@ Other</property>
                             <property name="can_focus">False</property>
                             <property name="spacing">16</property>
                             <child>
-                              <widget class="GtkLabel" id="label62">
+                              <widget class="GtkLabel" id="label93">
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
-                                <property name="label" translatable="yes">Select the camera:</property>
+                                <property name="label">1)</property>
                               </widget>
                               <packing>
                                 <property name="expand">False</property>
@@ -3537,6 +3537,18 @@ Other</property>
                                 <property name="position">0</property>
                               </packing>
                             </child>
+                            <child>
+                              <widget class="GtkLabel" id="label62">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label" translatable="yes">Select the camera</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">1</property>
+                              </packing>
+                            </child>
                             <child>
                               <widget class="GtkHBox" id="hbox_combo_camera">
                                 <property name="visible">True</property>
@@ -3546,8 +3558,55 @@ Other</property>
                                 </child>
                               </widget>
                               <packing>
-                                <property name="expand">True</property>
-                                <property name="fill">True</property>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">2</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label_camera_error">
+                                <property name="can_focus">False</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">3</property>
+                              </packing>
+                            </child>
+                          </widget>
+                          <packing>
+                            <property name="expand">False</property>
+                            <property name="fill">False</property>
+                            <property name="position">0</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <widget class="GtkHBox" id="hbox48">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="spacing">12</property>
+                            <child>
+                              <widget class="GtkLabel" id="label94">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label">2)</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
+                                <property name="position">0</property>
+                              </packing>
+                            </child>
+                            <child>
+                              <widget class="GtkLabel" id="label_camera_get_supported">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="xalign">0</property>
+                                <property name="label" translatable="yes">Search supported modes</property>
+                              </widget>
+                              <packing>
+                                <property name="expand">False</property>
+                                <property name="fill">False</property>
                                 <property name="position">1</property>
                               </packing>
                             </child>
@@ -3561,7 +3620,7 @@ Other</property>
                                   <widget class="GtkLabel" id="label86">
                                     <property name="visible">True</property>
                                     <property name="can_focus">False</property>
-                                    <property name="label" translatable="yes">Get supported modes</property>
+                                    <property name="label" translatable="yes">Search</property>
                                   </widget>
                                 </child>
                               </widget>
@@ -3572,16 +3631,6 @@ Other</property>
                               </packing>
                             </child>
                           </widget>
-                          <packing>
-                            <property name="expand">False</property>
-                            <property name="fill">False</property>
-                            <property name="position">0</property>
-                          </packing>
-                        </child>
-                        <child>
-                          <widget class="GtkLabel" id="label_camera_error">
-                            <property name="can_focus">False</property>
-                          </widget>
                           <packing>
                             <property name="expand">False</property>
                             <property name="fill">False</property>
@@ -3598,7 +3647,7 @@ Other</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">False</property>
                                 <property name="n_rows">3</property>
-                                <property name="n_columns">3</property>
+                                <property name="n_columns">4</property>
                                 <property name="column_spacing">12</property>
                                 <property name="row_spacing">10</property>
                                 <child>
@@ -3609,6 +3658,8 @@ Other</property>
                                     <property name="label" translatable="yes">Resolution</property>
                                   </widget>
                                   <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
                                     <property name="top_attach">1</property>
                                     <property name="bottom_attach">2</property>
                                     <property name="x_options">GTK_FILL</property>
@@ -3622,6 +3673,8 @@ Other</property>
                                     <property name="label" translatable="yes">Framerate</property>
                                   </widget>
                                   <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
                                     <property name="top_attach">2</property>
                                     <property name="bottom_attach">3</property>
                                     <property name="x_options">GTK_FILL</property>
@@ -3636,8 +3689,8 @@ Other</property>
                                     </child>
                                   </widget>
                                   <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="right_attach">2</property>
+                                    <property name="left_attach">2</property>
+                                    <property name="right_attach">3</property>
                                     <property name="top_attach">1</property>
                                     <property name="bottom_attach">2</property>
                                     <property name="x_options">GTK_FILL</property>
@@ -3652,8 +3705,8 @@ Other</property>
                                     </child>
                                   </widget>
                                   <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="right_attach">2</property>
+                                    <property name="left_attach">2</property>
+                                    <property name="right_attach">3</property>
                                     <property name="top_attach">2</property>
                                     <property name="bottom_attach">3</property>
                                     <property name="x_options">GTK_FILL</property>
@@ -3724,8 +3777,8 @@ Other</property>
                                     </child>
                                   </widget>
                                   <packing>
-                                    <property name="left_attach">2</property>
-                                    <property name="right_attach">3</property>
+                                    <property name="left_attach">3</property>
+                                    <property name="right_attach">4</property>
                                     <property name="top_attach">1</property>
                                     <property name="bottom_attach">2</property>
                                     <property name="x_options"/>
@@ -3792,16 +3845,13 @@ Other</property>
                                     </child>
                                   </widget>
                                   <packing>
-                                    <property name="left_attach">2</property>
-                                    <property name="right_attach">3</property>
+                                    <property name="left_attach">3</property>
+                                    <property name="right_attach">4</property>
                                     <property name="top_attach">2</property>
                                     <property name="bottom_attach">3</property>
                                     <property name="x_options">GTK_FILL</property>
                                   </packing>
                                 </child>
-                                <child>
-                                  <placeholder/>
-                                </child>
                                 <child>
                                   <widget class="GtkLabel" id="label_camera_pixel_format">
                                     <property name="visible">True</property>
@@ -3810,6 +3860,8 @@ Other</property>
                                     <property name="label">Pixel format</property>
                                   </widget>
                                   <packing>
+                                    <property name="left_attach">1</property>
+                                    <property name="right_attach">2</property>
                                     <property name="x_options">GTK_FILL</property>
                                   </packing>
                                 </child>
@@ -3822,11 +3874,43 @@ Other</property>
                                     </child>
                                   </widget>
                                   <packing>
-                                    <property name="left_attach">1</property>
-                                    <property name="right_attach">2</property>
+                                    <property name="left_attach">2</property>
+                                    <property name="right_attach">3</property>
                                     <property name="x_options">GTK_FILL</property>
                                   </packing>
                                 </child>
+                                <child>
+                                  <placeholder/>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="label95">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label">3)</property>
+                                  </widget>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="label97">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label">4)</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="top_attach">1</property>
+                                    <property name="bottom_attach">2</property>
+                                  </packing>
+                                </child>
+                                <child>
+                                  <widget class="GtkLabel" id="label98">
+                                    <property name="visible">True</property>
+                                    <property name="can_focus">False</property>
+                                    <property name="label">5)</property>
+                                  </widget>
+                                  <packing>
+                                    <property name="top_attach">2</property>
+                                    <property name="bottom_attach">3</property>
+                                  </packing>
+                                </child>
                               </widget>
                               <packing>
                                 <property name="expand">False</property>
diff --git a/src/gui/preferences.cs b/src/gui/preferences.cs
index ba6c2988..c7dbf1f6 100644
--- a/src/gui/preferences.cs
+++ b/src/gui/preferences.cs
@@ -703,6 +703,7 @@ public class PreferencesWindow
 
                hbox_combo_camera_pixel_format.PackStart(combo_camera_pixel_format, true, true, 0);
                hbox_combo_camera_pixel_format.ShowAll();
+               hbox_combo_camera_pixel_format.Sensitive = false;
                combo_camera_pixel_format.Changed += new EventHandler (on_combo_camera_pixel_format_changed);
 
                // 3) resolution
@@ -747,6 +748,7 @@ public class PreferencesWindow
 
                hbox_combo_camera_resolution.PackStart(combo_camera_resolution, true, true, 0);
                hbox_combo_camera_resolution.ShowAll();
+               hbox_combo_camera_resolution.Sensitive = false;
                combo_camera_resolution.Changed += new EventHandler (on_combo_camera_resolution_changed);
 
                // 4) framerate
@@ -796,6 +798,7 @@ public class PreferencesWindow
 
                hbox_combo_camera_framerate.PackStart(combo_camera_framerate, true, true, 0);
                hbox_combo_camera_framerate.ShowAll();
+               hbox_combo_camera_framerate.Sensitive = false;
                combo_camera_framerate.Changed += new EventHandler (on_combo_camera_framerate_changed);
        }
 
@@ -926,6 +929,10 @@ public class PreferencesWindow
                        UtilGtk.ComboUpdate(combo_camera_pixel_format, wfsm.GetPixelFormats());
                        combo_camera_pixel_format.Active = 0;
                        hbox_combo_camera_pixel_format.ShowAll();
+
+                       hbox_combo_camera_pixel_format.Sensitive = true;
+                       hbox_combo_camera_resolution.Sensitive = true;
+                       hbox_combo_camera_framerate.Sensitive = true;
                }
        }
 


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