[med-svn] [SCM] aghermann branch, master, updated. 4f7a3b774136ffffbaf9b05d90bd568347bc5461

Andrei Zavada johnhommer at gmail.com
Fri Nov 16 00:50:01 UTC 2012


The following commit has been merged in the master branch:
commit 86dc16917cab17a07a0216778e3e6d3279fb9e62
Author: Andrei Zavada <johnhommer at gmail.com>
Date:   Thu Oct 4 00:20:24 2012 +0300

    collect all SF:construct_widgets in one place

diff --git a/src/ui/scoring-facility-construct.cc b/src/ui/scoring-facility-construct.cc
index 60c6cea..8492621 100644
--- a/src/ui/scoring-facility-construct.cc
+++ b/src/ui/scoring-facility-construct.cc
@@ -571,3 +571,242 @@ construct_widgets()
 	return 0;
 }
 
+
+
+
+int
+aghui::SScoringFacility::SFindDialog::
+construct_widgets()
+{
+	mPatterns =
+		gtk_list_store_new( 1, G_TYPE_STRING);
+
+	GtkCellRenderer *renderer;
+
+	if ( !AGH_GBGETOBJ3 (_p.builder, GtkDialog,		wPattern) ||
+	     !AGH_GBGETOBJ3 (_p.builder, GtkDrawingArea,	daPatternSelection) ||
+	     !AGH_GBGETOBJ3 (_p.builder, GtkScrolledWindow,	vpPatternSelection) ||
+	     !AGH_GBGETOBJ3 (_p.builder, GtkButton,		bPatternFindPrevious) ||
+	     !AGH_GBGETOBJ3 (_p.builder, GtkButton,		bPatternFindNext) ||
+//	     !AGH_GBGETOBJ3 (_p.builder, GtkButton,		bPatternDismiss) ||
+	     !AGH_GBGETOBJ3 (_p.builder, GtkButton,		bPatternSave) ||
+	     !AGH_GBGETOBJ3 (_p.builder, GtkButton,		bPatternDiscard) ||
+	     !AGH_GBGETOBJ3 (_p.builder, GtkSpinButton,		ePatternEnvTightness) ||
+	     !AGH_GBGETOBJ3 (_p.builder, GtkSpinButton,		ePatternFilterOrder) ||
+	     !AGH_GBGETOBJ3 (_p.builder, GtkSpinButton,		ePatternFilterCutoff) ||
+	     !AGH_GBGETOBJ3 (_p.builder, GtkSpinButton,		ePatternDZCDFStep) ||
+	     !AGH_GBGETOBJ3 (_p.builder, GtkSpinButton,		ePatternDZCDFSigma) ||
+	     !AGH_GBGETOBJ3 (_p.builder, GtkSpinButton,		ePatternDZCDFSmooth) ||
+	     !AGH_GBGETOBJ3 (_p.builder, GtkSpinButton,		ePatternParameterA) ||
+	     !AGH_GBGETOBJ3 (_p.builder, GtkSpinButton,		ePatternParameterB) ||
+	     !AGH_GBGETOBJ3 (_p.builder, GtkSpinButton,		ePatternParameterC) ||
+	     !AGH_GBGETOBJ3 (_p.builder, GtkHBox,		cPatternLabelBox) ||
+	     !AGH_GBGETOBJ3 (_p.builder, GtkLabel,		lPatternSimilarity) ||
+	     !AGH_GBGETOBJ3 (_p.builder, GtkComboBox,		ePatternList) ||
+	     !AGH_GBGETOBJ3 (_p.builder, GtkComboBox,		ePatternChannel) ||
+	     !AGH_GBGETOBJ3 (_p.builder, GtkDialog,		wPatternName) ||
+	     !AGH_GBGETOBJ3 (_p.builder, GtkEntry,		ePatternNameName) ||
+	     !AGH_GBGETOBJ3 (_p.builder, GtkCheckButton,	ePatternNameSaveGlobally) )
+		return -1;
+
+	gtk_combo_box_set_model( ePatternList,
+				 (GtkTreeModel*)mPatterns);
+	gtk_combo_box_set_id_column( ePatternList, 0);
+	renderer = gtk_cell_renderer_text_new();
+	gtk_cell_layout_pack_start( (GtkCellLayout*)ePatternList, renderer, FALSE);
+	gtk_cell_layout_set_attributes( (GtkCellLayout*)ePatternList, renderer,
+					"text", 0,
+					NULL);
+	ePatternList_changed_cb_handler_id =
+		g_signal_connect( ePatternList, "changed",
+				  G_CALLBACK (ePatternList_changed_cb),
+				  this);
+
+	gtk_combo_box_set_model( ePatternChannel,
+				 (GtkTreeModel*)_p._p.mAllChannels);
+	gtk_combo_box_set_id_column( ePatternChannel, 0);
+	renderer = gtk_cell_renderer_text_new();
+	gtk_cell_layout_pack_start( (GtkCellLayout*)ePatternChannel, renderer, FALSE);
+	gtk_cell_layout_set_attributes( (GtkCellLayout*)ePatternChannel, renderer,
+					"text", 0,
+					NULL);
+
+	ePatternChannel_changed_cb_handler_id =
+		g_signal_connect( ePatternChannel, "changed",
+				  G_CALLBACK (ePatternChannel_changed_cb),
+				  this);
+
+	g_signal_connect( daPatternSelection, "draw",
+			  G_CALLBACK (daPatternSelection_draw_cb),
+			  this);
+	g_signal_connect( daPatternSelection, "scroll-event",
+			  G_CALLBACK (daPatternSelection_scroll_event_cb),
+			  this);
+	g_signal_connect( bPatternFindNext, "clicked",
+			  G_CALLBACK (bPatternFind_clicked_cb),
+			  this);
+	g_signal_connect( bPatternFindPrevious, "clicked",
+			  G_CALLBACK (bPatternFind_clicked_cb),
+			  this);
+	g_signal_connect( bPatternSave, "clicked",
+			  G_CALLBACK (bPatternSave_clicked_cb),
+			  this);
+	g_signal_connect( bPatternDiscard, "clicked",
+			  G_CALLBACK (bPatternDiscard_clicked_cb),
+			  this);
+
+	g_signal_connect( ePatternEnvTightness, "value-changed",
+			  G_CALLBACK (ePattern_any_value_changed_cb),
+			  this);
+	g_signal_connect( ePatternFilterCutoff, "value-changed",
+			  G_CALLBACK (ePattern_any_value_changed_cb),
+			  this);
+	g_signal_connect( ePatternFilterOrder, "value-changed",
+			  G_CALLBACK (ePattern_any_value_changed_cb),
+			  this);
+	g_signal_connect( ePatternDZCDFStep, "value-changed",
+			  G_CALLBACK (ePattern_any_value_changed_cb),
+			  this);
+	g_signal_connect( ePatternDZCDFSigma, "value-changed",
+			  G_CALLBACK (ePattern_any_value_changed_cb),
+			  this);
+	g_signal_connect( ePatternDZCDFSmooth, "value-changed",
+			  G_CALLBACK (ePattern_any_value_changed_cb),
+			  this);
+	g_signal_connect( ePatternParameterA, "value-changed",
+			  G_CALLBACK (ePattern_any_value_changed_cb),
+			  this);
+	g_signal_connect( ePatternParameterB, "value-changed",
+			  G_CALLBACK (ePattern_any_value_changed_cb),
+			  this);
+	g_signal_connect( ePatternParameterC, "value-changed",
+			  G_CALLBACK (ePattern_any_value_changed_cb),
+			  this);
+
+	g_signal_connect( wPattern, "show",
+			  G_CALLBACK (wPattern_show_cb),
+			  this);
+	g_signal_connect( wPattern, "hide",
+			  G_CALLBACK (wPattern_hide_cb),
+			  this);
+	return 0;
+}
+
+
+
+int
+aghui::SScoringFacility::SFiltersDialog::
+construct_widgets()
+{
+	GtkCellRenderer *renderer;
+
+      // ------- wFilter
+	if ( !(AGH_GBGETOBJ3 (_p.builder, GtkDialog,		wFilters)) ||
+	     !(AGH_GBGETOBJ3 (_p.builder, GtkLabel,		lFilterCaption)) ||
+	     !(AGH_GBGETOBJ3 (_p.builder, GtkSpinButton,	eFilterLowPassCutoff)) ||
+	     !(AGH_GBGETOBJ3 (_p.builder, GtkSpinButton,	eFilterHighPassCutoff)) ||
+	     !(AGH_GBGETOBJ3 (_p.builder, GtkSpinButton,	eFilterLowPassOrder)) ||
+	     !(AGH_GBGETOBJ3 (_p.builder, GtkSpinButton,	eFilterHighPassOrder)) ||
+	     !(AGH_GBGETOBJ3 (_p.builder, GtkComboBox,		eFilterNotchFilter)) ||
+	     !(AGH_GBGETOBJ3 (_p.builder, GtkListStore,		mFilterNotchFilter)) ||
+	     !(AGH_GBGETOBJ3 (_p.builder, GtkButton,		bFilterOK)) )
+		return -1;
+
+	gtk_combo_box_set_model( eFilterNotchFilter,
+				 (GtkTreeModel*)mFilterNotchFilter);
+	gtk_combo_box_set_id_column( eFilterNotchFilter, 0);
+	renderer = gtk_cell_renderer_text_new();
+	gtk_cell_layout_pack_start( (GtkCellLayout*)eFilterNotchFilter, renderer, FALSE);
+	gtk_cell_layout_set_attributes( (GtkCellLayout*)eFilterNotchFilter, renderer,
+					"text", 0,
+					NULL);
+
+	g_signal_connect( (GObject*)eFilterHighPassCutoff, "value-changed",
+			  (GCallback)eFilterHighPassCutoff_value_changed_cb,
+			  this);
+	g_signal_connect( (GObject*)eFilterLowPassCutoff, "value-changed",
+			  (GCallback)eFilterLowPassCutoff_value_changed_cb,
+			  this);
+	return 0;
+}
+
+
+
+
+
+int
+aghui::SScoringFacility::SPhasediffDialog::
+construct_widgets()
+{
+	GtkCellRenderer *renderer;
+
+      // ------- wPhaseDiff
+	if ( !(AGH_GBGETOBJ3 (_p.builder, GtkDialog, wSFPD)) ||
+	     !(AGH_GBGETOBJ3 (_p.builder, GtkDrawingArea, daSFPD)) ||
+	     !(AGH_GBGETOBJ3 (_p.builder, GtkComboBox, eSFPDChannelA)) ||
+	     !(AGH_GBGETOBJ3 (_p.builder, GtkComboBox, eSFPDChannelB)) ||
+	     !(AGH_GBGETOBJ3 (_p.builder, GtkSpinButton, eSFPDFreqFrom)) ||
+	     !(AGH_GBGETOBJ3 (_p.builder, GtkSpinButton, eSFPDBandwidth)) ||
+	     !(AGH_GBGETOBJ3 (_p.builder, GtkScaleButton, eSFPDSmooth)) )
+		return -1;
+
+	gtk_combo_box_set_model( eSFPDChannelA,
+				 (GtkTreeModel*)_p._p.mEEGChannels);
+	renderer = gtk_cell_renderer_text_new();
+	gtk_cell_layout_pack_start( (GtkCellLayout*)eSFPDChannelA, renderer, FALSE);
+	gtk_cell_layout_set_attributes( (GtkCellLayout*)eSFPDChannelA, renderer,
+					"text", 0,
+					NULL);
+	eSFPDChannelA_changed_cb_handler_id =
+		g_signal_connect( eSFPDChannelA, "changed",
+				  G_CALLBACK (eSFPDChannelA_changed_cb),
+				  this);
+
+	gtk_combo_box_set_model( eSFPDChannelB,
+				 (GtkTreeModel*)_p._p.mEEGChannels);
+	renderer = gtk_cell_renderer_text_new();
+	gtk_cell_layout_pack_start( (GtkCellLayout*)eSFPDChannelB, renderer, FALSE);
+	gtk_cell_layout_set_attributes( (GtkCellLayout*)eSFPDChannelB, renderer,
+					"text", 0,
+					NULL);
+	eSFPDChannelB_changed_cb_handler_id =
+		g_signal_connect( eSFPDChannelB, "changed",
+				  G_CALLBACK (eSFPDChannelB_changed_cb),
+				  this);
+
+	g_signal_connect( daSFPD, "draw",
+			  G_CALLBACK (daSFPD_draw_cb),
+			  this);
+	g_signal_connect( daSFPD, "scroll-event",
+			  G_CALLBACK (daSFPD_scroll_event_cb),
+			  this);
+	g_signal_connect( eSFPDChannelA, "changed",
+			  G_CALLBACK (eSFPDChannelA_changed_cb),
+			  this);
+	g_signal_connect( eSFPDChannelB, "changed",
+			  G_CALLBACK (eSFPDChannelB_changed_cb),
+			  this);
+	g_signal_connect( eSFPDFreqFrom, "value-changed",
+			  G_CALLBACK (eSFPDFreqFrom_value_changed_cb),
+			  this);
+	g_signal_connect( eSFPDBandwidth, "value-changed",
+			  G_CALLBACK (eSFPDBandwidth_value_changed_cb),
+			  this);
+	g_signal_connect( eSFPDSmooth, "value-changed",
+			  G_CALLBACK (eSFPDSmooth_value_changed_cb),
+			  this);
+	g_signal_connect( wSFPD, "show",
+			  G_CALLBACK (wSFPD_show_cb),
+			  this);
+	g_signal_connect( wSFPD, "hide",
+			  G_CALLBACK (wSFPD_hide_cb),
+			  this);
+	return 0;
+}
+
+
+
+
+
+
+// eof
diff --git a/src/ui/scoring-facility-filter.cc b/src/ui/scoring-facility-filter.cc
index 3a53740..be66a2e 100644
--- a/src/ui/scoring-facility-filter.cc
+++ b/src/ui/scoring-facility-filter.cc
@@ -12,49 +12,11 @@
 
 
 #include "scoring-facility.hh"
