The following commit has been merged in the master branch:
commit 61af3c5bd3e7f647cd8a0fd6a2b4cfe2a0a87fe8
Author: Andrei Zavada <[email protected]>
Date:   Sat Apr 27 13:09:04 2013 +0300

    ICM

diff --git a/src/ui/mw/mainmenu_cb.cc b/src/ui/mw/mainmenu_cb.cc
index d6f6432..33ad2ae 100644
--- a/src/ui/mw/mainmenu_cb.cc
+++ b/src/ui/mw/mainmenu_cb.cc
@@ -15,6 +15,7 @@
 #include "ui/sm/sm.hh"
 #include "ui/sf/sf.hh"
 
+using namespace std;
 using namespace aghui;
 
 extern "C" {
@@ -119,7 +120,7 @@ tvGlobalAnnotations_row_activated_cb(
        const gpointer userdata)
 {
        auto& ED = *(SExpDesignUI*)userdata;
-       aghui::SExpDesignUI::SAnnotation *ann;
+       SExpDesignUI::SAnnotation *ann;
        GtkTreeIter iter;
        gtk_tree_model_get_iter( (GtkTreeModel*)ED.mGlobalAnnotations, &iter, 
path);
        gtk_tree_model_get( (GtkTreeModel*)ED.mGlobalAnnotations, &iter,
@@ -129,7 +130,7 @@ tvGlobalAnnotations_row_activated_cb(
                return;
 
        gtk_widget_hide( (GtkWidget*)ED.wGlobalAnnotations);
-       aghui::SScoringFacility* found = nullptr;
+       SScoringFacility* found = nullptr;
        for ( auto &F : ED.open_scoring_facilities )
                if ( &F->csubject() == &ann->csubject
                     && F->session() == ann->session
@@ -143,7 +144,7 @@ tvGlobalAnnotations_row_activated_cb(
                found->set_cur_vpage( pages.a, true);
        } else {
                ED.using_subject = ED.subject_presentation_by_csubject( 
ann->csubject);
-               auto SF = new aghui::SScoringFacility( ann->csubject, 
ann->session, ann->sepisode.name(), ED);
+               auto SF = new SScoringFacility( ann->csubject, ann->session, 
ann->sepisode.name(), ED);
                auto pages = ann->page_span( SF->vpagesize());
                SF->set_cur_vpage( pages.a, true);
        }
@@ -174,7 +175,7 @@ iExpBasicSADetectUltradianCycles_activate_cb(
 {
        auto& ED = *(SExpDesignUI*)userdata;
 
-       aghui::SBusyBlock bb (ED.wMainWindow);
+       SBusyBlock bb (ED.wMainWindow);
 
        using namespace agh;
        CExpDesign::TEpisodeFilterFun filter =
@@ -299,9 +300,9 @@ iExpGloballyDetectArtifacts_activate_cb(
                throw runtime_error ("Fix AD dialog response?");
        }
 
-       forward_list<aghui::SBusyBlock*> bbl;
+       forward_list<SBusyBlock*> bbl;
        for ( auto& SFp : ED.open_scoring_facilities )
-               bbl.push_front( new aghui::SBusyBlock (SFp->wSF));
+               bbl.push_front( new SBusyBlock (SFp->wSF));
 
        ED.ED -> for_all_recordings( op, reporter, filter);
        ED.sb_clear();
@@ -343,7 +344,7 @@ iExpGloballySetFilters_activate_cb(
 
        int LPO, HPO, NF;
        double LPC, HPC;
-       aghui::SUIVarCollection W_V;
+       SUIVarCollection W_V;
        W_V.reg( ED.eGlobalFiltersLowPassCutoff, &LPC);
        W_V.reg( ED.eGlobalFiltersLowPassOrder, &LPO);
        W_V.reg( ED.eGlobalFiltersHighPassCutoff, &HPC);
@@ -352,9 +353,9 @@ iExpGloballySetFilters_activate_cb(
 
        if ( GTK_RESPONSE_OK ==
             gtk_dialog_run( ED.wGlobalFilters) ) {
-               forward_list<aghui::SBusyBlock*> bbl;
+               forward_list<SBusyBlock*> bbl;
                for ( auto& SFp : ED.open_scoring_facilities )
-                       bbl.push_front( new aghui::SBusyBlock (SFp->wSF));
+                       bbl.push_front( new SBusyBlock (SFp->wSF));
                W_V.down();
                for ( auto &G : ED.ED->groups )
                        for ( auto &J : G.second )
diff --git a/src/ui/mw/measurements_cb.cc b/src/ui/mw/measurements_cb.cc
index fc7be3d..fc780a3 100644
--- a/src/ui/mw/measurements_cb.cc
+++ b/src/ui/mw/measurements_cb.cc
@@ -13,6 +13,7 @@
 #include "ui/sf/sf.hh"
 #include "mw.hh"
 
+using namespace std;
 using namespace aghui;
 
 extern "C" {
@@ -178,7 +179,7 @@ iSubjectTimelineDetectUltradianCycle_activate_cb(
        agh::CSubject::SEpisode *Ep;
        if ( ED.using_subject && (Ep = ED.using_subject->using_episode) ) {
                auto& R = Ep->recordings.at(ED.AghH());
-               aghui::SBusyBlock bb (ED.wMainWindow);
+               SBusyBlock bb (ED.wMainWindow);
                ED.do_detect_ultradian_cycle( R);
        }
 }
diff --git a/src/ui/mw/mw_cb.cc b/src/ui/mw/mw_cb.cc
index b2964d5..2867678 100644
--- a/src/ui/mw/mw_cb.cc
+++ b/src/ui/mw/mw_cb.cc
@@ -16,6 +16,7 @@
 #include "mw.hh"
 #include "mw_cb.hh"
 
+using namespace std;
 using namespace aghui;
 
 extern "C" {
@@ -191,13 +192,13 @@ eMsmtProfileType_changed_cb(
        params.swa_laden_pages_before_SWA_0 = 0u;
 
        // collect profiles that need to be re-created
-       aghui::SBusyBlock *bb = nullptr;
+       SBusyBlock *bb = nullptr;
        vector<agh::CProfile*> redo_profiles;
        for ( auto &G : ED.groups )
                for ( auto &J : G )
                        if ( J.cprofile and J.cprofile->need_compute( params) ) 
{
                                if ( !bb )
-                                       bb = new aghui::SBusyBlock 
(ED.wMainWindow);
+                                       bb = new SBusyBlock (ED.wMainWindow);
                                redo_profiles.push_back( J.cprofile);
                        }
 
diff --git a/src/ui/mw/settings_cb.cc b/src/ui/mw/settings_cb.cc
index 404f75b..adc9aed 100644
--- a/src/ui/mw/settings_cb.cc
+++ b/src/ui/mw/settings_cb.cc
@@ -119,30 +119,34 @@ __adjust_adjustments( SExpDesignUI& ED)
 {
        using namespace agh::ach;
        for ( size_t t = 0; t < (size_t)TTunable::_basic_tunables; ++t ) {
-               gtk_adjustment_configure( ED.jTunable[t][0],
-                                         stock[t].display_scale_factor * 
ED.ED->tunables0[t],
-                                         stock[t].display_scale_factor * 
ED.ED->tlo[t],
-                                         stock[t].display_scale_factor * 
ED.ED->thi[t],
-                                         stock[t].adj_step, 10 * 
stock[t].adj_step,
-                                         0);
-               gtk_adjustment_configure( ED.jTunable[t][1],
-                                         stock[t].display_scale_factor * 
ED.ED->tlo[t],
-                                         0,
-                                         stock[t].display_scale_factor * 
ED.ED->thi[t],
-                                         stock[t].adj_step, 10 * 
stock[t].adj_step,
-                                         0);
-               gtk_adjustment_configure( ED.jTunable[t][2],
-                                         stock[t].display_scale_factor * 
ED.ED->thi[t],
-                                         stock[t].display_scale_factor * 
ED.ED->tlo[t],
-                                         stock[t].display_scale_factor * 
ED.ED->thi[t] * 1.5,
-                                         stock[t].adj_step, 10 * 
stock[t].adj_step,
-                                         0);
-               gtk_adjustment_configure( ED.jTunable[t][3],
-                                         stock[t].display_scale_factor * 
ED.ED->tstep[t],
-                                         stock[t].display_scale_factor * 
ED.ED->tunables0[t] / 1000.,
-                                         stock[t].display_scale_factor * 
ED.ED->tunables0[t] / 2,
-                                         stock[t].adj_step, 10 * 
stock[t].adj_step,
-                                         0);
+               gtk_adjustment_configure(
+                       ED.jTunable[t][0],
+                       stock[t].display_scale_factor * ED.ED->tunables0[t],
+                       stock[t].display_scale_factor * ED.ED->tlo[t],
+                       stock[t].display_scale_factor * ED.ED->thi[t],
+                       stock[t].adj_step, 10 * stock[t].adj_step,
+                       0);
+               gtk_adjustment_configure(
+                       ED.jTunable[t][1],
+                       stock[t].display_scale_factor * ED.ED->tlo[t],
+                       0,
+                       stock[t].display_scale_factor * ED.ED->thi[t],
+                       stock[t].adj_step, 10 * stock[t].adj_step,
+                       0);
+               gtk_adjustment_configure(
+                       ED.jTunable[t][2],
+                       stock[t].display_scale_factor * ED.ED->thi[t],
+                       stock[t].display_scale_factor * ED.ED->tlo[t],
+                       stock[t].display_scale_factor * ED.ED->thi[t] * 1.5,
+                       stock[t].adj_step, 10 * stock[t].adj_step,
+                       0);
+               gtk_adjustment_configure(
+                       ED.jTunable[t][3],
+                       stock[t].display_scale_factor * ED.ED->tstep[t],
+                       stock[t].display_scale_factor * ED.ED->tunables0[t] / 
1000.,
+                       stock[t].display_scale_factor * ED.ED->tunables0[t] / 2,
+                       stock[t].adj_step, 10 * stock[t].adj_step,
+                       0);
        }
 }
 
@@ -242,10 +246,11 @@ eCtlParamDBAmendment1_toggled_cb(
        const gpointer userdata)
 {
        auto& ED = *(SExpDesignUI*)userdata;
-       gtk_label_set_markup( ED.lCtlParamDBAmendment1,
-                             gtk_toggle_button_get_active( button)
-                             ? "<small>Let SWA be affected by <i>S</i> at all 
times</small>"
-                             : "<small>Cancel <i>rc</i>-dependent SWA increase 
in Wake</small>");
+       gtk_label_set_markup(
+               ED.lCtlParamDBAmendment1,
+               gtk_toggle_button_get_active( button)
+               ? "<small>Let SWA be affected by <i>S</i> at all times</small>"
+               : "<small>Cancel <i>rc</i>-dependent SWA increase in 
Wake</small>");
 }
 
 void
@@ -254,10 +259,11 @@ eCtlParamDBAmendment2_toggled_cb(
        const gpointer userdata)
 {
        auto& ED = *(SExpDesignUI*)userdata;
-       gtk_label_set_markup( ED.lCtlParamDBAmendment2,
-                             gtk_toggle_button_get_active( button)
-                             ? "<small>Assume sleep homeostat is stable 
(<i>S</i><sub>24h</sub> = <i>S</i><sub>0</sub>)</small>"
-                             : "<small>Don't assume <i>S</i><sub>24h</sub> = 
<i>S</i><sub>0</sub></small>");
+       gtk_label_set_markup(
+               ED.lCtlParamDBAmendment2,
+               gtk_toggle_button_get_active( button)
+               ? "<small>Assume sleep homeostat is stable 
(<i>S</i><sub>24h</sub> = <i>S</i><sub>0</sub>)</small>"
+               : "<small>Don't assume <i>S</i><sub>24h</sub> = 
<i>S</i><sub>0</sub></small>");
 }
 
 void
@@ -266,10 +272,11 @@ eCtlParamAZAmendment1_toggled_cb(
        const gpointer userdata)
 {
        auto& ED = *(SExpDesignUI*)userdata;
-       gtk_label_set_markup( ED.lCtlParamAZAmendment1,
-                             gtk_toggle_button_get_active( button)
-                             ? "<small>Compute <i>gc</i> per-episode</small>"
-                             : "<small>Assume <i>gc</i> is not variable across 
episodes</small>");
+       gtk_label_set_markup(
+               ED.lCtlParamAZAmendment1,
+               gtk_toggle_button_get_active( button)
+               ? "<small>Compute <i>gc</i> per-episode</small>"
+               : "<small>Assume <i>gc</i> is not variable across 
episodes</small>");
 }
 
 // -------- colours
diff --git a/src/ui/mw/simulations_cb.cc b/src/ui/mw/simulations_cb.cc
index a9dfe84..b0d4b80 100644
--- a/src/ui/mw/simulations_cb.cc
+++ b/src/ui/mw/simulations_cb.cc
@@ -75,7 +75,7 @@ iSimulationsRunBatch_activate_cb(
        }
 
        if ( gtk_dialog_run( ED.wBatchSetup) == GTK_RESPONSE_OK ) {
-               aghui::SBusyBlock bb (ED.wMainWindow);
+               SBusyBlock bb (ED.wMainWindow);
 
                ED.ED->remove_untried_modruns();
                ED.populate_2();
diff --git a/src/ui/sf/d/artifacts_cb.cc b/src/ui/sf/d/artifacts_cb.cc
index d94a1da..5c0260a 100644
--- a/src/ui/sf/d/artifacts_cb.cc
+++ b/src/ui/sf/d/artifacts_cb.cc
@@ -174,7 +174,7 @@ bSFADPreview_toggled_cb(
                return;
 
        if ( gtk_toggle_button_get_active(b) ) {
-               aghui::SBusyBlock bb (AD.wSFAD);
+               SBusyBlock bb (AD.wSFAD);
 
                AD.orig_signal_visible_backup = 
SF.using_channel->draw_original_signal;
                AD.artifacts_backup = SF.using_channel->artifacts;
diff --git a/src/ui/sf/d/patterns_cb.cc b/src/ui/sf/d/patterns_cb.cc
index 591bdf1..16f5b39 100644
--- a/src/ui/sf/d/patterns_cb.cc
+++ b/src/ui/sf/d/patterns_cb.cc
@@ -15,7 +15,6 @@
 #include "patterns.hh"
 
 using namespace std;
-
 using namespace aghui;
 
 extern "C" {
@@ -244,7 +243,7 @@ bSFFDSearch_clicked_cb(
        auto& FD = *(SScoringFacility::SPatternsDialog*)userdata;
        auto& SF = FD._p;
 
-       aghui::SBusyBlock bb (FD.wSFFD);
+       SBusyBlock bb (FD.wSFFD);
 
        FD.setup_controls_for_wait();
        gtk_flush();
@@ -478,7 +477,7 @@ wSFFD_hide_cb(
 
        if ( not FD.occurrences.empty() ) { // closing while dialog is in 
matching state
                if ( GTK_RESPONSE_YES !=
-                    aghui::pop_question( SF.wSF, "Keep annotations?") )
+                    pop_question( SF.wSF, "Keep annotations?") )
                        FD.restore_annotations();
                else {
                        SF._p.populate_mGlobalAnnotations();
diff --git a/src/ui/sf/ica.cc b/src/ui/sf/ica.cc
index 8fc87a6..054d36f 100644
--- a/src/ui/sf/ica.cc
+++ b/src/ui/sf/ica.cc
@@ -97,7 +97,7 @@ setup_ica()
 
        // populate mSFICAPage
        gtk_container_foreach( (GtkContainer*)iiSFICAPage, 
(GtkCallback)gtk_widget_destroy, NULL);
-       GSList *group = NULL;
+       GSList *group = nullptr;
        for ( auto &H : channels ) {
                auto item = (GtkWidget*)gtk_radio_menu_item_new_with_label( 
group, H.name.c_str());
                group = gtk_radio_menu_item_get_group( (GtkRadioMenuItem*)item);
diff --git a/src/ui/sf/ica_cb.cc b/src/ui/sf/ica_cb.cc
index 6d7b39c..a46fb22 100644
--- a/src/ui/sf/ica_cb.cc
+++ b/src/ui/sf/ica_cb.cc
@@ -25,7 +25,7 @@ bSFRunICA_clicked_cb(
 {
        auto& SF = *(SScoringFacility*)userdata;
        if ( SF.setup_ica() == 0 ) {
-               SF.mode = aghui::SScoringFacility::TMode::showing_ics;
+               SF.mode = SScoringFacility::TMode::showing_ics;
                gtk_widget_set_visible( (GtkWidget*)SF.cSFScoringModeContainer, 
FALSE);
                gtk_widget_set_visible( (GtkWidget*)SF.cSFICAModeContainer, 
TRUE);
 
@@ -35,7 +35,7 @@ bSFRunICA_clicked_cb(
                gtk_widget_set_sensitive( (GtkWidget*)SF.bSFICAApply, FALSE);
 
                gtk_widget_set_sensitive( (GtkWidget*)SF.bSFAccept, FALSE);
-               SF.set_tooltip( aghui::SScoringFacility::TTipIdx::ica_mode);
+               SF.set_tooltip( SScoringFacility::TTipIdx::ica_mode);
                SF.queue_redraw_all();
        }
 }
@@ -187,10 +187,10 @@ eSFICARemixMode_changed_cb(
        const gpointer u)
 {
        auto& SF = *(SScoringFacility*)u;
-       static aghui::SScoringFacility::TICARemixMode vv[] = {
-               aghui::SScoringFacility::TICARemixMode::punch,
-               aghui::SScoringFacility::TICARemixMode::map,
-               aghui::SScoringFacility::TICARemixMode::zero,
+       static SScoringFacility::TICARemixMode vv[] = {
+               SScoringFacility::TICARemixMode::punch,
+               SScoringFacility::TICARemixMode::map,
+               SScoringFacility::TICARemixMode::zero,
        };
        SF.remix_mode = vv[gtk_combo_box_get_active( w)];
        SF.ica_map.assign( SF.ica_map.size(), SScoringFacility::SICMapOptions 
{-1});
@@ -208,14 +208,14 @@ bSFICATry_clicked_cb(
 {
        auto& SF = *(SScoringFacility*)userdata;
 
-       SF.mode = aghui::SScoringFacility::TMode::separating; // strictly to 
have draw_montage display a banner
+       SF.mode = SScoringFacility::TMode::separating; // strictly to have 
draw_montage display a banner
 
        SF.queue_redraw_all();
-       aghui::SBusyBlock bb (SF.wSF);
+       SBusyBlock bb (SF.wSF);
 
        SF.run_ica();
 
-       SF.mode = aghui::SScoringFacility::TMode::showing_ics;
+       SF.mode = SScoringFacility::TMode::showing_ics;
        gtk_widget_set_sensitive( (GtkWidget*)SF.bSFICAPreview, TRUE);
        gtk_widget_set_sensitive( (GtkWidget*)SF.bSFICAShowMatrix, TRUE);
 
@@ -233,12 +233,12 @@ bSFICAPreview_toggled_cb(
 
        if ( gtk_toggle_button_get_active( button) ) {
                SF.remix_ics();
-               SF.mode = aghui::SScoringFacility::TMode::showing_remixed;
+               SF.mode = SScoringFacility::TMode::showing_remixed;
                gtk_widget_set_sensitive( (GtkWidget*)SF.bSFICATry, FALSE);
                gtk_widget_set_sensitive( (GtkWidget*)SF.bSFICAApply, TRUE);
        } else {
                SF.restore_ics();
-               SF.mode = aghui::SScoringFacility::TMode::showing_ics;
+               SF.mode = SScoringFacility::TMode::showing_ics;
                gtk_widget_set_sensitive( (GtkWidget*)SF.bSFICATry, TRUE);
                gtk_widget_set_sensitive( (GtkWidget*)SF.bSFICAApply, FALSE);
        }
@@ -299,11 +299,11 @@ bSFICAApply_clicked_cb(
 
        SF.apply_remix( true);
 
-       SF.mode = aghui::SScoringFacility::TMode::scoring;
+       SF.mode = SScoringFacility::TMode::scoring;
        gtk_widget_set_visible( (GtkWidget*)SF.cSFScoringModeContainer, TRUE);
        gtk_widget_set_visible( (GtkWidget*)SF.cSFICAModeContainer, FALSE);
        gtk_widget_set_sensitive( (GtkWidget*)SF.bSFAccept, TRUE);
-       SF.set_tooltip( aghui::SScoringFacility::TTipIdx::scoring_mode);
+       SF.set_tooltip( SScoringFacility::TTipIdx::scoring_mode);
 
        SF.queue_redraw_all();
 }
@@ -320,11 +320,11 @@ bSFICACancel_clicked_cb(
        SF.ica = NULL;
        SF.ica_components = itpp::mat (0, 0);
 
-       SF.mode = aghui::SScoringFacility::TMode::scoring;
+       SF.mode = SScoringFacility::TMode::scoring;
        gtk_widget_set_visible( (GtkWidget*)SF.cSFScoringModeContainer, TRUE);
        gtk_widget_set_visible( (GtkWidget*)SF.cSFICAModeContainer, FALSE);
        gtk_widget_set_sensitive( (GtkWidget*)SF.bSFAccept, TRUE);
-       SF.set_tooltip( aghui::SScoringFacility::TTipIdx::scoring_mode);
+       SF.set_tooltip( SScoringFacility::TTipIdx::scoring_mode);
 
        SF.queue_redraw_all();
 }
diff --git a/src/ui/sf/montage.cc b/src/ui/sf/montage.cc
index 4dc263a..2008dcd 100644
--- a/src/ui/sf/montage.cc
+++ b/src/ui/sf/montage.cc
@@ -779,7 +779,7 @@ draw_montage( cairo_t* cr)
                        evpz = cvpe - cvpa;
 
                for ( auto &SA : common_annotations ) {
-                       auto &S = *SA.first;
+                       //auto &S = *SA.first;
                        auto &A = *SA.second;
                        if ( agh::alg::overlap( A.span.a, A.span.z, cvpa, cvpe) 
) {
                                double  aa = A.span.a - cvpa,
diff --git a/src/ui/sf/montage_cb.cc b/src/ui/sf/montage_cb.cc
index feedada..63a9a3b 100644
--- a/src/ui/sf/montage_cb.cc
+++ b/src/ui/sf/montage_cb.cc
@@ -75,23 +75,23 @@ daSFMontage_button_press_event_cb(
 {
        auto& SF = *(SScoringFacility*)userdata;
 
-       if ( SF.mode == aghui::SScoringFacility::TMode::showing_ics ) {
+       if ( SF.mode == SScoringFacility::TMode::showing_ics ) {
                if ( SF.ica_components.size() == 0 )
                        return TRUE;
 
                SF.using_ic = SF.ic_near( event->y);
 
                if ( event->button == 1 &&
-                    (SF.remix_mode == 
aghui::SScoringFacility::TICARemixMode::punch ||
-                     SF.remix_mode == 
aghui::SScoringFacility::TICARemixMode::zero) ) {
+                    (SF.remix_mode == SScoringFacility::TICARemixMode::punch ||
+                     SF.remix_mode == SScoringFacility::TICARemixMode::zero) ) 
{
                        SF.ica_map[SF.using_ic].m =
                                (SF.ica_map[SF.using_ic].m == -1) ? 0 : -1;
                        gtk_widget_queue_draw( wid);
-               } else if ( SF.remix_mode == 
aghui::SScoringFacility::TICARemixMode::map ) {
+               } else if ( SF.remix_mode == 
SScoringFacility::TICARemixMode::map ) {
                        const char *mapped =
                                (SF.ica_map[SF.using_ic].m != -1)
                                ? SF.channel_by_idx( SF.ica_map[SF.using_ic].m) 
. name.c_str()
-                               : 
aghui::SScoringFacility::ica_unmapped_menu_item_label;
+                               : 
SScoringFacility::ica_unmapped_menu_item_label;
                        SF.suppress_redraw = true;
                        gtk_container_foreach(
                                (GtkContainer*)SF.iiSFICAPage,
@@ -103,7 +103,7 @@ daSFMontage_button_press_event_cb(
                return TRUE;
        }
 
-       if ( SF.mode == aghui::SScoringFacility::TMode::showing_remixed ) {
+       if ( SF.mode == SScoringFacility::TMode::showing_remixed ) {
                if ( SF.ica_components.size() == 0 )
                        return TRUE;
 
@@ -118,8 +118,8 @@ daSFMontage_button_press_event_cb(
                return TRUE;
        }
 
-       if ( SF.mode == aghui::SScoringFacility::TMode::shuffling_channels ) {
-               SF.mode = aghui::SScoringFacility::TMode::scoring;
+       if ( SF.mode == SScoringFacility::TMode::shuffling_channels ) {
+               SF.mode = SScoringFacility::TMode::scoring;
                return TRUE;
        }
 
@@ -191,9 +191,9 @@ daSFMontage_button_press_event_cb(
                        if ( event->state & GDK_MOD1_MASK ) {
                                SF.event_y_when_shuffling = event->y;
                                SF.zeroy_before_shuffling = Ch->zeroy;
-                               SF.mode = 
aghui::SScoringFacility::TMode::shuffling_channels;
+                               SF.mode = 
SScoringFacility::TMode::shuffling_channels;
                        } else {
-                               SF.mode = 
aghui::SScoringFacility::TMode::marking;
+                               SF.mode = SScoringFacility::TMode::marking;
                                Ch->marquee_mstart = Ch->marquee_mend = 
event->x;
                        }
                        gtk_widget_queue_draw( wid);
@@ -221,7 +221,7 @@ daSFMontage_motion_notify_event_cb(
        const gpointer userdata)
 {
        auto& SF = *(SScoringFacility*)userdata;
-       if ( SF.mode == aghui::SScoringFacility::TMode::showing_ics )
+       if ( SF.mode == SScoringFacility::TMode::showing_ics )
                return TRUE;
 
        static struct timeval last_page_flip = {0, 0};
@@ -229,11 +229,11 @@ daSFMontage_motion_notify_event_cb(
                gettimeofday( &last_page_flip, NULL);
 
        // update marquee boundaries
-       if ( SF.mode == aghui::SScoringFacility::TMode::shuffling_channels ) {
+       if ( SF.mode == SScoringFacility::TMode::shuffling_channels ) {
                SF.using_channel->zeroy = SF.zeroy_before_shuffling + (event->y 
- SF.event_y_when_shuffling);
                gtk_widget_queue_draw( wid);
 
-       } else if ( SF.mode == aghui::SScoringFacility::TMode::marking ) {
+       } else if ( SF.mode == SScoringFacility::TMode::marking ) {
                if ( SF.channel_near( event->y) != SF.using_channel ) // user 
has dragged too much vertically
                        return TRUE;
                SF.using_channel->marquee_mend = event->x;
@@ -269,7 +269,7 @@ daSFMontage_motion_notify_event_cb(
                gtk_widget_queue_draw( wid);
        }
 
-       if ( SF.mode == aghui::SScoringFacility::TMode::scoring ) {
+       if ( SF.mode == SScoringFacility::TMode::scoring ) {
                gtk_label_set_text(
                        SF.lSFOverChannel,
                        SF.channel_near( event->y) -> name.c_str());
@@ -303,8 +303,8 @@ daSFMontage_button_release_event_cb(
        const gpointer userdata)
 {
        auto& SF = *(SScoringFacility*)userdata;
-       if ( SF.mode == aghui::SScoringFacility::TMode::showing_ics ||
-            SF.mode == aghui::SScoringFacility::TMode::showing_remixed )
+       if ( SF.mode == SScoringFacility::TMode::showing_ics ||
+            SF.mode == SScoringFacility::TMode::showing_remixed )
                return TRUE;
 
        auto Ch = SF.using_channel;
@@ -314,8 +314,8 @@ daSFMontage_button_release_event_cb(
 
        switch ( event->button ) {
        case 1:
-               if ( SF.mode == aghui::SScoringFacility::TMode::marking ) {
-                       SF.mode = aghui::SScoringFacility::TMode::scoring;
+               if ( SF.mode == SScoringFacility::TMode::marking ) {
+                       SF.mode = SScoringFacility::TMode::scoring;
                        Ch->put_selection( Ch->selection_start, 
Ch->selection_end);
                        gtk_widget_queue_draw( wid);
                        Ch->selectively_enable_selection_menu_items();
@@ -329,7 +329,7 @@ daSFMontage_button_release_event_cb(
                        SF.set_cur_vpage( (event->x / SF.da_wd) * 
SF.total_vpages());
                else {
                        SF.using_channel->marquee_to_selection();
-                       SF.mode = aghui::SScoringFacility::TMode::scoring;
+                       SF.mode = SScoringFacility::TMode::scoring;
                        gtk_widget_queue_draw( wid);
                }
            break;
@@ -552,7 +552,7 @@ iSFPageHide_activate_cb(
                      "visible", TRUE,
                      NULL);
        g_signal_connect( (GObject*)item,
-                         "activate", G_CALLBACK 
(iSFPageShowHidden_activate_cb),
+                         "activate", (GCallback)iSFPageShowHidden_activate_cb,
                          &SF);
        gtk_container_add( (GtkContainer*)SF.iiSFPageHidden,
                           item);
@@ -577,7 +577,7 @@ iSFPageShowHidden_activate_cb(
                NULL, (int*)&Ch->zeroy, NULL); //SF.find_free_space();
        SF.zeroy_before_shuffling = Ch->zeroy;
        SF.event_y_when_shuffling = (double)Ch->zeroy;
-       SF.mode = aghui::SScoringFacility::TMode::shuffling_channels;
+       SF.mode = SScoringFacility::TMode::shuffling_channels;
 
        gtk_widget_destroy( (GtkWidget*)Ch->menu_item_when_hidden);
        Ch->menu_item_when_hidden = NULL;
@@ -1067,7 +1067,7 @@ iSFPageSelectionMarkArtifact_activate_cb(
 {
        auto& SF = *(SScoringFacility*)userdata;
        auto& H = SF.using_channel;
-       aghui::SBusyBlock bb (SF.wSF);
+       SBusyBlock bb (SF.wSF);
 
        H->mark_region_as_artifact( true);
 
@@ -1082,7 +1082,7 @@ iSFPageSelectionClearArtifact_activate_cb(
 {
        auto& SF = *(SScoringFacility*)userdata;
        auto& H = SF.using_channel;
-       aghui::SBusyBlock bb (SF.wSF);
+       SBusyBlock bb (SF.wSF);
 
        H->mark_region_as_artifact( false);
 
diff --git a/src/ui/sf/sf.cc b/src/ui/sf/sf.cc
index b08d5fc..6d26dec 100644
--- a/src/ui/sf/sf.cc
+++ b/src/ui/sf/sf.cc
@@ -150,7 +150,6 @@ SScoringFacility (agh::CSubject& J,
              []( const pair<const sigfile::CSource*, const 
sigfile::SAnnotation*>& a1,
                  const pair<const sigfile::CSource*, const 
sigfile::SAnnotation*>& a2)
              { return *a1.second < *a2.second; });
-       printf( "collected %zu embedded annotations\n", 
common_annotations.size());
 
       // count n_eeg_channels
        n_eeg_channels =

-- 
Sleep experiment manager

_______________________________________________
debian-med-commit mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit

Reply via email to