[chronojump] Webcam at preferences start show labels instead of unsensitive combos
- From: Xavier de Blas <xaviblas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Webcam at preferences start show labels instead of unsensitive combos
- Date: Tue, 16 Jul 2019 14:54:39 +0000 (UTC)
commit a3a28c934d641f859e3abcab1a8dcd63ca653544
Author: Xavier de Blas <xaviblas gmail com>
Date: Tue Jul 16 16:54:08 2019 +0200
Webcam at preferences start show labels instead of unsensitive combos
glade/preferences_win.glade | 60 ++++++++++++++++++++++++++++++++++-----------
src/gui/preferences.cs | 39 +++++++++++++++++++++++------
2 files changed, 78 insertions(+), 21 deletions(-)
---
diff --git a/glade/preferences_win.glade b/glade/preferences_win.glade
index b9fd8679..0ee01190 100644
--- a/glade/preferences_win.glade
+++ b/glade/preferences_win.glade
@@ -3647,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">4</property>
+ <property name="n_columns">5</property>
<property name="column_spacing">12</property>
<property name="row_spacing">10</property>
<child>
@@ -3689,8 +3689,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">GTK_FILL</property>
@@ -3705,8 +3705,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">2</property>
<property name="bottom_attach">3</property>
<property name="x_options">GTK_FILL</property>
@@ -3777,8 +3777,8 @@ Other</property>
</child>
</widget>
<packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
+ <property name="left_attach">4</property>
+ <property name="right_attach">5</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options"/>
@@ -3845,16 +3845,13 @@ Other</property>
</child>
</widget>
<packing>
- <property name="left_attach">3</property>
- <property name="right_attach">4</property>
+ <property name="left_attach">4</property>
+ <property name="right_attach">5</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>
@@ -3877,8 +3874,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="x_options">GTK_FILL</property>
</packing>
</child>
@@ -3911,6 +3908,41 @@ Other</property>
<property name="bottom_attach">3</property>
</packing>
</child>
+ <child>
+ <placeholder/>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label_camera_pixel_format_current">
+ <property name="can_focus">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label_camera_resolution_current">
+ <property name="can_focus">False</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <property name="top_attach">1</property>
+ <property name="bottom_attach">2</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkLabel" id="label_camera_framerate_current">
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ </widget>
+ <packing>
+ <property name="left_attach">2</property>
+ <property name="right_attach">3</property>
+ <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 9c415cf4..b459e01a 100644
--- a/src/gui/preferences.cs
+++ b/src/gui/preferences.cs
@@ -157,6 +157,9 @@ public class PreferencesWindow
[Widget] Gtk.SpinButton spin_camera_framerate_custom;
[Widget] Gtk.Entry entry_camera_framerate_custom_decimals;
[Widget] Gtk.Label label_camera_pixel_format;
+ [Widget] Gtk.Label label_camera_pixel_format_current;
+ [Widget] Gtk.Label label_camera_resolution_current;
+ [Widget] Gtk.Label label_camera_framerate_current;
[Widget] Gtk.HBox hbox_combo_camera_pixel_format;
[Widget] Gtk.ComboBox combo_camera_pixel_format;
[Widget] Gtk.Box hbox_combo_camera_resolution;
@@ -701,12 +704,16 @@ public class PreferencesWindow
pixelFormats.Add(pixelFormat);
UtilGtk.ComboUpdate(combo_camera_pixel_format, pixelFormats);
combo_camera_pixel_format.Active = 0;
+
+ label_camera_pixel_format_current.Text = pixelFormat;
+ label_camera_pixel_format_current.Visible = true;
button_video_preview.Sensitive = true;
}
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;
+ //not shown because label is shown
+ //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,11 +754,15 @@ public class PreferencesWindow
resolutions.Add(resolution);
UtilGtk.ComboUpdate(combo_camera_resolution, resolutions);
combo_camera_resolution.Active = 0;
+
+ label_camera_resolution_current.Text = resolution;
+ label_camera_resolution_current.Visible = true;
}
hbox_combo_camera_resolution.PackStart(combo_camera_resolution, true, true, 0);
- hbox_combo_camera_resolution.ShowAll();
- hbox_combo_camera_resolution.Sensitive = false;
+ //not shown because label is shown
+ //hbox_combo_camera_resolution.ShowAll();
+ //hbox_combo_camera_resolution.Sensitive = false;
combo_camera_resolution.Changed += new EventHandler (on_combo_camera_resolution_changed);
// 4) framerate
@@ -797,11 +808,15 @@ public class PreferencesWindow
framerates.Add(framerate);
UtilGtk.ComboUpdate(combo_camera_framerate, framerates);
combo_camera_framerate.Active = 0;
+
+ label_camera_framerate_current.Text = framerate;
+ label_camera_framerate_current.Visible = true;
}
hbox_combo_camera_framerate.PackStart(combo_camera_framerate, true, true, 0);
- hbox_combo_camera_framerate.ShowAll();
- hbox_combo_camera_framerate.Sensitive = false;
+ //not shown because label is shown
+ //hbox_combo_camera_framerate.ShowAll();
+ //hbox_combo_camera_framerate.Sensitive = false;
combo_camera_framerate.Changed += new EventHandler (on_combo_camera_framerate_changed);
}
@@ -827,7 +842,7 @@ public class PreferencesWindow
{
string pixelFormat = UtilGtk.ComboGetActive(combo_camera_pixel_format);
string resolution = UtilGtk.ComboGetActive(combo_camera_resolution);
- hbox_camera_resolution_custom.Visible = resolution == Catalog.GetString("Custom");
+ hbox_camera/resolution_custom.Visible = resolution == Catalog.GetString("Custom");
if(resolution != "" && resolution != Catalog.GetString("Custom") && wfsm != null)
{
@@ -933,9 +948,19 @@ public class PreferencesWindow
UtilGtk.ComboUpdate(combo_camera_pixel_format, wfsm.GetPixelFormats());
combo_camera_pixel_format.Active = UtilGtk.ComboMakeActive(combo_camera_pixel_format,
currentPixelFormat);
+ /*
+ //not shown because label is shown
hbox_combo_camera_pixel_format.Sensitive = true;
hbox_combo_camera_resolution.Sensitive = true;
hbox_combo_camera_framerate.Sensitive = true;
+ */
+ label_camera_pixel_format_current.Visible = false;
+ label_camera_resolution_current.Visible = false;
+ label_camera_framerate_current.Visible = false;
+
+ hbox_combo_camera_pixel_format.ShowAll();
+ hbox_combo_camera_resolution.ShowAll();
+ hbox_combo_camera_framerate.ShowAll();
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]