-#include "scoring-facility_cb.hh"
 
 using namespace std;
 
 
 
-int
-aghui::SScoringFacility::SFiltersDialog::
-construct_widgets()
-{
-	GtkCellRenderer *renderer;
-
-      // ------- wFilter
-	if ( !(AGH_GBGETOBJ3 (_p.builder, GtkDialog,		wFilters)) ||
-	     !(AGH_GBGETOBJ3 (_p.builder, GtkLabel,		lFilterCaption)) ||
-	     !(AGH_GBGETOBJ3 (_p.builder, GtkSpinButton,	eFilterLowPassCutoff)) ||
-	     !(AGH_GBGETOBJ3 (_p.builder, GtkSpinButton,	eFilterHighPassCutoff)) ||
-	     !(AGH_GBGETOBJ3 (_p.builder, GtkSpinButton,	eFilterLowPassOrder)) ||
-	     !(AGH_GBGETOBJ3 (_p.builder, GtkSpinButton,	eFilterHighPassOrder)) ||
-	     !(AGH_GBGETOBJ3 (_p.builder, GtkComboBox,		eFilterNotchFilter)) ||
-	     !(AGH_GBGETOBJ3 (_p.builder, GtkListStore,		mFilterNotchFilter)) ||
-	     !(AGH_GBGETOBJ3 (_p.builder, GtkButton,		bFilterOK)) )
-		return -1;
-
-	gtk_combo_box_set_model( eFilterNotchFilter,
-				 (GtkTreeModel*)mFilterNotchFilter);
-	gtk_combo_box_set_id_column( eFilterNotchFilter, 0);
-	renderer = gtk_cell_renderer_text_new();
-	gtk_cell_layout_pack_start( (GtkCellLayout*)eFilterNotchFilter, renderer, FALSE);
-	gtk_cell_layout_set_attributes( (GtkCellLayout*)eFilterNotchFilter, renderer,
-					"text", 0,
-					NULL);
-
-	g_signal_connect( (GObject*)eFilterHighPassCutoff, "value-changed",
-			  (GCallback)eFilterHighPassCutoff_value_changed_cb,
-			  this);
-	g_signal_connect( (GObject*)eFilterLowPassCutoff, "value-changed",
-			  (GCallback)eFilterLowPassCutoff_value_changed_cb,
-			  this);
-	return 0;
-}
-
-
 
 aghui::SScoringFacility::SFiltersDialog::
 ~SFiltersDialog()
