summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bin/gui/control.c24
-rw-r--r--bin/gui/control.glade30
2 files changed, 26 insertions, 28 deletions
diff --git a/bin/gui/control.c b/bin/gui/control.c
index 6327366..d26f0ab 100644
--- a/bin/gui/control.c
+++ b/bin/gui/control.c
@@ -43,7 +43,9 @@ typedef struct {
GtkWidget *stop_button;
GtkWidget *record_button;
GtkWidget *download_button;
- GtkComboBox *zoom_box;
+ GtkWidget *acquisition_expander;
+ GtkWidget *properties_expander;
+ GtkWidget *zoom_box;
GtkLabel *mean_label;
GtkLabel *sigma_label;
GtkLabel *max_label;
@@ -243,7 +245,7 @@ update_pixbuf (ThreadData *data)
egg_histogram_view_update (EGG_HISTOGRAM_VIEW (data->histogram_view),
ring_buffer_get_current_pointer (data->buffer));
- get_statistics (data, &mean, &sigma, &min, &max);
+ get_statistics (data, &mean, &sigma, &max, &min);
string = g_string_new_len (NULL, 32);
g_string_printf (string, "\u03bc = %3.2f", mean);
@@ -296,7 +298,11 @@ set_tool_button_state (ThreadData *data)
data->state == IDLE);
gtk_widget_set_sensitive (data->download_button,
data->data_in_camram);
- gtk_widget_set_sensitive (GTK_WIDGET (data->zoom_box),
+ gtk_widget_set_sensitive (data->acquisition_expander,
+ data->state == IDLE);
+ gtk_widget_set_sensitive (data->properties_expander,
+ data->state == IDLE);
+ gtk_widget_set_sensitive (data->zoom_box,
data->state == IDLE);
}
@@ -675,7 +681,10 @@ create_main_window (GtkBuilder *builder, const gchar* camera_name)
window = GTK_WIDGET (gtk_builder_get_object (builder, "window"));
max_bin_adjustment = GTK_ADJUSTMENT (gtk_builder_get_object (builder, "max-bin-value-adjustment"));
- td.zoom_box = GTK_COMBO_BOX (gtk_builder_get_object (builder, "zoom-box"));
+ td.acquisition_expander = GTK_WIDGET (gtk_builder_get_object (builder, "acquisition-expander"));
+ td.properties_expander = GTK_WIDGET (gtk_builder_get_object (builder, "properties-expander"));
+
+ td.zoom_box = GTK_WIDGET (gtk_builder_get_object (builder, "zoom-box"));
td.start_button = GTK_WIDGET (gtk_builder_get_object (builder, "start-button"));
td.stop_button = GTK_WIDGET (gtk_builder_get_object (builder, "stop-button"));
td.record_button = GTK_WIDGET (gtk_builder_get_object (builder, "record-button"));
@@ -742,14 +751,17 @@ create_main_window (GtkBuilder *builder, const gchar* camera_name)
gtk_builder_get_object (builder, "exposure-adjustment"), "value",
G_BINDING_BIDIRECTIONAL | G_BINDING_SYNC_CREATE);
- g_signal_connect (gtk_builder_get_object (builder, "save-item"), "activate", G_CALLBACK (on_save), &td);
+ g_signal_connect (gtk_builder_get_object (builder, "save-item"),
+ "activate", G_CALLBACK (on_save), &td);
+
+ g_signal_connect (gtk_builder_get_object (builder, "zoom-box"),
+ "changed", G_CALLBACK (on_zoom_changed), &td);
g_signal_connect (td.frame_slider, "value-changed", G_CALLBACK (on_frame_slider_changed), &td);
g_signal_connect (td.start_button, "clicked", G_CALLBACK (on_start_button_clicked), &td);
g_signal_connect (td.stop_button, "clicked", G_CALLBACK (on_stop_button_clicked), &td);
g_signal_connect (td.record_button, "clicked", G_CALLBACK (on_record_button_clicked), &td);
g_signal_connect (td.download_button, "clicked", G_CALLBACK (on_download_button_clicked), &td);
- g_signal_connect (td.zoom_box, "changed", G_CALLBACK (on_zoom_changed), &td);
g_signal_connect (histogram_view, "changed", G_CALLBACK (on_histogram_changed), &td);
g_signal_connect (window, "destroy", G_CALLBACK (on_destroy), &td);
diff --git a/bin/gui/control.glade b/bin/gui/control.glade
index e6c3004..a6b50d7 100644
--- a/bin/gui/control.glade
+++ b/bin/gui/control.glade
@@ -194,10 +194,10 @@
</packing>
</child>
<child>
- <object class="GtkVBox" id="vbox5">
+ <object class="GtkVBox" id="settings-box">
<property name="visible">True</property>
<child>
- <object class="GtkExpander" id="expander2">
+ <object class="GtkExpander" id="acquisition-expander">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="expanded">True</property>
@@ -437,9 +437,10 @@
</packing>
</child>
<child>
- <object class="GtkExpander" id="expander3">
+ <object class="GtkExpander" id="statistics-expander">
<property name="visible">True</property>
<property name="can_focus">True</property>
+ <property name="expanded">True</property>
<child>
<object class="GtkVBox" id="vbox7">
<property name="visible">True</property>
@@ -554,22 +555,7 @@
</packing>
</child>
<child>
- <object class="GtkLabel" id="label19">
- <property name="visible">True</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">Statistics</property>
- <attributes>
- <attribute name="weight" value="bold"/>
- </attributes>
- </object>
- <packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="position">2</property>
- </packing>
- </child>
- <child>
- <object class="GtkTable" id="table1">
+ <object class="GtkTable" id="stats-table">
<property name="visible">True</property>
<property name="border_width">12</property>
<property name="n_rows">2</property>
@@ -664,7 +650,7 @@
</child>
</object>
<packing>
- <property name="position">3</property>
+ <property name="position">2</property>
</packing>
</child>
</object>
@@ -685,7 +671,7 @@
</packing>
</child>
<child>
- <object class="GtkExpander" id="expander4">
+ <object class="GtkExpander" id="preview-expander">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>
@@ -741,7 +727,7 @@
</packing>
</child>
<child>
- <object class="GtkExpander" id="expander1">
+ <object class="GtkExpander" id="properties-expander">
<property name="visible">True</property>
<property name="can_focus">True</property>
<child>