[med-svn] [SCM] aghermann branch, master, updated. 551e213a23b59b71cba6a9c3a282d1b60e21b854
andrei zavada
jh at johnhommer.com
Sun Apr 21 23:17:57 UTC 2013
The following commit has been merged in the master branch:
commit f4f213ae3685acd6606e34138be5c9f940cb0a53
Author: andrei zavada <jh at johnhommer.com>
Date: Sat Apr 13 16:39:19 2013 +0000
WIP
diff --git a/src/common/subject_id.hh b/src/common/subject_id.hh
index 4827df5..5bfa7b9 100644
--- a/src/common/subject_id.hh
+++ b/src/common/subject_id.hh
@@ -44,8 +44,16 @@ struct SSubjectId {
dob (dob_),
gender (gender_)
{}
+ SSubjectId (const SSubjectId& rv)
+ {
+ id = rv.id;
+ name = rv.name;
+ dob = rv.dob;
+ gender = rv.gender;
+ }
+
SSubjectId (SSubjectId&& rv)
- {
+ {
id.swap( rv.id);
name.swap( rv.name);
dob = rv.dob;
diff --git a/src/expdesign/primaries.cc b/src/expdesign/primaries.cc
index ba19774..cff10e8 100644
--- a/src/expdesign/primaries.cc
+++ b/src/expdesign/primaries.cc
@@ -292,7 +292,7 @@ enumerate_subjects() const
list<string> recp;
for ( auto &G : groups )
for ( auto &J : G.second )
- recp.push_back( J.short_name);
+ recp.push_back( J.id);
return recp;
}
diff --git a/src/expdesign/primaries.hh b/src/expdesign/primaries.hh
index d29387f..1c46a39 100644
--- a/src/expdesign/primaries.hh
+++ b/src/expdesign/primaries.hh
@@ -53,7 +53,13 @@ class CSubject : public SSubjectId {
const string& dir() const { return _dir; }
- CSubject (const CSubject&) = default;
+ CSubject (const CSubject& rv)
+ : agh::SSubjectId (rv),
+ _status (rv._status),
+ _id (rv._id),
+ _dir (rv._dir)
+ {}
+
CSubject (const string& dir, sid_type id)
: agh::SSubjectId (dir.substr( dir.rfind('/')+1)),
_status (0),
diff --git a/src/expdesign/recording.cc b/src/expdesign/recording.cc
index aa8ac62..1fe7d29 100644
--- a/src/expdesign/recording.cc
+++ b/src/expdesign/recording.cc
@@ -104,7 +104,7 @@ CProfile (CSubject& J, const string& d, const sigfile::SChannel& h,
_sim_start ((size_t)-1), _sim_end ((size_t)-1)
{
if ( not J.have_session(d) or J.measurements.at(d).size() == 0 )
- throw invalid_argument (J.short_name + " has no recordings in session " + d);
+ throw invalid_argument (J.id + " has no recordings in session " + d);
auto& EE = J.measurements.at(d).episodes;
for ( auto &E : EE )
@@ -130,7 +130,7 @@ CProfile (CSubject& J, const string& d, const sigfile::SChannel& h,
// anchor zero page, get pagesize from edf^W CBinnedPower^W either goes
time_t dima = F.start_time();
printf( "CProfile::CProfile(): adding %s of [%s, %s, %s] %zu pages (%zu full, %zu in hypnogram) recorded %s",
- metrics::name(params.metric), F.id.c_str(), F.session(), F.episode(),
+ metrics::name(params.metric), F.subject().id.c_str(), F.session(), F.episode(),
M.total_pages(), M.full_pages(), M.hypnogram().pages(), ctime( &dima));
if ( pz - pa != (int)M.full_pages() ) {
@@ -185,7 +185,7 @@ CProfile (CRecording& M,
pz = (size_t)difftime( M.F().end_time(), _0at) / _pagesize;
time_t dima = M.F().start_time();
printf( "CProfile::CProfile(): adding single recording %s of [%s, %s, %s] %zu pages (%zu full, %zu in hypnogram) recorded %s",
- metrics::name(params.metric), M.F().id.c_str(), M.F().session(), M.F().episode(),
+ metrics::name(params.metric), M.F().subject().id.c_str(), M.F().session(), M.F().episode(),
M.total_pages(), M.full_pages(), M.hypnogram().pages(), ctime( &dima));
if ( pz - pa != (int)M.full_pages() ) {
diff --git a/src/ui/mw/admit-one.cc b/src/ui/mw/admit-one.cc
index 9f597b5..cebab56 100644
--- a/src/ui/mw/admit-one.cc
+++ b/src/ui/mw/admit-one.cc
@@ -36,7 +36,7 @@ dnd_maybe_admit_one( const char* fname)
snprintf_buf( "File: <i>%s</i>", fname);
gtk_label_set_markup( lEdfImportCaption, __buf__);
- snprintf_buf( "<b>%s</b> (%s)", (*Fp)().id.c_str(), (*Fp)().name.c_str());
+ snprintf_buf( "<b>%s</b> (%s)", (*Fp)().subject().id.c_str(), (*Fp)().subject().name.c_str());
gtk_label_set_markup( lEdfImportSubject, __buf__);
} catch ( exception& ex) {
@@ -55,7 +55,7 @@ dnd_maybe_admit_one( const char* fname)
try {
gtk_entry_set_text(
eEdfImportGroupEntry,
- ED->group_of( (*Fp)().id.c_str()));
+ ED->group_of( (*Fp)().subject().id.c_str()));
gtk_widget_set_sensitive( (GtkWidget*)eEdfImportGroup, FALSE);
} catch (invalid_argument ex) {
for ( auto &i : AghGG ) {
@@ -109,7 +109,7 @@ dnd_maybe_admit_one( const char* fname)
dest_path = g_strdup_printf( "%s/%s/%s/%s",
ED->session_dir().c_str(),
selected_group,
- (*Fp)().id.c_str(),
+ (*Fp)().subject().id.c_str(),
selected_session);
dest = g_strdup_printf( "%s/%s.edf",
dest_path,
diff --git a/src/ui/mw/construct.cc b/src/ui/mw/construct.cc
index ef0f36b..4d9e0a6 100644
--- a/src/ui/mw/construct.cc
+++ b/src/ui/mw/construct.cc
@@ -581,16 +581,6 @@ SExpDesignUIWidgets ()
"changed", (GCallback)check_gtk_entry_nonempty_cb,
this);
- // ------- wEdfImport
- if ( !AGH_GBGETOBJ (GtkDialog, wSubjectDetails) ||
- !AGH_GBGETOBJ (GtkEntry, eSubjectDetailsShortName) ||
- !AGH_GBGETOBJ (GtkEntry, eSubjectDetailsFullName) ||
- !AGH_GBGETOBJ (GtkSpinButton, eSubjectDetailsAge) ||
- !AGH_GBGETOBJ (GtkRadioButton, eSubjectDetailsGenderMale) ||
- !AGH_GBGETOBJ (GtkRadioButton, eSubjectDetailsGenderFemale) ||
- !AGH_GBGETOBJ (GtkEntry, eSubjectDetailsComment) )
- throw runtime_error ("Failed to construct widgets");
-
// ------------- wBatchSetup
if ( !AGH_GBGETOBJ (GtkDialog, wBatchSetup) ||
!AGH_GBGETOBJ (GtkEntry, eBatchSetupSubjects) ||
@@ -690,7 +680,6 @@ aghui::SExpDesignUIWidgets::
gtk_widget_destroy( (GtkWidget*)wEdfImport);
gtk_widget_destroy( (GtkWidget*)wGlobalAnnotations);
gtk_widget_destroy( (GtkWidget*)wGlobalFilters);
- gtk_widget_destroy( (GtkWidget*)wSubjectDetails);
gtk_widget_destroy( (GtkWidget*)wBatchSetup);
// and models, etc
g_object_unref( (GObject*)mEEGChannels);
diff --git a/src/ui/mw/mainmenu_cb.cc b/src/ui/mw/mainmenu_cb.cc
index 8c71a54..43a7860 100644
--- a/src/ui/mw/mainmenu_cb.cc
+++ b/src/ui/mw/mainmenu_cb.cc
@@ -176,7 +176,7 @@ iExpBasicSADetectUltradianCycles_activate_cb( GtkMenuItem*, gpointer userdata)
{
snprintf_buf(
"Detect ultradian cycle %s/%s/%s",
- ED.ED->group_of(J), J.short_name.c_str(), E.name());
+ ED.ED->group_of(J), J.id.c_str(), E.name());
ED.sb_main_progress_indicator( __buf__, n, i, TGtkRefreshMode::gtk);
gtk_widget_queue_draw( (GtkWidget*)ED.cMeasurements);
};
@@ -233,7 +233,7 @@ iExpGloballyDetectArtifacts_activate_cb( GtkMenuItem*, gpointer userdata)
{
snprintf_buf(
"Detect artifacts in %s/%s/%s/%s:%s",
- ED.ED->group_of(J), J.short_name.c_str(), D.c_str(), E.name(), R.F().channel_by_id(R.h()));
+ ED.ED->group_of(J), J.id.c_str(), D.c_str(), E.name(), R.F().channel_by_id(R.h()));
ED.sb_main_progress_indicator( __buf__, total, i, TGtkRefreshMode::gtk);
};
switch ( response ) {
diff --git a/src/ui/mw/measurements.cc b/src/ui/mw/measurements.cc
index dc0a2d5..24a26af 100644
--- a/src/ui/mw/measurements.cc
+++ b/src/ui/mw/measurements.cc
@@ -272,22 +272,22 @@ draw_timeline( cairo_t *cr) const
cairo_select_font_face( cr, "serif", CAIRO_FONT_SLANT_ITALIC, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size( cr, 12);
cairo_set_source_rgb( cr, 0., 0., 0.);
- cairo_show_text( cr, csubject.short_name.c_str());
+ cairo_show_text( cr, csubject.id.c_str());
cairo_stroke( cr);
cairo_move_to( cr, 2, 25);
cairo_select_font_face( cr, "serif", CAIRO_FONT_SLANT_ITALIC, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size( cr, 9);
cairo_set_source_rgba( cr, .1, .1, .1, .5);
- cairo_show_text( cr, csubject.full_name.c_str());
+ cairo_show_text( cr, csubject.name.c_str());
cairo_stroke( cr);
cairo_move_to( cr, 2, 35);
cairo_select_font_face( cr, "sans", CAIRO_FONT_SLANT_ITALIC, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size( cr, 9);
- snprintf_buf( "%s %u y.o.",
- agh::CSubject::gender_sign( csubject.gender),
- csubject.age);
+ snprintf_buf( "%c %d y.o.",
+ csubject.gender_sign(),
+ (int)csubject.age());
cairo_set_source_rgb( cr, .1, .1, .1);
cairo_show_text( cr, __buf__);
}
diff --git a/src/ui/mw/measurements_cb.cc b/src/ui/mw/measurements_cb.cc
index e12aa99..3af215d 100644
--- a/src/ui/mw/measurements_cb.cc
+++ b/src/ui/mw/measurements_cb.cc
@@ -152,15 +152,6 @@ iSubjectTimelineDetectUltradianCycle_activate_cb( GtkMenuItem*, gpointer userdat
}
-void
-iSubjectTimelineSubjectInfo_activate_cb( GtkMenuItem*, gpointer userdata)
-{
- auto& ED = *(SExpDesignUI*)userdata;
- ED.update_subject_details_interactively( ED.using_subject->csubject);
- ED.populate_1(); // trigger sort
- //gtk_widget_queue_draw( (GtkWidget*)ED.using_subject->da);
-}
-
void
iSubjectTimelineEDFInfo_activate_cb( GtkMenuItem*, gpointer userdata)
@@ -184,7 +175,7 @@ iSubjectTimelineSaveAsSVG_activate_cb( GtkMenuItem *checkmenuitem, gpointer user
auto J = ED.using_subject;
snprintf_buf( "%s/%s/%s/%s/%s.svg",
- ED.ED->session_dir().c_str(), ED.ED->group_of( J->csubject), J->csubject.short_name.c_str(),
+ ED.ED->session_dir().c_str(), ED.ED->group_of( J->csubject.id), J->csubject.id.c_str(),
ED.AghD(), ED.AghT());
string tmp (__buf__);
J->is_focused = true;
@@ -202,7 +193,8 @@ iSubjectTimelineBrowse_activate_cb( GtkMenuItem *checkmenuitem, gpointer userdat
auto J = ED.using_subject;
snprintf_buf( "%s '%s/%s/%s/%s' &",
- ED.browse_command.c_str(), ED.ED->session_dir().c_str(), ED.ED->group_of( J->csubject), J->csubject.short_name.c_str(), ED.AghD());
+ ED.browse_command.c_str(),
+ ED.ED->session_dir().c_str(), ED.ED->group_of( J->csubject.id), J->csubject.id.c_str(), ED.AghD());
if ( system( __buf__) ) {}
}
@@ -214,10 +206,10 @@ iSubjectTimelineResetMontage_activate_cb( GtkMenuItem *checkmenuitem, gpointer u
if ( not J->is_episode_focused() )
snprintf_buf( "find '%s/%s/%s/%s' -name '.*.montage' -delete",
- ED.ED->session_dir().c_str(), ED.ED->group_of( J->csubject), J->csubject.short_name.c_str(), ED.AghD());
+ ED.ED->session_dir().c_str(), ED.ED->group_of( J->csubject.id), J->csubject.id.c_str(), ED.AghD());
else
snprintf_buf( "rm -f '%s/%s/%s/%s/.%s.montage'",
- ED.ED->session_dir().c_str(), ED.ED->group_of( J->csubject), J->csubject.short_name.c_str(), ED.AghD(), ED.AghE());
+ ED.ED->session_dir().c_str(), ED.ED->group_of( J->csubject.id), J->csubject.id.c_str(), ED.AghD(), ED.AghE());
if ( system( __buf__) )
pop_ok_message( ED.wMainWindow, "Wow", "Command '%s' returned a non-zero status. This is weird.", __buf__);
diff --git a/src/ui/mw/mw.cc b/src/ui/mw/mw.cc
index 7135f10..0545e44 100644
--- a/src/ui/mw/mw.cc
+++ b/src/ui/mw/mw.cc
@@ -84,7 +84,7 @@ create_cprofile()
} catch (...) { // can be invalid_argument (no recording in such session/channel) or some TSimPrepError
cprofile = nullptr;
fprintf( stderr, "SSubjectPresentation::SSubjectPresentation(): subject \"%s\" has no recordings in session \"%s\" channel \"%s\"\n",
- csubject.short_name.c_str(), _p._p.AghD(), _p._p.AghT());
+ csubject.id.c_str(), _p._p.AghD(), _p._p.AghT());
}
}
@@ -124,6 +124,7 @@ const array<double, 3>
aghui::SExpDesignUI::FFTBinSizeValues = {{.1, .25, .5}};
+using confval::SValidator;
aghui::SExpDesignUI::
SExpDesignUI (aghui::SSessionChooser *parent,
@@ -170,33 +171,33 @@ SExpDesignUI (aghui::SSessionChooser *parent,
sort_segregate (false),
browse_command ("thunar"),
config_keys_s ({
- confval::SValidator<string>("WindowGeometry.Main", &_geometry_placeholder),
- confval::SValidator<string>("Common.CurrentSession", &_aghdd_placeholder),
- confval::SValidator<string>("Common.CurrentChannel", &_aghtt_placeholder),
- confval::SValidator<string>("Measurements.BrowseCommand", &browse_command),
+ SValidator<string>("WindowGeometry.Main", &_geometry_placeholder),
+ SValidator<string>("Common.CurrentSession", &_aghdd_placeholder),
+ SValidator<string>("Common.CurrentChannel", &_aghtt_placeholder),
+ SValidator<string>("Measurements.BrowseCommand", &browse_command),
}),
config_keys_d ({
- confval::SValidator<int>("Common.OnlyPlainAnnotations", (int*)&only_plain_global_annotations, confval::SValidator<int>::SVFRangeIn ( 0, 1)),
- confval::SValidator<int>("Common.Sort.By", (int*)&sort_by, confval::SValidator<int>::SVFRangeIn ( 0, 3)),
- confval::SValidator<int>("Common.Sort.Ascending", (int*)&sort_ascending, confval::SValidator<int>::SVFRangeIn ( 0, 1)),
- confval::SValidator<int>("Common.Sort.Segregate", (int*)&sort_segregate, confval::SValidator<int>::SVFRangeIn ( 0, 1)),
- confval::SValidator<int>("Measurements.DisplayProfileType", (int*)&display_profile_type, confval::SValidator<int>::SVFRangeIn ( 0, 3)),
- confval::SValidator<int>("Measurements.SmoothSide", (int*)&smooth_profile, confval::SValidator<int>::SVFRangeIn ( 1, 20)),
- confval::SValidator<int>("Measurements.TimelineHeight", (int*)&timeline_height, confval::SValidator<int>::SVFRangeIn (10, 600)),
- confval::SValidator<int>("Measurements.TimelinePPH", (int*)&timeline_pph, confval::SValidator<int>::SVFRangeIn (10, 600)),
- confval::SValidator<int>("ScoringFacility.IntersignalSpace", (int*)&SScoringFacility::IntersignalSpace, confval::SValidator<int>::SVFRangeIn (10, 800)),
- confval::SValidator<int>("ScoringFacility.HypnogramHeight", (int*)&SScoringFacility::HypnogramHeight, confval::SValidator<int>::SVFRangeIn (10, 300)),
- confval::SValidator<int>("ModelRun.SWASmoothOver", (int*)&SModelrunFacility::swa_smoothover, confval::SValidator<int>::SVFRangeIn ( 1, 5)),
+ SValidator<int>("Common.OnlyPlainAnnotations", (int*)&only_plain_global_annotations, SValidator<int>::SVFRangeIn ( 0, 1)),
+ SValidator<int>("Common.Sort.By", (int*)&sort_by, SValidator<int>::SVFRangeIn ( 0, 3)),
+ SValidator<int>("Common.Sort.Ascending", (int*)&sort_ascending, SValidator<int>::SVFRangeIn ( 0, 1)),
+ SValidator<int>("Common.Sort.Segregate", (int*)&sort_segregate, SValidator<int>::SVFRangeIn ( 0, 1)),
+ SValidator<int>("Measurements.DisplayProfileType", (int*)&display_profile_type, SValidator<int>::SVFRangeIn ( 0, 3)),
+ SValidator<int>("Measurements.SmoothSide", (int*)&smooth_profile, SValidator<int>::SVFRangeIn ( 1, 20)),
+ SValidator<int>("Measurements.TimelineHeight", (int*)&timeline_height, SValidator<int>::SVFRangeIn (10, 600)),
+ SValidator<int>("Measurements.TimelinePPH", (int*)&timeline_pph, SValidator<int>::SVFRangeIn (10, 600)),
+ SValidator<int>("ScoringFacility.IntersignalSpace", (int*)&SScoringFacility::IntersignalSpace, SValidator<int>::SVFRangeIn (10, 800)),
+ SValidator<int>("ScoringFacility.HypnogramHeight", (int*)&SScoringFacility::HypnogramHeight, SValidator<int>::SVFRangeIn (10, 300)),
+ SValidator<int>("ModelRun.SWASmoothOver", (int*)&SModelrunFacility::swa_smoothover, SValidator<int>::SVFRangeIn ( 1, 5)),
}),
config_keys_g ({
- confval::SValidator<double>("UltradianCycleDetectionAccuracy", &uc_accuracy_factor, confval::SValidator<double>::SVFRangeIn (0.5, 20.)),
- confval::SValidator<double>("Measurements.ProfileScalePSD", &profile_scale_psd, confval::SValidator<double>::SVFRangeIn (0., 1e10)), // can be 0, will trigger autoscale
- confval::SValidator<double>("Measurements.ProfileScaleSWU", &profile_scale_swu, confval::SValidator<double>::SVFRangeIn (0., 1e10)),
- confval::SValidator<double>("Measurements.ProfileScaleMC", &profile_scale_mc, confval::SValidator<double>::SVFRangeIn (0., 1e10)),
- confval::SValidator<double>("Profiles.PSD.FreqFrom", &active_profile_psd_freq_from, confval::SValidator<double>::SVFRangeIn (0., 20.)),
- confval::SValidator<double>("Profiles.PSD.FreqUpto", &active_profile_psd_freq_upto, confval::SValidator<double>::SVFRangeIn (0., 20.)),
- confval::SValidator<double>("Profiles.SWU.F0", &active_profile_swu_f0, confval::SValidator<double>::SVFRangeIn (0., 20.)),
- confval::SValidator<double>("Profiles.MC.F0", &active_profile_mc_f0, confval::SValidator<double>::SVFRangeIn (0., 20.)),
+ SValidator<double>("UltradianCycleDetectionAccuracy", &uc_accuracy_factor, SValidator<double>::SVFRangeIn (0.5, 20.)),
+ SValidator<double>("Measurements.ProfileScalePSD", &profile_scale_psd, SValidator<double>::SVFRangeIn (0., 1e10)), // can be 0, will trigger autoscale
+ SValidator<double>("Measurements.ProfileScaleSWU", &profile_scale_swu, SValidator<double>::SVFRangeIn (0., 1e10)),
+ SValidator<double>("Measurements.ProfileScaleMC", &profile_scale_mc, SValidator<double>::SVFRangeIn (0., 1e10)),
+ SValidator<double>("Profiles.PSD.FreqFrom", &active_profile_psd_freq_from, SValidator<double>::SVFRangeIn (0., 20.)),
+ SValidator<double>("Profiles.PSD.FreqUpto", &active_profile_psd_freq_upto, SValidator<double>::SVFRangeIn (0., 20.)),
+ SValidator<double>("Profiles.SWU.F0", &active_profile_swu_f0, SValidator<double>::SVFRangeIn (0., 20.)),
+ SValidator<double>("Profiles.MC.F0", &active_profile_mc_f0, SValidator<double>::SVFRangeIn (0., 20.)),
})
{
nodestroy_by_cb = true;
@@ -586,33 +587,6 @@ sb_main_progress_indicator( const char* current, size_t n, size_t i, aghui::TGtk
-
-void
-aghui::SExpDesignUI::
-update_subject_details_interactively( agh::CSubject& J)
-{
- gtk_entry_set_text( eSubjectDetailsShortName, J.short_name.c_str());
- gtk_entry_set_text( eSubjectDetailsFullName, J.full_name.c_str());
- gtk_spin_button_set_value( eSubjectDetailsAge, J.age);
- gtk_toggle_button_set_active( (J.gender == agh::CSubject::TGender::male)
- ? (GtkToggleButton*)eSubjectDetailsGenderMale
- : (GtkToggleButton*)eSubjectDetailsGenderFemale,
- TRUE);
- gtk_entry_set_text( eSubjectDetailsComment, J.comment.c_str());
-
- if ( gtk_dialog_run( (GtkDialog*)wSubjectDetails) == -5 ) {
- J.short_name.assign( gtk_entry_get_text( eSubjectDetailsShortName));
- J.full_name.assign( gtk_entry_get_text( eSubjectDetailsFullName));
- J.age = gtk_spin_button_get_value( eSubjectDetailsAge);
- J.gender =
- gtk_toggle_button_get_active( (GtkToggleButton*)eSubjectDetailsGenderMale)
- ? agh::CSubject::TGender::male
- : agh::CSubject::TGender::female;
- J.comment.assign( gtk_entry_get_text( eSubjectDetailsComment));
- }
-}
-
-
// Local Variables:
// Mode: c++
// indent-tabs-mode: 8
diff --git a/src/ui/mw/mw.hh b/src/ui/mw/mw.hh
index 3191769..3af454e 100644
--- a/src/ui/mw/mw.hh
+++ b/src/ui/mw/mw.hh
@@ -164,7 +164,6 @@ class SExpDesignUI
void do_purge_computed();
void do_detect_ultradian_cycle( agh::CRecording&);
- void update_subject_details_interactively( agh::CSubject&);
void show_empty_experiment_blurb();
int try_download();
GPid dl_pid;
diff --git a/src/ui/mw/populate.cc b/src/ui/mw/populate.cc
index 033e0c4..ddeefc5 100644
--- a/src/ui/mw/populate.cc
+++ b/src/ui/mw/populate.cc
@@ -292,10 +292,10 @@ populate_mGlobalAnnotations()
-1);
last_j = last_d = last_e = NULL;
}
- if ( last_j != J.short_name.c_str() ) { // comparing pointers here
+ if ( last_j != J.id.c_str() ) { // comparing pointers here
gtk_tree_store_append( mGlobalAnnotations, &iter_j, &iter_g);
gtk_tree_store_set( mGlobalAnnotations, &iter_j,
- 0, last_j = J.short_name.c_str(),
+ 0, last_j = J.id.c_str(),
mannotations_visibility_switch_col, TRUE,
-1);
last_d = last_e = NULL;
@@ -409,7 +409,7 @@ populate_1()
j.admission_date = ee.front().start_time();
} else
fprintf( stderr, "SExpDesignUI::populate_1(): session \"%s\", channel \"%s\" for subject \"%s\" is empty\n",
- AghD(), AghT(), J.short_name.c_str());
+ AghD(), AghT(), J.id.c_str());
}
}
}
@@ -487,7 +487,7 @@ populate_1()
cairo_text_extents_t extents;
cairo_select_font_face( cr, "serif", CAIRO_FONT_SLANT_ITALIC, CAIRO_FONT_WEIGHT_BOLD);
cairo_set_font_size( cr, 11);
- cairo_text_extents( cr, J.csubject.short_name.c_str(), &extents);
+ cairo_text_extents( cr, J.csubject.id.c_str(), &extents);
if ( tl_left_margin < extents.width )
tl_left_margin = extents.width;
cairo_destroy( cr);
@@ -581,12 +581,12 @@ operator<( const SSubjectPresentation& rv) const
unsure = true; // avoid swapping if result == false
switch ( _p._p.sort_by ) {
case TSubjectSortBy::name:
- result = csubject.short_name < rv.csubject.short_name;
- unsure = csubject.short_name == rv.csubject.short_name;
+ result = csubject.id < rv.csubject.id;
+ unsure = csubject.id == rv.csubject.id;
break;
case TSubjectSortBy::age:
- result = csubject.age < rv.csubject.age;
- unsure = csubject.age == rv.csubject.age;
+ result = csubject.age() < rv.csubject.age();
+ unsure = csubject.age() == rv.csubject.age();
break;
case TSubjectSortBy::admission_date:
result = tl_start < rv.tl_start;
diff --git a/src/ui/mw/simulations.cc b/src/ui/mw/simulations.cc
index b6af5d2..0dae1aa 100644
--- a/src/ui/mw/simulations.cc
+++ b/src/ui/mw/simulations.cc
@@ -42,7 +42,7 @@ populate_2()
gtk_tree_store_append( mSimulations, &iter_j, &iter_g);
gtk_tree_store_set( mSimulations, &iter_j,
- 0, J.short_name.c_str(),
+ 0, J.id.c_str(),
msimulations_visibility_switch_col, TRUE,
-1);
@@ -100,7 +100,7 @@ populate_2()
agh::ach::CModelRun *virgin;
int retval =
- ED->setup_modrun( J.short_name.c_str(), AghD(), AghT(),
+ ED->setup_modrun( J.id.c_str(), AghD(), AghT(),
P_new,
&virgin);
if ( retval ) {
diff --git a/src/ui/mw/simulations_cb.cc b/src/ui/mw/simulations_cb.cc
index 1877b93..0e62f1c 100644
--- a/src/ui/mw/simulations_cb.cc
+++ b/src/ui/mw/simulations_cb.cc
@@ -141,7 +141,7 @@ iSimulationsRunBatch_activate_cb( GtkMenuItem*, gpointer userdata)
{
snprintf_buf( "(%zu of %zu) Running simulation in channel %s (%s) for %s (session %s) ...",
i, n, H.c_str(), T.display_name().c_str(),
- J.short_name.c_str(), D.c_str());
+ J.id.c_str(), D.c_str());
ED.sb_message( __buf__);
gtk_flush();
};
diff --git a/src/ui/mw/widgets.hh b/src/ui/mw/widgets.hh
index c02e655..280ba7c 100644
--- a/src/ui/mw/widgets.hh
+++ b/src/ui/mw/widgets.hh
@@ -291,19 +291,6 @@ struct SExpDesignUIWidgets {
GtkCheckButton
*eGlobalAnnotationsShowPhasicEvents;
- // subject details
- GtkDialog
- *wSubjectDetails;
- GtkEntry
- *eSubjectDetailsShortName,
- *eSubjectDetailsFullName,
- *eSubjectDetailsComment;
- GtkSpinButton
- *eSubjectDetailsAge;
- GtkRadioButton
- *eSubjectDetailsGenderMale,
- *eSubjectDetailsGenderFemale;
-
// batch setup
GtkDialog
*wBatchSetup;
diff --git a/src/ui/sf/sf.cc b/src/ui/sf/sf.cc
index 27478fc..7290db5 100644
--- a/src/ui/sf/sf.cc
+++ b/src/ui/sf/sf.cc
@@ -134,7 +134,7 @@ SScoringFacility (agh::CSubject& J,
}
}
if ( channels.empty() )
- throw invalid_argument( string ("No channels found for combination (") + J.short_name + ", " + D + ", " + E + ")");
+ throw invalid_argument( string ("No channels found for combination (") + J.id + ", " + D + ", " + E + ")");
// count n_eeg_channels
n_eeg_channels =
@@ -190,7 +190,7 @@ SScoringFacility (agh::CSubject& J,
// set up other controls
// set window title
snprintf_buf( "Scoring: %s’s %s in %s",
- J.full_name.c_str(), E.c_str(), D.c_str());
+ J.name.c_str(), E.c_str(), D.c_str());
gtk_window_set_title( (GtkWindow*)wSF,
__buf__);
--
Sleep experiment manager
More information about the debian-med-commit
mailing list