diff --git a/src/ui/scoring-facility-patterns.cc b/src/ui/scoring-facility-patterns.cc
index dc57a5b..d51be36 100644
--- a/src/ui/scoring-facility-patterns.cc
+++ b/src/ui/scoring-facility-patterns.cc
@@ -18,7 +18,6 @@
 
 #include "misc.hh"
 #include "scoring-facility.hh"
-#include "scoring-facility_cb.hh"
 
 using namespace std;
 
@@ -48,124 +47,6 @@ aghui::SScoringFacility::SFindDialog::
 
 
 
-int
-aghui::SScoringFacility::SFindDialog::
-construct_widgets()
-{
-	mPatterns =
-		gtk_list_store_new( 1, G_TYPE_STRING);
-
-	GtkCellRenderer *renderer;
-
-	if ( !AGH_GBGETOBJ3 (_p.builder, GtkDialog,		wPattern) ||
-	     !AGH_GBGETOBJ3 (_p.builder, GtkDrawingArea,	daPatternSelection) ||
-	     !AGH_GBGETOBJ3 (_p.builder, GtkScrolledWindow,	vpPatternSelection) ||
-	     !AGH_GBGETOBJ3 (_p.builder, GtkButton,		bPatternFindPrevious) ||
-	     !AGH_GBGETOBJ3 (_p.builder, GtkButton,		bPatternFindNext) ||
-//	     !AGH_GBGETOBJ3 (_p.builder, GtkButton,		bPatternDismiss) ||
-	     !AGH_GBGETOBJ3 (_p.builder, GtkButton,		bPatternSave) ||
-	     !AGH_GBGETOBJ3 (_p.builder, GtkButton,		bPatternDiscard) ||
-	     !AGH_GBGETOBJ3 (_p.builder, GtkSpinButton,		ePatternEnvTightness) ||
-	     !AGH_GBGETOBJ3 (_p.builder, GtkSpinButton,		ePatternFilterOrder) ||
-	     !AGH_GBGETOBJ3 (_p.builder, GtkSpinButton,		ePatternFilterCutoff) ||
-	     !AGH_GBGETOBJ3 (_p.builder, GtkSpinButton,		ePatternDZCDFStep) ||
-	     !AGH_GBGETOBJ3 (_p.builder, GtkSpinButton,		ePatternDZCDFSigma) ||
-	     !AGH_GBGETOBJ3 (_p.builder, GtkSpinButton,		ePatternDZCDFSmooth) ||
-	     !AGH_GBGETOBJ3 (_p.builder, GtkSpinButton,		ePatternParameterA) ||
-	     !AGH_GBGETOBJ3 (_p.builder, GtkSpinButton,		ePatternParameterB) ||
-	     !AGH_GBGETOBJ3 (_p.builder, GtkSpinButton,		ePatternParameterC) ||
-	     !AGH_GBGETOBJ3 (_p.builder, GtkHBox,		cPatternLabelBox) ||
-	     !AGH_GBGETOBJ3 (_p.builder, GtkLabel,		lPatternSimilarity) ||
-	     !AGH_GBGETOBJ3 (_p.builder, GtkComboBox,		ePatternList) ||
-	     !AGH_GBGETOBJ3 (_p.builder, GtkComboBox,		ePatternChannel) ||
-	     !AGH_GBGETOBJ3 (_p.builder, GtkDialog,		wPatternName) ||
-	     !AGH_GBGETOBJ3 (_p.builder, GtkEntry,		ePatternNameName) ||
-	     !AGH_GBGETOBJ3 (_p.builder, GtkCheckButton,	ePatternNameSaveGlobally) )
-		return -1;
-
-	gtk_combo_box_set_model( ePatternList,
-				 (GtkTreeModel*)mPatterns);
-	gtk_combo_box_set_id_column( ePatternList, 0);
-	renderer = gtk_cell_renderer_text_new();
-	gtk_cell_layout_pack_start( (GtkCellLayout*)ePatternList, renderer, FALSE);
-	gtk_cell_layout_set_attributes( (GtkCellLayout*)ePatternList, renderer,
-					"text", 0,
-					NULL);
-	ePatternList_changed_cb_handler_id =
-		g_signal_connect( ePatternList, "changed",
-				  G_CALLBACK (ePatternList_changed_cb),
-				  this);
-
-	gtk_combo_box_set_model( ePatternChannel,
-				 (GtkTreeModel*)_p._p.mAllChannels);
-	gtk_combo_box_set_id_column( ePatternChannel, 0);
-	renderer = gtk_cell_renderer_text_new();
-	gtk_cell_layout_pack_start( (GtkCellLayout*)ePatternChannel, renderer, FALSE);
-	gtk_cell_layout_set_attributes( (GtkCellLayout*)ePatternChannel, renderer,
-					"text", 0,
-					NULL);
-
-	ePatternChannel_changed_cb_handler_id =
-		g_signal_connect( ePatternChannel, "changed",
-				  G_CALLBACK (ePatternChannel_changed_cb),
-				  this);
-
-	g_signal_connect( daPatternSelection, "draw",
-			  G_CALLBACK (daPatternSelection_draw_cb),
-			  this);
-	g_signal_connect( daPatternSelection, "scroll-event",
-			  G_CALLBACK (daPatternSelection_scroll_event_cb),
-			  this);
-	g_signal_connect( bPatternFindNext, "clicked",
-			  G_CALLBACK (bPatternFind_clicked_cb),
-			  this);
-	g_signal_connect( bPatternFindPrevious, "clicked",
-			  G_CALLBACK (bPatternFind_clicked_cb),
-			  this);
-	g_signal_connect( bPatternSave, "clicked",
-			  G_CALLBACK (bPatternSave_clicked_cb),
-			  this);
-	g_signal_connect( bPatternDiscard, "clicked",
-			  G_CALLBACK (bPatternDiscard_clicked_cb),
-			  this);
-
-	g_signal_connect( ePatternEnvTightness, "value-changed",
-			  G_CALLBACK (ePattern_any_value_changed_cb),
-			  this);
-	g_signal_connect( ePatternFilterCutoff, "value-changed",
-			  G_CALLBACK (ePattern_any_value_changed_cb),
-			  this);
-	g_signal_connect( ePatternFilterOrder, "value-changed",
-			  G_CALLBACK (ePattern_any_value_changed_cb),
-			  this);
-	g_signal_connect( ePatternDZCDFStep, "value-changed",
-			  G_CALLBACK (ePattern_any_value_changed_cb),
-			  this);
-	g_signal_connect( ePatternDZCDFSigma, "value-changed",
-			  G_CALLBACK (ePattern_any_value_changed_cb),
-			  this);
-	g_signal_connect( ePatternDZCDFSmooth, "value-changed",
-			  G_CALLBACK (ePattern_any_value_changed_cb),
-			  this);
-	g_signal_connect( ePatternParameterA, "value-changed",
-			  G_CALLBACK (ePattern_any_value_changed_cb),
-			  this);
-	g_signal_connect( ePatternParameterB, "value-changed",
-			  G_CALLBACK (ePattern_any_value_changed_cb),
-			  this);
-	g_signal_connect( ePatternParameterC, "value-changed",
-			  G_CALLBACK (ePattern_any_value_changed_cb),
-			  this);
-
-	g_signal_connect( wPattern, "show",
-			  G_CALLBACK (wPattern_show_cb),
-			  this);
-	g_signal_connect( wPattern, "hide",
-			  G_CALLBACK (wPattern_hide_cb),
-			  this);
-	return 0;
-}
-
 
 
 
