[med-svn] [aghermann] 65/85: yet better AGH_GBGETOBJ
andrei zavada
hmmr-guest at alioth.debian.org
Thu Sep 26 23:46:34 UTC 2013
This is an automated email from the git hooks/post-receive script.
hmmr-guest pushed a commit to branch master
in repository aghermann.
commit 600b4be5c99071949ce02bb9e506db574954cfd0
Author: Andrei Zavada <johnhommer at gmail.com>
Date: Sun Sep 22 01:43:40 2013 +0300
yet better AGH_GBGETOBJ
---
upstream/src/aghermann/ui/mf/mf-construct.cc | 41 ++-
upstream/src/aghermann/ui/mw/construct.cc | 371 +++++++++-----------
upstream/src/aghermann/ui/sf/construct.cc | 298 ++++++++--------
.../ui/sf/d/artifacts-simple-construct.cc | 7 +-
.../src/aghermann/ui/sf/d/filters-construct.cc | 19 +-
upstream/src/aghermann/ui/sf/d/patterns.cc | 99 +++---
.../src/aghermann/ui/sf/d/phasediff-construct.cc | 15 +-
upstream/src/aghermann/ui/sf/d/rk1968.cc | 33 +-
upstream/src/aghermann/ui/sm/sm-construct.cc | 18 +-
upstream/src/aghermann/ui/ui.hh | 7 +-
upstream/src/tools/edfhed-gtk.cc | 47 +--
11 files changed, 448 insertions(+), 507 deletions(-)
diff --git a/upstream/src/aghermann/ui/mf/mf-construct.cc b/upstream/src/aghermann/ui/mf/mf-construct.cc
index d4b3a36..e62580b 100644
--- a/upstream/src/aghermann/ui/mf/mf-construct.cc
+++ b/upstream/src/aghermann/ui/mf/mf-construct.cc
@@ -19,27 +19,26 @@ int
SModelrunFacility::
construct_widgets()
{
- if ( !(AGH_GBGETOBJ (wModelrunFacility)) ||
- !(AGH_GBGETOBJ (daMFProfile)) ||
- !(AGH_GBGETOBJ (lMFLog)) ||
- !(AGH_GBGETOBJ (eMFLiveUpdate)) ||
- !(AGH_GBGETOBJ (eMFHighlightWake)) ||
- !(AGH_GBGETOBJ (eMFHighlightNREM)) ||
- !(AGH_GBGETOBJ (eMFHighlightREM)) ||
- !(AGH_GBGETOBJ (eMFLiveUpdate)) ||
- !(AGH_GBGETOBJ (eMFSmooth)) ||
- !(AGH_GBGETOBJ (cMFControls)) ||
- !(AGH_GBGETOBJ (lMFCostFunction)) ||
- !(AGH_GBGETOBJ (eMFClassicFit)) ||
- !(AGH_GBGETOBJ (lMFClassicFit)) ||
- !(AGH_GBGETOBJ (bMFRun)) ||
- !(AGH_GBGETOBJ (bMFReset)) ||
- !(AGH_GBGETOBJ (bMFAccept)) ||
- !(AGH_GBGETOBJ (eMFDB1)) ||
- !(AGH_GBGETOBJ (eMFDB2)) ||
- !(AGH_GBGETOBJ (eMFAZ1)) ||
- !(AGH_GBGETOBJ (eMFAZ2)) )
- throw runtime_error ("Failed to construct MF widgets (1)");
+ AGH_GBGETOBJ (wModelrunFacility);
+ AGH_GBGETOBJ (daMFProfile);
+ AGH_GBGETOBJ (lMFLog);
+ AGH_GBGETOBJ (eMFLiveUpdate);
+ AGH_GBGETOBJ (eMFHighlightWake);
+ AGH_GBGETOBJ (eMFHighlightNREM);
+ AGH_GBGETOBJ (eMFHighlightREM);
+ AGH_GBGETOBJ (eMFLiveUpdate);
+ AGH_GBGETOBJ (eMFSmooth);
+ AGH_GBGETOBJ (cMFControls);
+ AGH_GBGETOBJ (lMFCostFunction);
+ AGH_GBGETOBJ (eMFClassicFit);
+ AGH_GBGETOBJ (lMFClassicFit);
+ AGH_GBGETOBJ (bMFRun);
+ AGH_GBGETOBJ (bMFReset);
+ AGH_GBGETOBJ (bMFAccept);
+ AGH_GBGETOBJ (eMFDB1);
+ AGH_GBGETOBJ (eMFDB2);
+ AGH_GBGETOBJ (eMFAZ1);
+ AGH_GBGETOBJ (eMFAZ2);
G_CONNECT_2 (wModelrunFacility, delete, event);
G_CONNECT_2 (eMFSmooth, value, changed);
diff --git a/upstream/src/aghermann/ui/mw/construct.cc b/upstream/src/aghermann/ui/mw/construct.cc
index 3855e96..3873227 100644
--- a/upstream/src/aghermann/ui/mw/construct.cc
+++ b/upstream/src/aghermann/ui/mw/construct.cc
@@ -59,11 +59,11 @@ SExpDesignUIWidgets ()
G_TYPE_BOOLEAN,
G_TYPE_POINTER);
// static
- if ( !AGH_GBGETOBJ (mScoringPageSize) ||
- !AGH_GBGETOBJ (mFFTParamsPageSize) ||
- !AGH_GBGETOBJ (mFFTParamsBinSize) ||
- !AGH_GBGETOBJ (mFFTParamsWindowType) )
- throw runtime_error ("Failed to construct widgets");
+ AGH_GBGETOBJ (mScoringPageSize);
+ AGH_GBGETOBJ (mFFTParamsPageSize);
+ AGH_GBGETOBJ (mFFTParamsBinSize);
+ AGH_GBGETOBJ (mFFTParamsWindowType);
+
// (some of) these are directly attached to combo boxes in dauaghter widgets, so ref
g_object_ref( (GObject*)mScoringPageSize);
g_object_ref( (GObject*)mFFTParamsPageSize);
@@ -77,9 +77,8 @@ SExpDesignUIWidgets ()
// =========== 1. Measurements
// ------------- cMeasurements
- if ( !AGH_GBGETOBJ (wMainWindow) ||
- !AGH_GBGETOBJ (cMeasurements) )
- throw runtime_error ("Failed to construct widgets");
+ AGH_GBGETOBJ (wMainWindow);
+ AGH_GBGETOBJ (cMeasurements);
wMainWindow_delete_event_cb_handler_id =
G_CONNECT_2 (wMainWindow, delete, event);
@@ -93,27 +92,26 @@ SExpDesignUIWidgets ()
NULL, 0, GDK_ACTION_COPY);
gtk_drag_dest_add_uri_targets( (GtkWidget*)(cMeasurements));
- if ( !AGH_GBGETOBJ (iiMainMenu) ||
- !AGH_GBGETOBJ (iExpRefresh) ||
- !AGH_GBGETOBJ (iExpPurgeComputed) ||
- !AGH_GBGETOBJ (iExpAnnotations) ||
- !AGH_GBGETOBJ (iExpSubjectSortName) ||
- !AGH_GBGETOBJ (iExpSubjectSortAge) ||
- !AGH_GBGETOBJ (iExpSubjectSortAdmissionDate) ||
- !AGH_GBGETOBJ (iExpSubjectSortAvgPower) ||
- !AGH_GBGETOBJ (iExpSubjectSortAscending) ||
- !AGH_GBGETOBJ (iExpSubjectSortSegregate) ||
- !AGH_GBGETOBJ (iExpBasicSADetectUltradianCycles) ||
- !AGH_GBGETOBJ (iiExpGlobalOperations) ||
- !AGH_GBGETOBJ (iExpGloballyDetectArtifacts) ||
- !AGH_GBGETOBJ (iExpGloballySetFilters) ||
- !AGH_GBGETOBJ (iiExpSubjectSort) ||
- !AGH_GBGETOBJ (iMontageSetDefaults) ||
- !AGH_GBGETOBJ (iExpClose) ||
- !AGH_GBGETOBJ (iExpQuit) ||
- !AGH_GBGETOBJ (iHelpAbout) ||
- !AGH_GBGETOBJ (iHelpUsage) )
- throw runtime_error ("Failed to construct widgets");
+ AGH_GBGETOBJ (iiMainMenu);
+ AGH_GBGETOBJ (iExpRefresh);
+ AGH_GBGETOBJ (iExpPurgeComputed);
+ AGH_GBGETOBJ (iExpAnnotations);
+ AGH_GBGETOBJ (iExpSubjectSortName);
+ AGH_GBGETOBJ (iExpSubjectSortAge);
+ AGH_GBGETOBJ (iExpSubjectSortAdmissionDate);
+ AGH_GBGETOBJ (iExpSubjectSortAvgPower);
+ AGH_GBGETOBJ (iExpSubjectSortAscending);
+ AGH_GBGETOBJ (iExpSubjectSortSegregate);
+ AGH_GBGETOBJ (iExpBasicSADetectUltradianCycles);
+ AGH_GBGETOBJ (iiExpGlobalOperations);
+ AGH_GBGETOBJ (iExpGloballyDetectArtifacts);
+ AGH_GBGETOBJ (iExpGloballySetFilters);
+ AGH_GBGETOBJ (iiExpSubjectSort);
+ AGH_GBGETOBJ (iMontageSetDefaults);
+ AGH_GBGETOBJ (iExpClose);
+ AGH_GBGETOBJ (iExpQuit);
+ AGH_GBGETOBJ (iHelpAbout);
+ AGH_GBGETOBJ (iHelpUsage);
G_CONNECT_1 (iExpClose, activate);
// g_signal_connect( iExpClose, "activate",
@@ -138,14 +136,13 @@ SExpDesignUIWidgets ()
G_CONNECT_1 (iExpSubjectSortSegregate, toggled);
// --------- tabs
- if ( !AGH_GBGETOBJ (tTaskSelector) ||
- !AGH_GBGETOBJ (tDesign) ||
- !AGH_GBGETOBJ (tSimulations) ||
- !AGH_GBGETOBJ (tSettings) ||
- !AGH_GBGETOBJ (lTaskSelector1) ||
- !AGH_GBGETOBJ (lTaskSelector2) ||
- !AGH_GBGETOBJ (lSettings) )
- throw runtime_error ("Failed to construct widgets");
+ AGH_GBGETOBJ (tTaskSelector);
+ AGH_GBGETOBJ (tDesign);
+ AGH_GBGETOBJ (tSimulations);
+ AGH_GBGETOBJ (tSettings);
+ AGH_GBGETOBJ (lTaskSelector1);
+ AGH_GBGETOBJ (lTaskSelector2);
+ AGH_GBGETOBJ (lSettings);
G_CONNECT_2 (tTaskSelector, switch, page);
G_CONNECT_2 (tDesign, switch, page);
@@ -153,9 +150,8 @@ SExpDesignUIWidgets ()
// ------------- eMsmtSession, eMsmtChannel
- if ( !AGH_GBGETOBJ (eMsmtSession) ||
- !AGH_GBGETOBJ (eMsmtChannel) )
- throw runtime_error ("Failed to construct widgets");
+ AGH_GBGETOBJ (eMsmtSession);
+ AGH_GBGETOBJ (eMsmtChannel);
gtk_combo_box_set_model_properly(
eMsmtSession, mSessions);
@@ -168,34 +164,27 @@ SExpDesignUIWidgets ()
G_CONNECT_1 (eMsmtChannel, changed);
// ------------- eMsmtProfile*
- if ( !AGH_GBGETOBJ (eMsmtProfileAutoscale) ||
- !AGH_GBGETOBJ (eMsmtProfileSmooth) ||
-
- !AGH_GBGETOBJ (mMsmtProfileType) ||
- !AGH_GBGETOBJ (eMsmtProfileType) ||
- !AGH_GBGETOBJ (cMsmtProfileParamsContainer) ||
- !AGH_GBGETOBJ (cMsmtProfileParamsPSD) ||
- !AGH_GBGETOBJ (cMsmtProfileParamsSWU) ||
- !AGH_GBGETOBJ (cMsmtProfileParamsMC) ||
-
- !AGH_GBGETOBJ (eMsmtProfileParamsPSDFreqFrom) ||
- !AGH_GBGETOBJ (eMsmtProfileParamsPSDFreqWidth) ||
- !AGH_GBGETOBJ (jMsmtProfileParamsPSDFreqFrom) ||
- !AGH_GBGETOBJ (jMsmtProfileParamsPSDFreqWidth) ||
-
- !AGH_GBGETOBJ (eMsmtProfileParamsSWUF0) ||
- !AGH_GBGETOBJ (jMsmtProfileParamsSWUF0) ||
-
- !AGH_GBGETOBJ (eMsmtProfileParamsMCF0) ||
- !AGH_GBGETOBJ (jMsmtProfileParamsMCF0) ||
-
- !AGH_GBGETOBJ (lMsmtProfilePSDExtra) ||
- !AGH_GBGETOBJ (lMsmtProfileSWUExtra) ||
- !AGH_GBGETOBJ (lMsmtProfileMCExtra) ||
-
- !AGH_GBGETOBJ (cMsmtMainToolbar) ||
- !AGH_GBGETOBJ (cMsmtTopArea) )
- throw runtime_error ("Failed to construct widgets");
+ AGH_GBGETOBJ (eMsmtProfileAutoscale);
+ AGH_GBGETOBJ (eMsmtProfileSmooth);
+ AGH_GBGETOBJ (mMsmtProfileType);
+ AGH_GBGETOBJ (eMsmtProfileType);
+ AGH_GBGETOBJ (cMsmtProfileParamsContainer);
+ AGH_GBGETOBJ (cMsmtProfileParamsPSD);
+ AGH_GBGETOBJ (cMsmtProfileParamsSWU);
+ AGH_GBGETOBJ (cMsmtProfileParamsMC);
+ AGH_GBGETOBJ (eMsmtProfileParamsPSDFreqFrom);
+ AGH_GBGETOBJ (eMsmtProfileParamsPSDFreqWidth);
+ AGH_GBGETOBJ (jMsmtProfileParamsPSDFreqFrom);
+ AGH_GBGETOBJ (jMsmtProfileParamsPSDFreqWidth);
+ AGH_GBGETOBJ (eMsmtProfileParamsSWUF0);
+ AGH_GBGETOBJ (jMsmtProfileParamsSWUF0);
+ AGH_GBGETOBJ (eMsmtProfileParamsMCF0);
+ AGH_GBGETOBJ (jMsmtProfileParamsMCF0);
+ AGH_GBGETOBJ (lMsmtProfilePSDExtra);
+ AGH_GBGETOBJ (lMsmtProfileSWUExtra);
+ AGH_GBGETOBJ (lMsmtProfileMCExtra);
+ AGH_GBGETOBJ (cMsmtMainToolbar);
+ AGH_GBGETOBJ (cMsmtTopArea);
gtk_cell_layout_set_renderer( eMsmtProfileType);
// and when was the list store attached to it, eh?
@@ -210,14 +199,13 @@ SExpDesignUIWidgets ()
G_CONNECT_2 (eMsmtProfileParamsMCF0, value, changed);
// ------------ menus
- if ( !(AGH_GBGETOBJ (iiSubjectTimeline)) ||
- !(AGH_GBGETOBJ (iSubjectTimelineScore)) ||
- !(AGH_GBGETOBJ (iSubjectTimelineDetectUltradianCycle)) ||
- !(AGH_GBGETOBJ (iSubjectTimelineEDFInfo)) ||
- !(AGH_GBGETOBJ (iSubjectTimelineSaveAsSVG)) ||
- !(AGH_GBGETOBJ (iSubjectTimelineResetMontage)) ||
- !(AGH_GBGETOBJ (iSubjectTimelineBrowse)) )
- throw runtime_error ("Failed to construct widgets");
+ AGH_GBGETOBJ (iiSubjectTimeline);
+ AGH_GBGETOBJ (iSubjectTimelineScore);
+ AGH_GBGETOBJ (iSubjectTimelineDetectUltradianCycle);
+ AGH_GBGETOBJ (iSubjectTimelineEDFInfo);
+ AGH_GBGETOBJ (iSubjectTimelineSaveAsSVG);
+ AGH_GBGETOBJ (iSubjectTimelineResetMontage);
+ AGH_GBGETOBJ (iSubjectTimelineBrowse);
g_object_ref( (GObject*)iiSubjectTimeline);
g_object_ref( (GObject*)iSubjectTimelineScore);
@@ -235,15 +223,13 @@ SExpDesignUIWidgets ()
G_CONNECT_1 (iSubjectTimelineResetMontage, activate);
// ------------ actions
- if ( !(AGH_GBGETOBJ (bMainCloseThatSF)) )
- throw runtime_error ("Failed to construct widgets");
+ AGH_GBGETOBJ (bMainCloseThatSF);
G_CONNECT_1 (bMainCloseThatSF, clicked);
// ================ 2. Simulations
// ------------- tvSimulations & controls
- if ( !(AGH_GBGETOBJ (tvSimulations)) )
- throw runtime_error ("Failed to construct widgets");
+ AGH_GBGETOBJ (tvSimulations);
gtk_tree_view_set_model( tvSimulations,
(GtkTreeModel*)mSimulations);
@@ -288,30 +274,26 @@ SExpDesignUIWidgets ()
gtk_tree_view_column_set_visible( col, FALSE);
// ------------ iSimulations*
- if ( !(AGH_GBGETOBJ (iSimulationsRunBatch)) ||
- !(AGH_GBGETOBJ (iSimulationsRunClearAll)) ||
- !(AGH_GBGETOBJ (iSimulationsReportGenerate)) )
- throw runtime_error ("Failed to construct widgets");
+ AGH_GBGETOBJ (iSimulationsRunBatch);
+ AGH_GBGETOBJ (iSimulationsRunClearAll);
+ AGH_GBGETOBJ (iSimulationsReportGenerate);
G_CONNECT_1 (iSimulationsRunBatch, activate);
G_CONNECT_1 (iSimulationsRunClearAll, activate);
G_CONNECT_1 (iSimulationsReportGenerate, activate);
// ------------- lSimulations{Session,Channel}
- if ( !AGH_GBGETOBJ (lSimulationsProfile) ||
- !AGH_GBGETOBJ (lSimulationsChannel) ||
- !AGH_GBGETOBJ (lSimulationsSession) )
- throw runtime_error ("Failed to construct widgets");
+ AGH_GBGETOBJ (lSimulationsProfile);
+ AGH_GBGETOBJ (lSimulationsChannel);
+ AGH_GBGETOBJ (lSimulationsSession);
// ------- statusbar
- if ( !AGH_GBGETOBJ (sbMainStatusBar) )
- throw runtime_error ("Failed to construct widgets");
+ AGH_GBGETOBJ (sbMainStatusBar);
sbMainContextIdGeneral = gtk_statusbar_get_context_id( sbMainStatusBar, "General context");
- if ( !(AGH_GBGETOBJ (wScanLog)) ||
- !(AGH_GBGETOBJ (tScanLog)) )
- throw runtime_error ("Failed to construct widgets");
+ AGH_GBGETOBJ (wScanLog);
+ AGH_GBGETOBJ (tScanLog);
gtk_widget_override_font( (GtkWidget*)tScanLog, font_desc);
gtk_text_buffer_create_tag(
@@ -328,35 +310,31 @@ SExpDesignUIWidgets ()
// free? unref? leak some?
// ****************** settings
- if ( !AGH_GBGETOBJ (eSMPMaxThreads) )
- throw runtime_error ("Failed to construct widgets");
+ AGH_GBGETOBJ (eSMPMaxThreads);
// ------------- fFFTParams
- if ( !AGH_GBGETOBJ (eUltradianCycleDetectionAccuracy) ||
- !AGH_GBGETOBJ (eFFTParamsBinSize) ||
- !AGH_GBGETOBJ (eFFTParamsPageSize) ||
- !AGH_GBGETOBJ (eFFTParamsPlanType) ||
- !AGH_GBGETOBJ (eFFTParamsWindowType) )
- throw runtime_error ("Failed to construct widgets");
+ AGH_GBGETOBJ (eUltradianCycleDetectionAccuracy);
+ AGH_GBGETOBJ (eFFTParamsBinSize);
+ AGH_GBGETOBJ (eFFTParamsPageSize);
+ AGH_GBGETOBJ (eFFTParamsPlanType);
+ AGH_GBGETOBJ (eFFTParamsWindowType);
for ( auto& e : {eFFTParamsBinSize, eFFTParamsPageSize, eFFTParamsPlanType, eFFTParamsWindowType} )
gtk_cell_layout_set_renderer( e);
// ------------- fArtifacts
- if ( !AGH_GBGETOBJ (eArtifDampenWindowType) ||
- !AGH_GBGETOBJ (eArtifDampenFactor) )
- throw runtime_error ("Failed to construct widgets");
+ AGH_GBGETOBJ (eArtifDampenWindowType);
+ AGH_GBGETOBJ (eArtifDampenFactor);
gtk_cell_layout_set_renderer( eArtifDampenWindowType);
// ------------- fMicrocontinuity
- if ( !AGH_GBGETOBJ (eMCParamBandWidth) ||
- !AGH_GBGETOBJ (eMCParamIIRBackpolate) ||
- !AGH_GBGETOBJ (eMCParamMCGain) ||
- !AGH_GBGETOBJ (eMCParamFreqInc) ||
- !AGH_GBGETOBJ (eMCParamNBins) ||
- !AGH_GBGETOBJ (eSWUParamMinUpswingDuration) )
- throw runtime_error ("Failed to construct widgets");
+ AGH_GBGETOBJ (eMCParamBandWidth);
+ AGH_GBGETOBJ (eMCParamIIRBackpolate);
+ AGH_GBGETOBJ (eMCParamMCGain);
+ AGH_GBGETOBJ (eMCParamFreqInc);
+ AGH_GBGETOBJ (eMCParamNBins);
+ AGH_GBGETOBJ (eSWUParamMinUpswingDuration);
// ------- custom score codes
if ( !(eScoreCode[sigfile::SPage::TScore::none] = (GtkEntry*)gtk_builder_get_object( builder, "eScoreCodeUnscored")) ||
@@ -382,41 +360,37 @@ SExpDesignUIWidgets ()
throw runtime_error ("Failed to construct widgets");
// --------- Misc
- if ( !AGH_GBGETOBJ (eDAMsmtPPH) ||
- !AGH_GBGETOBJ (eDAMsmtTLHeight) ||
- !AGH_GBGETOBJ (eDAPageHeight) ||
- !AGH_GBGETOBJ (eDAHypnogramHeight) ||
- !AGH_GBGETOBJ (eDAEMGHeight) ||
- !AGH_GBGETOBJ (eScanTreeStrict) ||
- !AGH_GBGETOBJ (eScanTreeSuppressReport) )
- throw runtime_error ("Failed to construct widgets");
-
- if ( !AGH_GBGETOBJ (eBrowseCommand) ||
- !AGH_GBGETOBJ (eScrollSpeedFactor) ||
- !AGH_GBGETOBJ (eDAEMGHeight) )
- throw runtime_error ("Failed to construct widgets");
+ AGH_GBGETOBJ (eDAMsmtPPH);
+ AGH_GBGETOBJ (eDAMsmtTLHeight);
+ AGH_GBGETOBJ (eDAPageHeight);
+ AGH_GBGETOBJ (eDAHypnogramHeight);
+ AGH_GBGETOBJ (eDAEMGHeight);
+ AGH_GBGETOBJ (eScanTreeStrict);
+ AGH_GBGETOBJ (eScanTreeSuppressReport);
+ AGH_GBGETOBJ (eBrowseCommand);
+ AGH_GBGETOBJ (eScrollSpeedFactor);
+ AGH_GBGETOBJ (eDAEMGHeight);
// ------------- eCtrlParam*
- if ( !AGH_GBGETOBJ (eCtlParamAnnlNTries) ||
- !AGH_GBGETOBJ (eCtlParamAnnlItersFixedT) ||
- !AGH_GBGETOBJ (eCtlParamAnnlStepSize) ||
- !AGH_GBGETOBJ (eCtlParamAnnlBoltzmannk) ||
- !AGH_GBGETOBJ (eCtlParamAnnlDampingMu) ||
- !AGH_GBGETOBJ (eCtlParamAnnlTInitialMantissa) ||
- !AGH_GBGETOBJ (eCtlParamAnnlTInitialExponent) ||
- !AGH_GBGETOBJ (eCtlParamAnnlTMinMantissa) ||
- !AGH_GBGETOBJ (eCtlParamAnnlTMinExponent) ||
- !AGH_GBGETOBJ (eCtlParamDBAmendment1) ||
- !AGH_GBGETOBJ (eCtlParamDBAmendment2) ||
- !AGH_GBGETOBJ (eCtlParamAZAmendment1) ||
- !AGH_GBGETOBJ (lCtlParamDBAmendment1) ||
- !AGH_GBGETOBJ (lCtlParamDBAmendment2) ||
- !AGH_GBGETOBJ (lCtlParamAZAmendment1) ||
- !AGH_GBGETOBJ (eCtlParamScoreUnscoredAsWake) ||
- !AGH_GBGETOBJ (eCtlParamNSWAPpBeforeSimStart) ||
- !AGH_GBGETOBJ (eCtlParamReqScoredPercent) )
- throw runtime_error ("Failed to construct widgets");
+ AGH_GBGETOBJ (eCtlParamAnnlNTries);
+ AGH_GBGETOBJ (eCtlParamAnnlItersFixedT);
+ AGH_GBGETOBJ (eCtlParamAnnlStepSize);
+ AGH_GBGETOBJ (eCtlParamAnnlBoltzmannk);
+ AGH_GBGETOBJ (eCtlParamAnnlDampingMu);
+ AGH_GBGETOBJ (eCtlParamAnnlTInitialMantissa);
+ AGH_GBGETOBJ (eCtlParamAnnlTInitialExponent);
+ AGH_GBGETOBJ (eCtlParamAnnlTMinMantissa);
+ AGH_GBGETOBJ (eCtlParamAnnlTMinExponent);
+ AGH_GBGETOBJ (eCtlParamDBAmendment1);
+ AGH_GBGETOBJ (eCtlParamDBAmendment2);
+ AGH_GBGETOBJ (eCtlParamAZAmendment1);
+ AGH_GBGETOBJ (lCtlParamDBAmendment1);
+ AGH_GBGETOBJ (lCtlParamDBAmendment2);
+ AGH_GBGETOBJ (lCtlParamAZAmendment1);
+ AGH_GBGETOBJ (eCtlParamScoreUnscoredAsWake);
+ AGH_GBGETOBJ (eCtlParamNSWAPpBeforeSimStart);
+ AGH_GBGETOBJ (eCtlParamReqScoredPercent);
G_CONNECT_1 (eCtlParamDBAmendment1, toggled);
G_CONNECT_1 (eCtlParamDBAmendment2, toggled);
@@ -475,8 +449,8 @@ SExpDesignUIWidgets ()
jTunable[t][d] = gtk_spin_button_get_adjustment( eTunable[t][d]);
- if ( !AGH_GBGETOBJ (bSimParamRevertTunables) )
- throw runtime_error ("Failed to construct widgets");
+ AGH_GBGETOBJ (bSimParamRevertTunables);
+
G_CONNECT_1 (bSimParamRevertTunables, clicked);
// ------ colours
@@ -538,20 +512,17 @@ SExpDesignUIWidgets ()
// ========= child widgets
// ----- wAbout
- if ( !AGH_GBGETOBJ (wAbout) ||
- !AGH_GBGETOBJ (cAboutTabs) ||
- !AGH_GBGETOBJ (lAboutVersion) )
- throw runtime_error ("Failed to construct widgets");
+ AGH_GBGETOBJ (wAbout);
+ AGH_GBGETOBJ (cAboutTabs);
+ AGH_GBGETOBJ (lAboutVersion);
// ------- wEDFFileDetails
- if ( !AGH_GBGETOBJ (wEDFFileDetails) ||
- !AGH_GBGETOBJ (lEDFFileDetails) ||
- !AGH_GBGETOBJ (lEDFFileDetailsReport) )
- throw runtime_error ("Failed to construct widgets");
+ AGH_GBGETOBJ (wEDFFileDetails);
+ AGH_GBGETOBJ (lEDFFileDetails);
+ AGH_GBGETOBJ (lEDFFileDetailsReport);
// used by two GtkTextView's, lEDFFileDetailsReport and lEdfImportFileInfo
- if ( !AGH_GBGETOBJ (tEDFFileDetailsReport) )
- throw runtime_error ("Failed to construct widgets");
+ AGH_GBGETOBJ (tEDFFileDetailsReport);
gtk_widget_override_font( (GtkWidget*)lEDFFileDetailsReport, font_desc);
g_object_set( lEDFFileDetailsReport,
@@ -562,22 +533,20 @@ SExpDesignUIWidgets ()
NULL);
// ------- wEdfImport
- if ( !AGH_GBGETOBJ (wEdfImport) ||
- !AGH_GBGETOBJ (eEdfImportGroup) ||
- !AGH_GBGETOBJ (eEdfImportSession) ||
- !AGH_GBGETOBJ (eEdfImportEpisode) ||
- !AGH_GBGETOBJ (eEdfImportGroupEntry) ||
- !AGH_GBGETOBJ (eEdfImportSessionEntry) ||
- !AGH_GBGETOBJ (eEdfImportEpisodeEntry) ||
- !AGH_GBGETOBJ (lEdfImportSubject) ||
- !AGH_GBGETOBJ (lEdfImportCaption) ||
- !AGH_GBGETOBJ (lEdfImportFileInfo) ||
- !AGH_GBGETOBJ (bEdfImportAttachCopy) ||
- !AGH_GBGETOBJ (bEdfImportAttachMove) ||
- !AGH_GBGETOBJ (bEdfImportAdmit) ||
- !AGH_GBGETOBJ (bEdfImportEdfhed) )
- throw runtime_error ("Failed to construct widgets");
-
+ AGH_GBGETOBJ (wEdfImport);
+ AGH_GBGETOBJ (eEdfImportGroup);
+ AGH_GBGETOBJ (eEdfImportSession);
+ AGH_GBGETOBJ (eEdfImportEpisode);
+ AGH_GBGETOBJ (eEdfImportGroupEntry);
+ AGH_GBGETOBJ (eEdfImportSessionEntry);
+ AGH_GBGETOBJ (eEdfImportEpisodeEntry);
+ AGH_GBGETOBJ (lEdfImportSubject);
+ AGH_GBGETOBJ (lEdfImportCaption);
+ AGH_GBGETOBJ (lEdfImportFileInfo);
+ AGH_GBGETOBJ (bEdfImportAttachCopy);
+ AGH_GBGETOBJ (bEdfImportAttachMove);
+ AGH_GBGETOBJ (bEdfImportAdmit);
+ AGH_GBGETOBJ (bEdfImportEdfhed);
gtk_widget_override_font( (GtkWidget*)lEdfImportFileInfo, font_desc);
@@ -599,42 +568,31 @@ SExpDesignUIWidgets ()
this);
// ------------- wBatchSetup
- if ( !AGH_GBGETOBJ (wBatchSetup) ||
- !AGH_GBGETOBJ (eBatchSetupSubjects) ||
- !AGH_GBGETOBJ (eBatchSetupSessions) ||
- !AGH_GBGETOBJ (eBatchSetupChannels) ||
- !AGH_GBGETOBJ (eBatchSetupRangeFrom) ||
- !AGH_GBGETOBJ (eBatchSetupRangeWidth) ||
- !AGH_GBGETOBJ (eBatchSetupRangeInc) ||
- !AGH_GBGETOBJ (eBatchSetupRangeSteps) )
- throw runtime_error ("Failed to construct widgets");
-
- // // ------------- wMontageDefaults
- // if ( !AGH_GBGETOBJ (wMontageDefaults) ||
- // !AGH_GBGETOBJ (eMontageDefaultsChannelList) ||
- // !AGH_GBGETOBJ (eMontageDefaultsShowPSD) ||
- // !AGH_GBGETOBJ (eMontageDefaultsShowPSDSpectrum) ||
- // !AGH_GBGETOBJ (eMontageDefaultsShowMC) ||
- // !AGH_GBGETOBJ (eMontageDefaultsShowEMG) )
- // throw runtime_error ("Failed to construct widgets");
+ AGH_GBGETOBJ (wBatchSetup);
+ AGH_GBGETOBJ (eBatchSetupSubjects);
+ AGH_GBGETOBJ (eBatchSetupSessions);
+ AGH_GBGETOBJ (eBatchSetupChannels);
+ AGH_GBGETOBJ (eBatchSetupRangeFrom);
+ AGH_GBGETOBJ (eBatchSetupRangeWidth);
+ AGH_GBGETOBJ (eBatchSetupRangeInc);
+ AGH_GBGETOBJ (eBatchSetupRangeSteps);
// ----------- wGlobalFilters
- if ( !AGH_GBGETOBJ (wGlobalFilters) ||
- !AGH_GBGETOBJ (eGlobalFiltersLowPassCutoff) ||
- !AGH_GBGETOBJ (eGlobalFiltersLowPassOrder) ||
- !AGH_GBGETOBJ (eGlobalFiltersHighPassCutoff) ||
- !AGH_GBGETOBJ (eGlobalFiltersHighPassOrder) ||
- !AGH_GBGETOBJ (mGlobalFiltersNotchFilter) ||
- !AGH_GBGETOBJ (eGlobalFiltersNotchFilter) )
- throw runtime_error ("Failed to construct widgets");
+ AGH_GBGETOBJ (wGlobalFilters);
+ AGH_GBGETOBJ (eGlobalFiltersLowPassCutoff);
+ AGH_GBGETOBJ (eGlobalFiltersLowPassOrder);
+ AGH_GBGETOBJ (eGlobalFiltersHighPassCutoff);
+ AGH_GBGETOBJ (eGlobalFiltersHighPassOrder);
+ AGH_GBGETOBJ (mGlobalFiltersNotchFilter);
+ AGH_GBGETOBJ (eGlobalFiltersNotchFilter);
+
gtk_combo_box_set_model_properly(
eGlobalFiltersNotchFilter, mGlobalFiltersNotchFilter);
// ----------- wGlobalAnnotations
- if ( !AGH_GBGETOBJ (wGlobalAnnotations) ||
- !AGH_GBGETOBJ (tvGlobalAnnotations) ||
- !AGH_GBGETOBJ (eGlobalAnnotationsShowPhasicEvents) )
- throw runtime_error ("Failed to construct widgets");
+ AGH_GBGETOBJ (wGlobalAnnotations);
+ AGH_GBGETOBJ (tvGlobalAnnotations);
+ AGH_GBGETOBJ (eGlobalAnnotationsShowPhasicEvents);
gtk_tree_view_set_model( tvGlobalAnnotations,
(GtkTreeModel*)mGlobalAnnotations);
@@ -669,12 +627,11 @@ SExpDesignUIWidgets ()
G_CONNECT_1 (eGlobalAnnotationsShowPhasicEvents, toggled);
// ------------- wGlobalArtifactDetection
- if ( !AGH_GBGETOBJ (wGlobalArtifactDetection) ||
- !AGH_GBGETOBJ (eGlobalADProfiles) ||
- !AGH_GBGETOBJ (eGlobalADKeepExisting) ||
- !AGH_GBGETOBJ (bGlobalADOK) ||
- !AGH_GBGETOBJ (lGlobalADHint) )
- throw runtime_error ("Failed to construct widgets");
+ AGH_GBGETOBJ (wGlobalArtifactDetection);
+ AGH_GBGETOBJ (eGlobalADProfiles);
+ AGH_GBGETOBJ (eGlobalADKeepExisting);
+ AGH_GBGETOBJ (bGlobalADOK);
+ AGH_GBGETOBJ (lGlobalADHint);
gtk_combo_box_set_model_properly(
eGlobalADProfiles, mGlobalADProfiles);
diff --git a/upstream/src/aghermann/ui/sf/construct.cc b/upstream/src/aghermann/ui/sf/construct.cc
index 0022e7f..aa4fd94 100644
--- a/upstream/src/aghermann/ui/sf/construct.cc
+++ b/upstream/src/aghermann/ui/sf/construct.cc
@@ -30,43 +30,41 @@ SScoringFacilityWidgets ()
// we do it all mostly ourself, except for some delete-event binding to gtk_true()
// general & montage page navigation
- if ( !AGH_GBGETOBJ (wSF) ||
- !AGH_GBGETOBJ (lSFHint) ||
- !AGH_GBGETOBJ (mSFScoringPageSize) ||
- !AGH_GBGETOBJ (eSFPageSize) ||
- !AGH_GBGETOBJ (eSFCurrentPage) ||
- !AGH_GBGETOBJ (jSFPageNo) ||
- !AGH_GBGETOBJ (lSFTotalPages) ||
- !AGH_GBGETOBJ (eSFCurrentPos) ||
- !AGH_GBGETOBJ (cSFHypnogram) ||
- !AGH_GBGETOBJ (cSFControlBar) ||
- !AGH_GBGETOBJ (cSFScoringModeContainer) ||
- !AGH_GBGETOBJ (cSFICAModeContainer) ||
-
- !AGH_GBGETOBJ (bSFBack) ||
- !AGH_GBGETOBJ (bSFForward) ||
- !AGH_GBGETOBJ (bSFGotoPrevUnscored) ||
- !AGH_GBGETOBJ (bSFGotoNextUnscored) ||
- !AGH_GBGETOBJ (bSFGotoPrevArtifact) ||
- !AGH_GBGETOBJ (bSFGotoNextArtifact) ||
- !AGH_GBGETOBJ (bSFDrawCrosshair) ||
-
- !AGH_GBGETOBJ (iSFMontageMenu) ||
- !AGH_GBGETOBJ (iSFMontageDrawOriginalSignal) ||
- !AGH_GBGETOBJ (iSFMontageDrawProcessedSignal) ||
- !AGH_GBGETOBJ (iSFMontageDrawZeroLine) ||
- !AGH_GBGETOBJ (iSFMontageDrawFast) ||
-// !AGH_GBGETOBJ (iSFMontageDraw) ||
- !AGH_GBGETOBJ (iSFMontagePatterns) ||
- !AGH_GBGETOBJ (iSFMontageICA) ||
- !AGH_GBGETOBJ (iSFMontagePhaseDiff) ||
- !AGH_GBGETOBJ (iSFMontageScoreAssist) ||
- !AGH_GBGETOBJ (iSFMontageScoreImport) ||
- !AGH_GBGETOBJ (iSFMontageScoreExport) ||
- !AGH_GBGETOBJ (iSFMontageScoreClear) ||
- !AGH_GBGETOBJ (iSFMontageClose) ||
- !AGH_GBGETOBJ (iSFMontageCloseAndNext) )
- throw runtime_error ("Failed to construct SF widgets (1)");
+ AGH_GBGETOBJ (wSF);
+ AGH_GBGETOBJ (lSFHint);
+ AGH_GBGETOBJ (mSFScoringPageSize);
+ AGH_GBGETOBJ (eSFPageSize);
+ AGH_GBGETOBJ (eSFCurrentPage);
+ AGH_GBGETOBJ (jSFPageNo);
+ AGH_GBGETOBJ (lSFTotalPages);
+ AGH_GBGETOBJ (eSFCurrentPos);
+ AGH_GBGETOBJ (cSFHypnogram);
+ AGH_GBGETOBJ (cSFControlBar);
+ AGH_GBGETOBJ (cSFScoringModeContainer);
+ AGH_GBGETOBJ (cSFICAModeContainer);
+
+ AGH_GBGETOBJ (bSFBack);
+ AGH_GBGETOBJ (bSFForward);
+ AGH_GBGETOBJ (bSFGotoPrevUnscored);
+ AGH_GBGETOBJ (bSFGotoNextUnscored);
+ AGH_GBGETOBJ (bSFGotoPrevArtifact);
+ AGH_GBGETOBJ (bSFGotoNextArtifact);
+ AGH_GBGETOBJ (bSFDrawCrosshair);
+ AGH_GBGETOBJ (iSFMontageMenu);
+ AGH_GBGETOBJ (iSFMontageDrawOriginalSignal);
+ AGH_GBGETOBJ (iSFMontageDrawProcessedSignal);
+ AGH_GBGETOBJ (iSFMontageDrawZeroLine);
+ AGH_GBGETOBJ (iSFMontageDrawFast);
+// AGH_GBGETOBJ (iSFMontageDraw);
+ AGH_GBGETOBJ (iSFMontagePatterns);
+ AGH_GBGETOBJ (iSFMontageICA);
+ AGH_GBGETOBJ (iSFMontagePhaseDiff);
+ AGH_GBGETOBJ (iSFMontageScoreAssist);
+ AGH_GBGETOBJ (iSFMontageScoreImport);
+ AGH_GBGETOBJ (iSFMontageScoreExport);
+ AGH_GBGETOBJ (iSFMontageScoreClear);
+ AGH_GBGETOBJ (iSFMontageClose);
+ AGH_GBGETOBJ (iSFMontageCloseAndNext);
G_CONNECT_1 (iSFMontageMenu, activate);
@@ -105,19 +103,18 @@ SScoringFacilityWidgets ()
G_CONNECT_1 (iSFMontageClose, activate);
G_CONNECT_1 (iSFMontageCloseAndNext, activate);
- if ( !(AGH_GBGETOBJ (bSFScoreClear)) ||
- !(AGH_GBGETOBJ (bSFScoreNREM1)) ||
- !(AGH_GBGETOBJ (bSFScoreNREM2)) ||
- !(AGH_GBGETOBJ (bSFScoreNREM3)) ||
- !(AGH_GBGETOBJ (bSFScoreNREM4)) ||
- !(AGH_GBGETOBJ (bSFScoreREM)) ||
- !(AGH_GBGETOBJ (bSFScoreWake)) ||
- !(AGH_GBGETOBJ (cSFSleepStageStats)) ||
- !(AGH_GBGETOBJ (lSFPercentScored)) ||
- !(AGH_GBGETOBJ (lScoreStatsNREMPercent)) ||
- !(AGH_GBGETOBJ (lScoreStatsREMPercent)) ||
- !(AGH_GBGETOBJ (lScoreStatsWakePercent)) )
- throw runtime_error ("Failed to construct SF widgets (2)");
+ AGH_GBGETOBJ (bSFScoreClear);
+ AGH_GBGETOBJ (bSFScoreNREM1);
+ AGH_GBGETOBJ (bSFScoreNREM2);
+ AGH_GBGETOBJ (bSFScoreNREM3);
+ AGH_GBGETOBJ (bSFScoreNREM4);
+ AGH_GBGETOBJ (bSFScoreREM);
+ AGH_GBGETOBJ (bSFScoreWake);
+ AGH_GBGETOBJ (cSFSleepStageStats);
+ AGH_GBGETOBJ (lSFPercentScored);
+ AGH_GBGETOBJ (lScoreStatsNREMPercent);
+ AGH_GBGETOBJ (lScoreStatsREMPercent);
+ AGH_GBGETOBJ (lScoreStatsWakePercent);
G_CONNECT_1 (bSFScoreClear, clicked);
G_CONNECT_1 (bSFScoreNREM1, clicked);
@@ -127,10 +124,9 @@ SScoringFacilityWidgets ()
G_CONNECT_1 (bSFScoreREM, clicked);
G_CONNECT_1 (bSFScoreWake, clicked);
- if ( !(AGH_GBGETOBJ (daSFMontage)) ||
- !(AGH_GBGETOBJ (daSFHypnogram)) ||
- !(AGH_GBGETOBJ (sbSF)) )
- throw runtime_error ("Failed to construct SF widgets (3)");
+ AGH_GBGETOBJ (daSFMontage);
+ AGH_GBGETOBJ (daSFHypnogram);
+ AGH_GBGETOBJ (sbSF);
sbSFContextIdGeneral = gtk_statusbar_get_context_id( sbSF, "General context");
@@ -148,34 +144,33 @@ SScoringFacilityWidgets ()
G_CONNECT_3 (daSFHypnogram, motion, notify, event);
// ICA
- if ( !(AGH_GBGETOBJ (eSFICARemixMode)) ||
- !(AGH_GBGETOBJ (eSFICANonlinearity)) ||
- !(AGH_GBGETOBJ (eSFICAApproach)) ||
- !(AGH_GBGETOBJ (mSFICARemixMode)) ||
- !(AGH_GBGETOBJ (mSFICANonlinearity)) ||
- !(AGH_GBGETOBJ (mSFICAApproach)) ||
- !(AGH_GBGETOBJ (eSFICAFineTune)) ||
- !(AGH_GBGETOBJ (eSFICAStabilizationMode)) ||
- !(AGH_GBGETOBJ (eSFICAa1)) ||
- !(AGH_GBGETOBJ (eSFICAa2)) ||
- !(AGH_GBGETOBJ (eSFICAmu)) ||
- !(AGH_GBGETOBJ (eSFICAepsilon)) ||
- !(AGH_GBGETOBJ (eSFICANofICs)) ||
- !(AGH_GBGETOBJ (jSFICANofICs)) ||
- !(AGH_GBGETOBJ (eSFICAEigVecFirst)) ||
- !(AGH_GBGETOBJ (eSFICAEigVecLast)) ||
- !(AGH_GBGETOBJ (jSFICAEigVecFirst)) ||
- !(AGH_GBGETOBJ (jSFICAEigVecLast)) ||
- !(AGH_GBGETOBJ (eSFICASampleSizePercent)) ||
- !(AGH_GBGETOBJ (eSFICAMaxIterations)) ||
- !(AGH_GBGETOBJ (bSFICATry)) ||
- !(AGH_GBGETOBJ (bSFICAPreview)) ||
- !(AGH_GBGETOBJ (bSFICAShowMatrix)) ||
- !(AGH_GBGETOBJ (bSFICAApply)) ||
- !(AGH_GBGETOBJ (bSFICACancel)) ||
- !(AGH_GBGETOBJ (wSFICAMatrix)) ||
- !(AGH_GBGETOBJ (tSFICAMatrix)) )
- throw runtime_error ("Failed to construct SF widgets (4)");
+ AGH_GBGETOBJ (eSFICARemixMode);
+ AGH_GBGETOBJ (eSFICANonlinearity);
+ AGH_GBGETOBJ (eSFICAApproach);
+ AGH_GBGETOBJ (mSFICARemixMode);
+ AGH_GBGETOBJ (mSFICANonlinearity);
+ AGH_GBGETOBJ (mSFICAApproach);
+ AGH_GBGETOBJ (eSFICAFineTune);
+ AGH_GBGETOBJ (eSFICAStabilizationMode);
+ AGH_GBGETOBJ (eSFICAa1);
+ AGH_GBGETOBJ (eSFICAa2);
+ AGH_GBGETOBJ (eSFICAmu);
+ AGH_GBGETOBJ (eSFICAepsilon);
+ AGH_GBGETOBJ (eSFICANofICs);
+ AGH_GBGETOBJ (jSFICANofICs);
+ AGH_GBGETOBJ (eSFICAEigVecFirst);
+ AGH_GBGETOBJ (eSFICAEigVecLast);
+ AGH_GBGETOBJ (jSFICAEigVecFirst);
+ AGH_GBGETOBJ (jSFICAEigVecLast);
+ AGH_GBGETOBJ (eSFICASampleSizePercent);
+ AGH_GBGETOBJ (eSFICAMaxIterations);
+ AGH_GBGETOBJ (bSFICATry);
+ AGH_GBGETOBJ (bSFICAPreview);
+ AGH_GBGETOBJ (bSFICAShowMatrix);
+ AGH_GBGETOBJ (bSFICAApply);
+ AGH_GBGETOBJ (bSFICACancel);
+ AGH_GBGETOBJ (wSFICAMatrix);
+ AGH_GBGETOBJ (tSFICAMatrix);
gtk_combo_box_set_model_properly( eSFICANonlinearity, mSFICANonlinearity);
gtk_combo_box_set_model_properly( eSFICAApproach, mSFICAApproach);
@@ -212,70 +207,64 @@ SScoringFacilityWidgets ()
G_CONNECT_1 (bSFICACancel, clicked);
// ------- menus
- if ( !(AGH_GBGETOBJ (lSFOverChannel)) ||
- !(AGH_GBGETOBJ (iiSFPage)) ||
- !(AGH_GBGETOBJ (iiSFICAPage)) ||
- !(AGH_GBGETOBJ (iiSFPageSelection)) ||
- !(AGH_GBGETOBJ (iiSFPageAnnotation)) ||
- !(AGH_GBGETOBJ (iiSFPageProfiles)) ||
- !(AGH_GBGETOBJ (iiSFPagePhasicEvents)) ||
- !(AGH_GBGETOBJ (iiSFPageHidden)) ||
- !(AGH_GBGETOBJ (iiSFPower)) ||
- !(AGH_GBGETOBJ (iiSFScore)) ||
-
- !(AGH_GBGETOBJ (iSFPageShowOriginal)) ||
- !(AGH_GBGETOBJ (iSFPageShowProcessed)) ||
- !(AGH_GBGETOBJ (iSFPageUseResample)) ||
- !(AGH_GBGETOBJ (iSFPageDrawZeroline)) ||
- !(AGH_GBGETOBJ (iSFPageProfilesSubmenuSeparator)) ||
- !(AGH_GBGETOBJ (iSFPageDrawPSDProfile)) ||
- !(AGH_GBGETOBJ (iSFPageDrawPSDSpectrum)) ||
- !(AGH_GBGETOBJ (iSFPageDrawSWUProfile)) ||
- !(AGH_GBGETOBJ (iSFPageDrawMCProfile)) ||
- !(AGH_GBGETOBJ (iSFPageDrawEMGProfile)) ||
- !(AGH_GBGETOBJ (iSFPageDrawPhasicSpindles)) ||
- !(AGH_GBGETOBJ (iSFPageDrawPhasicKComplexes)) ||
- !(AGH_GBGETOBJ (iSFPageDrawPhasicEyeBlinks)) ||
- !(AGH_GBGETOBJ (iSFPageFilter)) ||
- !(AGH_GBGETOBJ (iSFPageSaveChannelAsSVG)) ||
- !(AGH_GBGETOBJ (iSFPageSaveMontageAsSVG)) ||
- !(AGH_GBGETOBJ (iSFPageExportSignal)) ||
- !(AGH_GBGETOBJ (iSFPageUseThisScale)) ||
- !(AGH_GBGETOBJ (iSFPageArtifactsDetect)) ||
- !(AGH_GBGETOBJ (iSFPageArtifactsClear)) ||
- !(AGH_GBGETOBJ (iSFPageArtifactsMarkFlat)) ||
- !(AGH_GBGETOBJ (iSFPageHide)) ||
- !(AGH_GBGETOBJ (iSFPageHidden)) ||
- !(AGH_GBGETOBJ (iSFPageSpaceEvenly)) ||
- !(AGH_GBGETOBJ (iSFPageLocateSelection)) ||
-
- !(AGH_GBGETOBJ (iSFPageAnnotationSeparator)) ||
- !(AGH_GBGETOBJ (iSFPageAnnotationDelete)) ||
- !(AGH_GBGETOBJ (iSFPageAnnotationEdit)) ||
- !(AGH_GBGETOBJ (iSFPageAnnotationClearAll)) ||
- !(AGH_GBGETOBJ (iSFPageAnnotationGotoNext)) ||
- !(AGH_GBGETOBJ (iSFPageAnnotationGotoPrev)) ||
-
- !(AGH_GBGETOBJ (iSFPageSelectionMarkArtifact)) ||
- !(AGH_GBGETOBJ (iSFPageSelectionClearArtifact)) ||
- !(AGH_GBGETOBJ (iSFPageSelectionFindPattern)) ||
- !(AGH_GBGETOBJ (iSFPageSelectionAnnotate)) ||
- !(AGH_GBGETOBJ (iSFPageSelectionDrawCourse)) ||
- !(AGH_GBGETOBJ (iSFPageSelectionDrawEnvelope)) ||
- !(AGH_GBGETOBJ (iSFPageSelectionDrawDzxdf)) ||
-
- !(AGH_GBGETOBJ (iSFPowerExportRange)) ||
- !(AGH_GBGETOBJ (iSFPowerExportAll)) ||
- !(AGH_GBGETOBJ (iSFPowerSmooth)) ||
- !(AGH_GBGETOBJ (iSFPowerDrawBands)) ||
- !(AGH_GBGETOBJ (iSFPowerUseThisScale)) ||
- !(AGH_GBGETOBJ (iSFPowerAutoscale)) ||
-
- !(AGH_GBGETOBJ (iSFScoreAssist)) ||
- !(AGH_GBGETOBJ (iSFScoreImport)) ||
- !(AGH_GBGETOBJ (iSFScoreExport)) ||
- !(AGH_GBGETOBJ (iSFScoreClear)) )
- throw runtime_error ("Failed to construct SF widgets (5)");
+ AGH_GBGETOBJ (lSFOverChannel);
+ AGH_GBGETOBJ (iiSFPage);
+ AGH_GBGETOBJ (iiSFICAPage);
+ AGH_GBGETOBJ (iiSFPageSelection);
+ AGH_GBGETOBJ (iiSFPageAnnotation);
+ AGH_GBGETOBJ (iiSFPageProfiles);
+ AGH_GBGETOBJ (iiSFPagePhasicEvents);
+ AGH_GBGETOBJ (iiSFPageHidden);
+ AGH_GBGETOBJ (iiSFPower);
+ AGH_GBGETOBJ (iiSFScore);
+ AGH_GBGETOBJ (iSFPageShowOriginal);
+ AGH_GBGETOBJ (iSFPageShowProcessed);
+ AGH_GBGETOBJ (iSFPageUseResample);
+ AGH_GBGETOBJ (iSFPageDrawZeroline);
+ AGH_GBGETOBJ (iSFPageProfilesSubmenuSeparator);
+ AGH_GBGETOBJ (iSFPageDrawPSDProfile);
+ AGH_GBGETOBJ (iSFPageDrawPSDSpectrum);
+ AGH_GBGETOBJ (iSFPageDrawSWUProfile);
+ AGH_GBGETOBJ (iSFPageDrawMCProfile);
+ AGH_GBGETOBJ (iSFPageDrawEMGProfile);
+ AGH_GBGETOBJ (iSFPageDrawPhasicSpindles);
+ AGH_GBGETOBJ (iSFPageDrawPhasicKComplexes);
+ AGH_GBGETOBJ (iSFPageDrawPhasicEyeBlinks);
+ AGH_GBGETOBJ (iSFPageFilter);
+ AGH_GBGETOBJ (iSFPageSaveChannelAsSVG);
+ AGH_GBGETOBJ (iSFPageSaveMontageAsSVG);
+ AGH_GBGETOBJ (iSFPageExportSignal);
+ AGH_GBGETOBJ (iSFPageUseThisScale);
+ AGH_GBGETOBJ (iSFPageArtifactsDetect);
+ AGH_GBGETOBJ (iSFPageArtifactsClear);
+ AGH_GBGETOBJ (iSFPageArtifactsMarkFlat);
+ AGH_GBGETOBJ (iSFPageHide);
+ AGH_GBGETOBJ (iSFPageHidden);
+ AGH_GBGETOBJ (iSFPageSpaceEvenly);
+ AGH_GBGETOBJ (iSFPageLocateSelection);
+ AGH_GBGETOBJ (iSFPageAnnotationSeparator);
+ AGH_GBGETOBJ (iSFPageAnnotationDelete);
+ AGH_GBGETOBJ (iSFPageAnnotationEdit);
+ AGH_GBGETOBJ (iSFPageAnnotationClearAll);
+ AGH_GBGETOBJ (iSFPageAnnotationGotoNext);
+ AGH_GBGETOBJ (iSFPageAnnotationGotoPrev);
+ AGH_GBGETOBJ (iSFPageSelectionMarkArtifact);
+ AGH_GBGETOBJ (iSFPageSelectionClearArtifact);
+ AGH_GBGETOBJ (iSFPageSelectionFindPattern);
+ AGH_GBGETOBJ (iSFPageSelectionAnnotate);
+ AGH_GBGETOBJ (iSFPageSelectionDrawCourse);
+ AGH_GBGETOBJ (iSFPageSelectionDrawEnvelope);
+ AGH_GBGETOBJ (iSFPageSelectionDrawDzxdf);
+ AGH_GBGETOBJ (iSFPowerExportRange);
+ AGH_GBGETOBJ (iSFPowerExportAll);
+ AGH_GBGETOBJ (iSFPowerSmooth);
+ AGH_GBGETOBJ (iSFPowerDrawBands);
+ AGH_GBGETOBJ (iSFPowerUseThisScale);
+ AGH_GBGETOBJ (iSFPowerAutoscale);
+ AGH_GBGETOBJ (iSFScoreAssist);
+ AGH_GBGETOBJ (iSFScoreImport);
+ AGH_GBGETOBJ (iSFScoreExport);
+ AGH_GBGETOBJ (iSFScoreClear);
gtk_menu_item_set_submenu( iSFPageHidden, (GtkWidget*)iiSFPageHidden);
@@ -335,15 +324,14 @@ SScoringFacilityWidgets ()
// petty dialogs
// annotations
- if ( !AGH_GBGETOBJ (wSFAnnotationLabel) ||
- !AGH_GBGETOBJ (eSFAnnotationLabel) ||
- !AGH_GBGETOBJ (eSFAnnotationTypePlain) ||
- !AGH_GBGETOBJ (eSFAnnotationTypeSpindle) ||
- !AGH_GBGETOBJ (eSFAnnotationTypeKComplex) ||
- !AGH_GBGETOBJ (eSFAnnotationTypeBlink) ||
- !AGH_GBGETOBJ (wSFAnnotationSelector) ||
- !AGH_GBGETOBJ (eSFAnnotationSelectorWhich) )
- throw runtime_error ("Failed to construct SF widgets (6)");
+ AGH_GBGETOBJ (wSFAnnotationLabel);
+ AGH_GBGETOBJ (eSFAnnotationLabel);
+ AGH_GBGETOBJ (eSFAnnotationTypePlain);
+ AGH_GBGETOBJ (eSFAnnotationTypeSpindle);
+ AGH_GBGETOBJ (eSFAnnotationTypeKComplex);
+ AGH_GBGETOBJ (eSFAnnotationTypeBlink);
+ AGH_GBGETOBJ (wSFAnnotationSelector);
+ AGH_GBGETOBJ (eSFAnnotationSelectorWhich);
mSFAnnotationsAtCursor = gtk_list_store_new(1, G_TYPE_STRING);
gtk_combo_box_set_model_properly( eSFAnnotationSelectorWhich, mSFAnnotationsAtCursor);
diff --git a/upstream/src/aghermann/ui/sf/d/artifacts-simple-construct.cc b/upstream/src/aghermann/ui/sf/d/artifacts-simple-construct.cc
index 2c571bd..cd93d7b 100644
--- a/upstream/src/aghermann/ui/sf/d/artifacts-simple-construct.cc
+++ b/upstream/src/aghermann/ui/sf/d/artifacts-simple-construct.cc
@@ -26,10 +26,9 @@ SArtifactsSimpleDialogWidgets ()
throw runtime_error( "Failed to load SF::artifacts-simple glade resource");
gtk_builder_connect_signals( builder, NULL);
- if ( !AGH_GBGETOBJ (wSFADS) ||
- !AGH_GBGETOBJ (eSFADSMinFlatRegionSize) ||
- !AGH_GBGETOBJ (eSFADSPad) )
- throw runtime_error ("Failed to construct SArtifactsSimpleDialogWidgets");
+ AGH_GBGETOBJ (wSFADS);
+ AGH_GBGETOBJ (eSFADSMinFlatRegionSize);
+ AGH_GBGETOBJ (eSFADSPad);
}
diff --git a/upstream/src/aghermann/ui/sf/d/filters-construct.cc b/upstream/src/aghermann/ui/sf/d/filters-construct.cc
index 8e3bf55..2c69ce4 100644
--- a/upstream/src/aghermann/ui/sf/d/filters-construct.cc
+++ b/upstream/src/aghermann/ui/sf/d/filters-construct.cc
@@ -27,16 +27,15 @@ SFiltersDialogWidgets ()
throw runtime_error( "Failed to load SF::artifacts glade resource");
gtk_builder_connect_signals( builder, NULL);
- if ( !AGH_GBGETOBJ (wSFFilters) ||
- !AGH_GBGETOBJ (lSFFilterCaption) ||
- !AGH_GBGETOBJ (eSFFilterLowPassCutoff) ||
- !AGH_GBGETOBJ (eSFFilterLowPassOrder) ||
- !AGH_GBGETOBJ (eSFFilterHighPassCutoff) ||
- !AGH_GBGETOBJ (eSFFilterHighPassOrder) ||
- !AGH_GBGETOBJ (eSFFilterNotchFilter) ||
- !AGH_GBGETOBJ (mSFFilterNotchFilter) ||
- !AGH_GBGETOBJ (bSFFilterOK) )
- throw runtime_error ("Failed to construct SFiltersDialogWidgets");
+ AGH_GBGETOBJ (wSFFilters);
+ AGH_GBGETOBJ (lSFFilterCaption);
+ AGH_GBGETOBJ (eSFFilterLowPassCutoff);
+ AGH_GBGETOBJ (eSFFilterLowPassOrder);
+ AGH_GBGETOBJ (eSFFilterHighPassCutoff);
+ AGH_GBGETOBJ (eSFFilterHighPassOrder);
+ AGH_GBGETOBJ (eSFFilterNotchFilter);
+ AGH_GBGETOBJ (mSFFilterNotchFilter);
+ AGH_GBGETOBJ (bSFFilterOK);
gtk_combo_box_set_model_properly(
eSFFilterNotchFilter, mSFFilterNotchFilter); // can't reuse _p.mNotchFilter
diff --git a/upstream/src/aghermann/ui/sf/d/patterns.cc b/upstream/src/aghermann/ui/sf/d/patterns.cc
index 2911260..12f350b 100644
--- a/upstream/src/aghermann/ui/sf/d/patterns.cc
+++ b/upstream/src/aghermann/ui/sf/d/patterns.cc
@@ -54,56 +54,55 @@ SPatternsDialog (SScoringFacility& p_)
mSFFDChannels =
gtk_list_store_new( 1, G_TYPE_STRING);
- if ( !AGH_GBGETOBJ (wSFFD) ||
- !AGH_GBGETOBJ (daSFFDThing) ||
- !AGH_GBGETOBJ (swSFFDThing) ||
- !AGH_GBGETOBJ (daSFFDField) ||
- !AGH_GBGETOBJ (iibSFFDMenu) ||
- !AGH_GBGETOBJ (iiSFFDField) ||
- !AGH_GBGETOBJ (iiSFFDFieldProfileTypes) ||
- !AGH_GBGETOBJ (iSFFDFieldDrawMatchIndex) ||
- !AGH_GBGETOBJ (iSFFDFieldProfileTypeRaw) ||
- !AGH_GBGETOBJ (iSFFDFieldProfileTypePSD) ||
- !AGH_GBGETOBJ (iSFFDFieldProfileTypeMC) ||
- !AGH_GBGETOBJ (iSFFDFieldProfileTypeSWU) ||
- !AGH_GBGETOBJ (iSFFDMarkPhasicEventSpindles) ||
- !AGH_GBGETOBJ (iSFFDMarkPhasicEventKComplexes) ||
- !AGH_GBGETOBJ (iSFFDMarkPlain) ||
- !AGH_GBGETOBJ (swSFFDField) ||
- !AGH_GBGETOBJ (cSFFDSearchButton) ||
- !AGH_GBGETOBJ (cSFFDAgainButton) ||
- !AGH_GBGETOBJ (cSFFDSearching) ||
- !AGH_GBGETOBJ (cSFFDParameters) ||
- !AGH_GBGETOBJ (cSFFDCriteria) ||
- !AGH_GBGETOBJ (bSFFDSearch) ||
- !AGH_GBGETOBJ (bSFFDAgain) ||
- !AGH_GBGETOBJ (bSFFDProfileSave) ||
- !AGH_GBGETOBJ (bSFFDProfileDiscard) ||
- !AGH_GBGETOBJ (bSFFDProfileRevert) ||
- !AGH_GBGETOBJ (eSFFDEnvTightness) ||
- !AGH_GBGETOBJ (eSFFDBandPassOrder) ||
- !AGH_GBGETOBJ (eSFFDBandPassFrom) ||
- !AGH_GBGETOBJ (eSFFDBandPassUpto) ||
- !AGH_GBGETOBJ (eSFFDDZCDFStep) ||
- !AGH_GBGETOBJ (eSFFDDZCDFSigma) ||
- !AGH_GBGETOBJ (eSFFDDZCDFSmooth) ||
- !AGH_GBGETOBJ (eSFFDParameterA) ||
- !AGH_GBGETOBJ (eSFFDParameterB) ||
- !AGH_GBGETOBJ (eSFFDParameterC) ||
- !AGH_GBGETOBJ (eSFFDParameterD) ||
- !AGH_GBGETOBJ (eSFFDIncrement) ||
- !AGH_GBGETOBJ (cSFFDLabelBox) ||
- !AGH_GBGETOBJ (lSFFDParametersBrief) ||
- !AGH_GBGETOBJ (lSFFDFoundInfo) ||
- !AGH_GBGETOBJ (eSFFDProfileList) ||
- !AGH_GBGETOBJ (eSFFDChannel) ||
- !AGH_GBGETOBJ (wSFFDProfileSave) ||
- !AGH_GBGETOBJ (eSFFDProfileSaveName) ||
- !AGH_GBGETOBJ (eSFFDProfileSaveOriginSubject) ||
- !AGH_GBGETOBJ (eSFFDProfileSaveOriginExperiment) ||
- !AGH_GBGETOBJ (eSFFDProfileSaveOriginUser) ||
- !AGH_GBGETOBJ (bSFFDProfileSaveOK) )
- throw runtime_error ("Failed to construct SPatternsDialogWidgets");
+ AGH_GBGETOBJ (wSFFD);
+ AGH_GBGETOBJ (daSFFDThing);
+ AGH_GBGETOBJ (swSFFDThing);
+ AGH_GBGETOBJ (daSFFDField);
+ AGH_GBGETOBJ (iibSFFDMenu);
+ AGH_GBGETOBJ (iiSFFDField);
+ AGH_GBGETOBJ (iiSFFDFieldProfileTypes);
+ AGH_GBGETOBJ (iSFFDFieldDrawMatchIndex);
+ AGH_GBGETOBJ (iSFFDFieldProfileTypeRaw);
+ AGH_GBGETOBJ (iSFFDFieldProfileTypePSD);
+ AGH_GBGETOBJ (iSFFDFieldProfileTypeMC);
+ AGH_GBGETOBJ (iSFFDFieldProfileTypeSWU);
+ AGH_GBGETOBJ (iSFFDMarkPhasicEventSpindles);
+ AGH_GBGETOBJ (iSFFDMarkPhasicEventKComplexes);
+ AGH_GBGETOBJ (iSFFDMarkPlain);
+ AGH_GBGETOBJ (swSFFDField);
+ AGH_GBGETOBJ (cSFFDSearchButton);
+ AGH_GBGETOBJ (cSFFDAgainButton);
+ AGH_GBGETOBJ (cSFFDSearching);
+ AGH_GBGETOBJ (cSFFDParameters);
+ AGH_GBGETOBJ (cSFFDCriteria);
+ AGH_GBGETOBJ (bSFFDSearch);
+ AGH_GBGETOBJ (bSFFDAgain);
+ AGH_GBGETOBJ (bSFFDProfileSave);
+ AGH_GBGETOBJ (bSFFDProfileDiscard);
+ AGH_GBGETOBJ (bSFFDProfileRevert);
+ AGH_GBGETOBJ (eSFFDEnvTightness);
+ AGH_GBGETOBJ (eSFFDBandPassOrder);
+ AGH_GBGETOBJ (eSFFDBandPassFrom);
+ AGH_GBGETOBJ (eSFFDBandPassUpto);
+ AGH_GBGETOBJ (eSFFDDZCDFStep);
+ AGH_GBGETOBJ (eSFFDDZCDFSigma);
+ AGH_GBGETOBJ (eSFFDDZCDFSmooth);
+ AGH_GBGETOBJ (eSFFDParameterA);
+ AGH_GBGETOBJ (eSFFDParameterB);
+ AGH_GBGETOBJ (eSFFDParameterC);
+ AGH_GBGETOBJ (eSFFDParameterD);
+ AGH_GBGETOBJ (eSFFDIncrement);
+ AGH_GBGETOBJ (cSFFDLabelBox);
+ AGH_GBGETOBJ (lSFFDParametersBrief);
+ AGH_GBGETOBJ (lSFFDFoundInfo);
+ AGH_GBGETOBJ (eSFFDProfileList);
+ AGH_GBGETOBJ (eSFFDChannel);
+ AGH_GBGETOBJ (wSFFDProfileSave);
+ AGH_GBGETOBJ (eSFFDProfileSaveName);
+ AGH_GBGETOBJ (eSFFDProfileSaveOriginSubject);
+ AGH_GBGETOBJ (eSFFDProfileSaveOriginExperiment);
+ AGH_GBGETOBJ (eSFFDProfileSaveOriginUser);
+ AGH_GBGETOBJ (bSFFDProfileSaveOK);
gtk_combo_box_set_model_properly( eSFFDProfileList, mSFFDProfiles);
eSFFDProfileList_changed_cb_handler_id =
diff --git a/upstream/src/aghermann/ui/sf/d/phasediff-construct.cc b/upstream/src/aghermann/ui/sf/d/phasediff-construct.cc
index 04cdab9..3e211b0 100644
--- a/upstream/src/aghermann/ui/sf/d/phasediff-construct.cc
+++ b/upstream/src/aghermann/ui/sf/d/phasediff-construct.cc
@@ -28,14 +28,13 @@ SPhasediffDialogWidgets (SScoringFacility& SF)
mSFPDChannels =
gtk_list_store_new( 1, G_TYPE_STRING);
- if ( !(AGH_GBGETOBJ (wSFPD)) ||
- !(AGH_GBGETOBJ (daSFPD)) ||
- !(AGH_GBGETOBJ (eSFPDChannelA)) ||
- !(AGH_GBGETOBJ (eSFPDChannelB)) ||
- !(AGH_GBGETOBJ (eSFPDFreqFrom)) ||
- !(AGH_GBGETOBJ (eSFPDBandwidth)) ||
- !(AGH_GBGETOBJ (eSFPDSmooth)) )
- throw runtime_error ("Failed to construct SF widgets (11)");
+ AGH_GBGETOBJ (wSFPD);
+ AGH_GBGETOBJ (daSFPD);
+ AGH_GBGETOBJ (eSFPDChannelA);
+ AGH_GBGETOBJ (eSFPDChannelB);
+ AGH_GBGETOBJ (eSFPDFreqFrom);
+ AGH_GBGETOBJ (eSFPDBandwidth);
+ AGH_GBGETOBJ (eSFPDSmooth);
// filter channels we don't have
for ( auto &H : SF.channels )
diff --git a/upstream/src/aghermann/ui/sf/d/rk1968.cc b/upstream/src/aghermann/ui/sf/d/rk1968.cc
index 7053124..fa31dad 100644
--- a/upstream/src/aghermann/ui/sf/d/rk1968.cc
+++ b/upstream/src/aghermann/ui/sf/d/rk1968.cc
@@ -41,24 +41,21 @@ SRK1968Dialog (SScoringFacility& p_)
throw runtime_error( "Failed to load SF::rk1968 glade resource");
gtk_builder_connect_signals( builder, NULL);
- if ( !AGH_GBGETOBJ (wSFRK) ||
- !AGH_GBGETOBJ (bSFRKProfileRevert) ||
- !AGH_GBGETOBJ (bSFRKProfileSave) ||
- !AGH_GBGETOBJ (bSFRKProfileDiscard) ||
- !AGH_GBGETOBJ (eSFRKProfileList) ||
-
- !AGH_GBGETOBJ (eSFRKNremThetaDeltaRatio) ||
-
- !AGH_GBGETOBJ (bSFRKTry) ||
- !AGH_GBGETOBJ (bSFRKModify) ||
- !AGH_GBGETOBJ (lSFRKWorking) ||
- !AGH_GBGETOBJ (wSFRKProfileSave) ||
- !AGH_GBGETOBJ (eSFRKProfileSaveName) ||
- !AGH_GBGETOBJ (eSFRKProfileSaveOriginSubject) ||
- !AGH_GBGETOBJ (eSFRKProfileSaveOriginExperiment) ||
- !AGH_GBGETOBJ (eSFRKProfileSaveOriginUser) ||
- !AGH_GBGETOBJ (bSFRKProfileSaveOK) )
- throw runtime_error ("Failed to construct SRK1968DialogWidgets");
+ AGH_GBGETOBJ (wSFRK);
+ AGH_GBGETOBJ (bSFRKProfileRevert);
+ AGH_GBGETOBJ (bSFRKProfileSave);
+ AGH_GBGETOBJ (bSFRKProfileDiscard);
+ AGH_GBGETOBJ (eSFRKProfileList);
+ AGH_GBGETOBJ (eSFRKNremThetaDeltaRatio);
+ AGH_GBGETOBJ (bSFRKTry);
+ AGH_GBGETOBJ (bSFRKModify);
+ AGH_GBGETOBJ (lSFRKWorking);
+ AGH_GBGETOBJ (wSFRKProfileSave);
+ AGH_GBGETOBJ (eSFRKProfileSaveName);
+ AGH_GBGETOBJ (eSFRKProfileSaveOriginSubject);
+ AGH_GBGETOBJ (eSFRKProfileSaveOriginExperiment);
+ AGH_GBGETOBJ (eSFRKProfileSaveOriginUser);
+ AGH_GBGETOBJ (bSFRKProfileSaveOK);
mSFRKProfiles =
gtk_list_store_new( 1, G_TYPE_STRING);
diff --git a/upstream/src/aghermann/ui/sm/sm-construct.cc b/upstream/src/aghermann/ui/sm/sm-construct.cc
index 70826bb..5ab29b7 100644
--- a/upstream/src/aghermann/ui/sm/sm-construct.cc
+++ b/upstream/src/aghermann/ui/sm/sm-construct.cc
@@ -40,15 +40,15 @@ construct_widgets()
mSessionChooserList =
gtk_list_store_new( 3, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_STRING);
- if ( !(AGH_GBGETOBJ (wSessionChooser)) ||
- !(AGH_GBGETOBJ (tvSessionChooserList)) ||
- !(AGH_GBGETOBJ (bSessionChooserOpen)) ||
- !(AGH_GBGETOBJ (bSessionChooserClose)) ||
- !(AGH_GBGETOBJ (bSessionChooserCreateNew)) ||
- !(AGH_GBGETOBJ (bSessionChooserRemove)) ||
- !(AGH_GBGETOBJ (bSessionChooserQuit)) ||
- !(AGH_GBGETOBJ (sbSessionChooserStatusBar)) )
- return -1;
+ AGH_GBGETOBJ (wSessionChooser);
+ AGH_GBGETOBJ (tvSessionChooserList);
+ AGH_GBGETOBJ (bSessionChooserOpen);
+ AGH_GBGETOBJ (bSessionChooserClose);
+ AGH_GBGETOBJ (bSessionChooserCreateNew);
+ AGH_GBGETOBJ (bSessionChooserRemove);
+ AGH_GBGETOBJ (bSessionChooserQuit);
+ AGH_GBGETOBJ (sbSessionChooserStatusBar);
+
G_CONNECT_1 (wSessionChooser, show);
G_CONNECT_1 (wSessionChooser, destroy);
diff --git a/upstream/src/aghermann/ui/ui.hh b/upstream/src/aghermann/ui/ui.hh
index 4b449ba..3b7cae6 100644
--- a/upstream/src/aghermann/ui/ui.hh
+++ b/upstream/src/aghermann/ui/ui.hh
@@ -103,8 +103,11 @@ void set_cursor_busy( bool busy, GtkWidget *wid);
-#define AGH_GBGETOBJ(A) \
- (A = (decltype(A))(gtk_builder_get_object( builder, #A)))
+#define AGH_GBGETOBJ(A) \
+ do { \
+ if (!(A = (decltype(A))(gtk_builder_get_object( builder, #A)))) \
+ throw runtime_error ("Missing widget " #A); \
+ } while (0);
#define G_CONNECT_1(W, A) \
g_signal_connect(W, #A, (GCallback)W ## _ ## A ## _cb, this)
diff --git a/upstream/src/tools/edfhed-gtk.cc b/upstream/src/tools/edfhed-gtk.cc
index 9587a31..1f6328f 100644
--- a/upstream/src/tools/edfhed-gtk.cc
+++ b/upstream/src/tools/edfhed-gtk.cc
@@ -383,31 +383,32 @@ ui_init()
gtk_builder_connect_signals( builder, NULL);
#define AGH_GBGETTRY(A) \
- (A = (GtkEntry*)(gtk_builder_get_object( builder, #A)))
+ do { if (!(A = (GtkEntry*)(gtk_builder_get_object( builder, #A)))) \
+ throw runtime_error ("Missing widget " #A); \
+ } while (0);
- if ( !AGH_GBGETOBJ (wMain) ||
- !AGH_GBGETOBJ (lLabel) ||
+ AGH_GBGETOBJ (wMain);
+ AGH_GBGETOBJ (lLabel);
// begad, glade indeed has these widgets named like so: "e[PatientID]"!
- !AGH_GBGETTRY (e[PatientID]) ||
- !AGH_GBGETTRY (e[RecordingID]) ||
- !AGH_GBGETTRY (e[RecordingDate]) ||
- !AGH_GBGETTRY (e[RecordingTime]) ||
- !AGH_GBGETTRY (e[Reserved]) ||
- !AGH_GBGETTRY (e[ChannelLabel]) ||
- !AGH_GBGETTRY (e[ChannelPhysicalDim]) ||
- !AGH_GBGETTRY (e[ChannelPhysicalMin]) ||
- !AGH_GBGETTRY (e[ChannelPhysicalMax]) ||
- !AGH_GBGETTRY (e[ChannelDigitalMin]) ||
- !AGH_GBGETTRY (e[ChannelDigitalMax]) ||
- !AGH_GBGETTRY (e[ChannelTransducerType]) ||
- !AGH_GBGETTRY (e[ChannelFilteringInfo]) ||
- !AGH_GBGETTRY (e[ChannelReserved]) ||
- !AGH_GBGETTRY (e[ChannelSamplesPerRecord]) ||
- !AGH_GBGETOBJ (lChannelsNum) ||
- !AGH_GBGETOBJ (bNext) ||
- !AGH_GBGETOBJ (bPrevious) ||
- !AGH_GBGETOBJ (bWrite) )
- return -1;
+ AGH_GBGETTRY (e[PatientID]);
+ AGH_GBGETTRY (e[RecordingID]);
+ AGH_GBGETTRY (e[RecordingDate]);
+ AGH_GBGETTRY (e[RecordingTime]);
+ AGH_GBGETTRY (e[Reserved]);
+ AGH_GBGETTRY (e[ChannelLabel]);
+ AGH_GBGETTRY (e[ChannelPhysicalDim]);
+ AGH_GBGETTRY (e[ChannelPhysicalMin]);
+ AGH_GBGETTRY (e[ChannelPhysicalMax]);
+ AGH_GBGETTRY (e[ChannelDigitalMin]);
+ AGH_GBGETTRY (e[ChannelDigitalMax]);
+ AGH_GBGETTRY (e[ChannelTransducerType]);
+ AGH_GBGETTRY (e[ChannelFilteringInfo]);
+ AGH_GBGETTRY (e[ChannelReserved]);
+ AGH_GBGETTRY (e[ChannelSamplesPerRecord]);
+ AGH_GBGETOBJ (lChannelsNum);
+ AGH_GBGETOBJ (bNext);
+ AGH_GBGETOBJ (bPrevious);
+ AGH_GBGETOBJ (bWrite);
for ( int i = 0; i < _n_entries; ++i ) {
#pragma GCC diagnostic ignored "-Wint-to-pointer-cast"
--
Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git
More information about the debian-med-commit
mailing list