diff --git a/src/ui/scoring-facility-phasediff.cc b/src/ui/scoring-facility-phasediff.cc
index 14e693a..5c1a342 100644
--- a/src/ui/scoring-facility-phasediff.cc
+++ b/src/ui/scoring-facility-phasediff.cc
@@ -16,14 +16,13 @@
 #include "../common/lang.hh"
 #include "misc.hh"
 #include "scoring-facility.hh"
-#include "scoring-facility_cb.hh"
 
 
 using namespace std;
 
 
 aghui::SScoringFacility::SPhasediffDialog::
-SPhasediffDialog( aghui::SScoringFacility& parent)
+SPhasediffDialog (aghui::SScoringFacility& parent)
       : channel1 (nullptr),
 	channel2 (nullptr),
 	use_original_signal (false),
@@ -38,82 +37,12 @@ SPhasediffDialog( aghui::SScoringFacility& parent)
 }
 
 aghui::SScoringFacility::SPhasediffDialog::
-~SPhasediffDialog()
+~SPhasediffDialog ()
 {
 	gtk_widget_destroy( (GtkWidget*)wSFPD);
 }
 
 
-int
-aghui::SScoringFacility::SPhasediffDialog::
-construct_widgets()
-{
-	GtkCellRenderer *renderer;
-
-      // ------- wPhaseDiff
-	if ( !(AGH_GBGETOBJ3 (_p.builder, GtkDialog, wSFPD)) ||
-	     !(AGH_GBGETOBJ3 (_p.builder, GtkDrawingArea, daSFPD)) ||
-	     !(AGH_GBGETOBJ3 (_p.builder, GtkComboBox, eSFPDChannelA)) ||
-	     !(AGH_GBGETOBJ3 (_p.builder, GtkComboBox, eSFPDChannelB)) ||
-	     !(AGH_GBGETOBJ3 (_p.builder, GtkSpinButton, eSFPDFreqFrom)) ||
-	     !(AGH_GBGETOBJ3 (_p.builder, GtkSpinButton, eSFPDBandwidth)) ||
-	     !(AGH_GBGETOBJ3 (_p.builder, GtkScaleButton, eSFPDSmooth)) )
-		return -1;
-
-	gtk_combo_box_set_model( eSFPDChannelA,
-				 (GtkTreeModel*)_p._p.mEEGChannels);
-	renderer = gtk_cell_renderer_text_new();
-	gtk_cell_layout_pack_start( (GtkCellLayout*)eSFPDChannelA, renderer, FALSE);
-	gtk_cell_layout_set_attributes( (GtkCellLayout*)eSFPDChannelA, renderer,
-					"text", 0,
-					NULL);
-	eSFPDChannelA_changed_cb_handler_id =
-		g_signal_connect( eSFPDChannelA, "changed",
-				  G_CALLBACK (eSFPDChannelA_changed_cb),
-				  this);
-
-	gtk_combo_box_set_model( eSFPDChannelB,
-				 (GtkTreeModel*)_p._p.mEEGChannels);
-	renderer = gtk_cell_renderer_text_new();
-	gtk_cell_layout_pack_start( (GtkCellLayout*)eSFPDChannelB, renderer, FALSE);
-	gtk_cell_layout_set_attributes( (GtkCellLayout*)eSFPDChannelB, renderer,
-					"text", 0,
-					NULL);
-	eSFPDChannelB_changed_cb_handler_id =
-		g_signal_connect( eSFPDChannelB, "changed",
-				  G_CALLBACK (eSFPDChannelB_changed_cb),
-				  this);
-
-	g_signal_connect( daSFPD, "draw",
-			  G_CALLBACK (daSFPD_draw_cb),
-			  this);
-	g_signal_connect( daSFPD, "scroll-event",
-			  G_CALLBACK (daSFPD_scroll_event_cb),
-			  this);
-	g_signal_connect( eSFPDChannelA, "changed",
-			  G_CALLBACK (eSFPDChannelA_changed_cb),
-			  this);
-	g_signal_connect( eSFPDChannelB, "changed",
-			  G_CALLBACK (eSFPDChannelB_changed_cb),
-			  this);
-	g_signal_connect( eSFPDFreqFrom, "value-changed",
-			  G_CALLBACK (eSFPDFreqFrom_value_changed_cb),
-			  this);
-	g_signal_connect( eSFPDBandwidth, "value-changed",
-			  G_CALLBACK (eSFPDBandwidth_value_changed_cb),
-			  this);
-	g_signal_connect( eSFPDSmooth, "value-changed",
-			  G_CALLBACK (eSFPDSmooth_value_changed_cb),
-			  this);
-	g_signal_connect( wSFPD, "show",
-			  G_CALLBACK (wSFPD_show_cb),
-			  this);
-	g_signal_connect( wSFPD, "hide",
-			  G_CALLBACK (wSFPD_hide_cb),
-			  this);
-	return 0;
-}
-
 
 
 
diff --git a/src/ui/scoring-facility.cc b/src/ui/scoring-facility.cc
index c1d505b..811f30b 100644
--- a/src/ui/scoring-facility.cc
+++ b/src/ui/scoring-facility.cc
@@ -88,8 +88,6 @@ SScoringFacility (agh::CSubject& J,
 	using_channel (nullptr),
 	da_ht (NAN) // bad value, to be estimated unless previously saved
 {
-	aghui::SBusyBlock bb (_p.wMainWindow);
-
       // complete widget construction
 	builder = gtk_builder_new();
 	if ( !gtk_builder_add_from_resource( builder, "/org/gtk/aghermann/sf.glade", NULL) ) {
@@ -104,6 +102,8 @@ SScoringFacility (agh::CSubject& J,
 	gtk_builder_connect_signals( builder, NULL);
 	//  we do it all mostly ourself, except for some delete-event binding to gtk_true()
 
+	aghui::SBusyBlock bb (_p.wMainWindow);
+
       // histogram -> scores
 	get_hypnogram();
 	calculate_scored_percent();

-- 
Sleep experiment manager



More information about the debian-med-commit mailing list