[med-svn] [aghermann] 11/23: split namespace id aghui into agh::ui

andrei zavada hmmr-guest at alioth.debian.org
Sat Aug 17 18:05:41 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 a8aa5fedcef8102a534f0410469ea0d17598c57f
Author: Andrei Zavada <johnhommer at gmail.com>
Date:   Tue Aug 6 13:49:47 2013 +0300

    split namespace id aghui into agh::ui
---
 src/.gitignore                                     |    1 +
 src/aghermann/expdesign/primaries.hh               |    2 +-
 src/aghermann/expdesign/recording.hh               |    2 +-
 src/aghermann/main.cc                              |   20 ++---
 src/aghermann/ui/forward-decls.hh                  |    6 +-
 src/aghermann/ui/globals.hh                        |    6 +-
 src/aghermann/ui/libcommon.cc                      |   56 +++++++-------
 src/aghermann/ui/mf/mf-construct.cc                |    2 +-
 src/aghermann/ui/mf/mf.cc                          |   18 ++---
 src/aghermann/ui/mf/mf.hh                          |    6 +-
 src/aghermann/ui/mf/mf_cb.cc                       |    6 +-
 src/aghermann/ui/misc.hh                           |    6 +-
 src/aghermann/ui/mw/admit-one.cc                   |    4 +-
 src/aghermann/ui/mw/construct.cc                   |   10 +--
 src/aghermann/ui/mw/loadsave.cc                    |   10 +--
 src/aghermann/ui/mw/mainmenu_cb.cc                 |    2 +-
 src/aghermann/ui/mw/measurements.cc                |   12 +--
 src/aghermann/ui/mw/measurements_cb.cc             |    2 +-
 src/aghermann/ui/mw/mw.cc                          |   62 ++++++++--------
 src/aghermann/ui/mw/mw.hh                          |   16 ++--
 src/aghermann/ui/mw/mw_cb.cc                       |    2 +-
 src/aghermann/ui/mw/populate.cc                    |   26 +++----
 src/aghermann/ui/mw/settings_cb.cc                 |    2 +-
 src/aghermann/ui/mw/simulations.cc                 |    4 +-
 src/aghermann/ui/mw/simulations_cb.cc              |    2 +-
 src/aghermann/ui/mw/splash.cc                      |   16 ++--
 src/aghermann/ui/mw/widgets.hh                     |    6 +-
 src/aghermann/ui/sf/channel.cc                     |   52 ++++++-------
 src/aghermann/ui/sf/construct.cc                   |    4 +-
 src/aghermann/ui/sf/controls_cb.cc                 |    2 +-
 src/aghermann/ui/sf/d/artifacts-construct.cc       |    4 +-
 .../ui/sf/d/artifacts-simple-construct.cc          |    4 +-
 src/aghermann/ui/sf/d/artifacts-simple.cc          |    8 +-
 src/aghermann/ui/sf/d/artifacts-simple.hh          |    6 +-
 src/aghermann/ui/sf/d/artifacts.cc                 |   10 +--
 src/aghermann/ui/sf/d/artifacts.hh                 |    6 +-
 src/aghermann/ui/sf/d/artifacts_cb.cc              |    2 +-
 src/aghermann/ui/sf/d/filters-construct.cc         |    4 +-
 src/aghermann/ui/sf/d/filters.cc                   |    6 +-
 src/aghermann/ui/sf/d/filters.hh                   |    6 +-
 src/aghermann/ui/sf/d/filters_cb.cc                |    2 +-
 src/aghermann/ui/sf/d/patterns-construct.cc        |    4 +-
 src/aghermann/ui/sf/d/patterns-draw.cc             |   38 +++++-----
 src/aghermann/ui/sf/d/patterns-profiles.cc         |   14 ++--
 src/aghermann/ui/sf/d/patterns-profiles_cb.cc      |    2 +-
 src/aghermann/ui/sf/d/patterns.cc                  |   34 ++++-----
 src/aghermann/ui/sf/d/patterns.hh                  |    8 +-
 src/aghermann/ui/sf/d/patterns_cb.cc               |    2 +-
 src/aghermann/ui/sf/d/phasediff-construct.cc       |    4 +-
 src/aghermann/ui/sf/d/phasediff.cc                 |   24 +++---
 src/aghermann/ui/sf/d/phasediff.hh                 |    6 +-
 src/aghermann/ui/sf/d/phasediff_cb.cc              |    2 +-
 src/aghermann/ui/sf/hypnogram.cc                   |    8 +-
 src/aghermann/ui/sf/hypnogram_cb.cc                |    2 +-
 src/aghermann/ui/sf/ica.cc                         |   22 +++---
 src/aghermann/ui/sf/ica_cb.cc                      |    2 +-
 src/aghermann/ui/sf/mainmenu_cb.cc                 |    2 +-
 src/aghermann/ui/sf/montage-overlays.cc            |    6 +-
 src/aghermann/ui/sf/montage.cc                     |   58 +++++++--------
 src/aghermann/ui/sf/montage_cb.cc                  |    4 +-
 src/aghermann/ui/sf/sf.cc                          |   78 ++++++++++----------
 src/aghermann/ui/sf/sf.hh                          |    8 +-
 src/aghermann/ui/sf/sf_cb.cc                       |    2 +-
 src/aghermann/ui/sf/widgets.hh                     |    6 +-
 src/aghermann/ui/sm/sm-construct.cc                |    2 +-
 src/aghermann/ui/sm/sm.cc                          |   44 +++++------
 src/aghermann/ui/sm/sm.hh                          |    8 +-
 src/aghermann/ui/sm/sm_cb.cc                       |    6 +-
 src/aghermann/ui/ui++.hh                           |    6 +-
 src/aghermann/ui/ui.hh                             |    6 +-
 src/tools/edfhed-gtk.cc                            |    2 +-
 71 files changed, 433 insertions(+), 400 deletions(-)

diff --git a/src/.gitignore b/src/.gitignore
new file mode 100644
index 0000000..0638d75
--- /dev/null
+++ b/src/.gitignore
@@ -0,0 +1 @@
+.dirstamp
diff --git a/src/aghermann/expdesign/primaries.hh b/src/aghermann/expdesign/primaries.hh
index 418b131..82649bc 100644
--- a/src/aghermann/expdesign/primaries.hh
+++ b/src/aghermann/expdesign/primaries.hh
@@ -171,7 +171,7 @@ class CSubject : public SSubjectId {
 
 	    // private:
 	    // 	friend class agh::CSubject;
-	    // 	friend class aghui::SScoringFacility;
+	    // 	friend class agh::ui::SScoringFacility;
 	      // allow multiple sources (possibly supplying different channels)
 		list<sigfile::CTypedSource>
 			sources;
diff --git a/src/aghermann/expdesign/recording.hh b/src/aghermann/expdesign/recording.hh
index 8b9ffe7..9d32ce7 100644
--- a/src/aghermann/expdesign/recording.hh
+++ b/src/aghermann/expdesign/recording.hh
@@ -168,7 +168,7 @@ class CRecording {
 		}
 	sigfile::CSource& F()  // although we shouldn't want to access CEDFFile writably from CRecording,
 		{      // this shortcut saves us the trouble of AghCC->subject_by_x(,,,).measurements...
-			return _source();  // on behalf of aghui::SChannelPresentation
+			return _source();  // on behalf of agh::ui::SChannelPresentation
 		}
 	const sigfile::CHypnogram&
 	hypnogram() const
diff --git a/src/aghermann/main.cc b/src/aghermann/main.cc
index 8800555..8f8ac4f 100644
--- a/src/aghermann/main.cc
+++ b/src/aghermann/main.cc
@@ -33,7 +33,7 @@ message_received_cb( UniqueApp         *,
                      guint              time_,
                      gpointer           )
 {
-	if ( aghui::__main_window__ == NULL )
+	if ( agh::ui::__main_window__ == NULL )
 		return UNIQUE_RESPONSE_OK;
 
 	UniqueResponse res;
@@ -41,8 +41,8 @@ message_received_cb( UniqueApp         *,
 	switch ( command ) {
 	case UNIQUE_ACTIVATE:
 		// move the main window to the screen that sent us the command
-		gtk_window_set_screen( aghui::__main_window__, unique_message_data_get_screen( message));
-		gtk_window_present_with_time( aghui::__main_window__, time_);
+		gtk_window_set_screen( agh::ui::__main_window__, unique_message_data_get_screen( message));
+		gtk_window_present_with_time( agh::ui::__main_window__, time_);
 		res = UNIQUE_RESPONSE_OK;
 	    break;
 	default:
@@ -93,26 +93,26 @@ main( int argc, char **argv)
 		gtk_init( &argc, &argv);
 
 		// don't let user get us started twice
-		aghui::__unique_app__ =
+		agh::ui::__unique_app__ =
 			unique_app_new_with_commands( "com.johnhommer.Aghermann", NULL,
 						      "fafa", 1,
 						      NULL);
-		if ( unique_app_is_running( aghui::__unique_app__) ) {
+		if ( unique_app_is_running( agh::ui::__unique_app__) ) {
 			printf( "There is unique app, switching to it now\n");
-			unique_app_send_message( aghui::__unique_app__, UNIQUE_ACTIVATE, NULL);
+			unique_app_send_message( agh::ui::__unique_app__, UNIQUE_ACTIVATE, NULL);
 		} else {
-			g_signal_connect( aghui::__unique_app__, "message-received",
+			g_signal_connect( agh::ui::__unique_app__, "message-received",
 					  (GCallback)message_received_cb,
 					  NULL);
 
 			agh::global::init();
 
-			if ( aghui::prepare_for_expdesign() ) {
-				aghui::pop_ok_message( NULL, "UI failed to initialize", "Your install is broken.");
+			if ( agh::ui::prepare_for_expdesign() ) {
+				agh::ui::pop_ok_message( NULL, "UI failed to initialize", "Your install is broken.");
 				return 2;
 			}
 
-			aghui::SSessionChooser chooser (argv[optind]);
+			agh::ui::SSessionChooser chooser (argv[optind]);
 			// implicit read sessionrc, run
 
 			gtk_main();
diff --git a/src/aghermann/ui/forward-decls.hh b/src/aghermann/ui/forward-decls.hh
index 919ca1d..18d23ba 100644
--- a/src/aghermann/ui/forward-decls.hh
+++ b/src/aghermann/ui/forward-decls.hh
@@ -13,14 +13,16 @@
 #ifndef _AGHUI_FORWARD_DECLS_H
 #define _AGHUI_FORWARD_DECLS_H
 
-namespace aghui {
+namespace agh {
+namespace ui {
 
 class SSessionChooser;
 class SExpDesignUI;
 class SScoringFacility;
 class SModelrunFacility;
 
-} // namespace aghui
+}
+} // namespace agh::ui
 
 #endif
 
diff --git a/src/aghermann/ui/globals.hh b/src/aghermann/ui/globals.hh
index c0a9512..92cbc95 100644
--- a/src/aghermann/ui/globals.hh
+++ b/src/aghermann/ui/globals.hh
@@ -23,7 +23,8 @@
 using namespace std;
 
 
-namespace aghui {
+namespace agh {
+namespace ui {
 
 extern UniqueApp
 	*__unique_app__;
@@ -51,7 +52,8 @@ int prepare_for_expdesign();
 
 void set_unique_app_window( GtkWindow*);
 
-} // namespace aghui
+}
+} // namespace agh::ui
 
 #endif
 
diff --git a/src/aghermann/ui/libcommon.cc b/src/aghermann/ui/libcommon.cc
index 6ef69f0..1bed057 100644
--- a/src/aghermann/ui/libcommon.cc
+++ b/src/aghermann/ui/libcommon.cc
@@ -20,39 +20,39 @@
 
 using namespace std;
 
-char	aghui::__buf__[AGH_BUF_SIZE];
+char	agh::ui::__buf__[AGH_BUF_SIZE];
 
-GString	*aghui::__ss__;
+GString	*agh::ui::__ss__;
 
 GdkDevice
-	*aghui::__client_pointer__;
+	*agh::ui::__client_pointer__;
 
 UniqueApp
-	*aghui::__unique_app__;
+	*agh::ui::__unique_app__;
 
 GtkWindow
-	*aghui::__main_window__;
+	*agh::ui::__main_window__;
 
-double	aghui::__hdpmm__,
-	aghui::__vdpmm__;
+double	agh::ui::__hdpmm__,
+	agh::ui::__vdpmm__;
 
 #define AGH_UI_GRESOURCE_FILE "aghermann.gresource"
 
 // unique
 
 void
-aghui::
+agh::ui::
 set_unique_app_window( GtkWindow* w)
 {
 	unique_app_watch_window(
-		aghui::__unique_app__,
-		aghui::__main_window__ = w);
+		agh::ui::__unique_app__,
+		agh::ui::__main_window__ = w);
 }
 
 // own init
 
 int
-aghui::
+agh::ui::
 prepare_for_expdesign()
 {
 	__ss__ = g_string_new( "");
@@ -91,7 +91,7 @@ prepare_for_expdesign()
 
 // these are intended for durations, not timestamps
 void
-aghui::
+agh::ui::
 snprintf_buf_ts_d( const double d_)
 {
 	if ( d_ < 1. )
@@ -111,7 +111,7 @@ snprintf_buf_ts_d( const double d_)
 }
 
 void
-aghui::
+agh::ui::
 snprintf_buf_ts_h( const double h_)
 {
 	if ( h_ < 1. )
@@ -130,7 +130,7 @@ snprintf_buf_ts_h( const double h_)
 }
 
 void
-aghui::
+agh::ui::
 snprintf_buf_ts_m( const double m_)
 {
 	if ( m_ < 1. )
@@ -149,7 +149,7 @@ snprintf_buf_ts_m( const double m_)
 }
 
 void
-aghui::
+agh::ui::
 snprintf_buf_ts_s( const double s_)
 {
 	if ( s_ >= 60. )
@@ -168,7 +168,7 @@ snprintf_buf_ts_s( const double s_)
 // cairo
 
 void
-aghui::
+agh::ui::
 cairo_put_banner( cairo_t *cr, const float wd, const float ht,
 		  const char *text,
 		  const float font_size,
@@ -188,13 +188,13 @@ cairo_put_banner( cairo_t *cr, const float wd, const float ht,
 
 
 void
-aghui::
+agh::ui::
 cairo_draw_signal( cairo_t *cr, const valarray<TFloat>& V,
 		   const ssize_t start, const ssize_t end,
 		   const size_t hspan, const float hoff, const float voff, const float scale,
 		   const unsigned short decimate,
-		   const aghui::TDrawSignalDirection direction,
-		   const aghui::TDrawSignalPathOption continue_path_option)
+		   const agh::ui::TDrawSignalDirection direction,
+		   const agh::ui::TDrawSignalPathOption continue_path_option)
 {
 	bool continue_path = continue_path_option == TDrawSignalPathOption::yes;
 	switch ( direction ) {
@@ -232,7 +232,7 @@ cairo_draw_signal( cairo_t *cr, const valarray<TFloat>& V,
 
 
 void
-aghui::
+agh::ui::
 cairo_draw_envelope( cairo_t *cr, const valarray<TFloat>& V,
 		     ssize_t start, ssize_t end,
 		     const size_t hspan,
@@ -264,7 +264,7 @@ cairo_draw_envelope( cairo_t *cr, const valarray<TFloat>& V,
 
 
 void
-aghui::
+agh::ui::
 gtk_combo_box_set_model_properly( GtkComboBox *cb, GtkListStore *m)
 {
 	gtk_combo_box_set_model( cb, (GtkTreeModel*)m);
@@ -274,7 +274,7 @@ gtk_combo_box_set_model_properly( GtkComboBox *cb, GtkListStore *m)
 
 
 void
-aghui::
+agh::ui::
 gtk_cell_layout_set_renderer( GtkComboBox *cb)
 {
 	GtkCellRenderer *r = gtk_cell_renderer_text_new();
@@ -285,7 +285,7 @@ gtk_cell_layout_set_renderer( GtkComboBox *cb)
 }
 
 void
-aghui::
+agh::ui::
 pop_ok_message( GtkWindow *parent,
 		const char* primary_text,
 		const char* fmt, ...)
@@ -316,7 +316,7 @@ pop_ok_message( GtkWindow *parent,
 
 
 gint
-aghui::
+agh::ui::
 pop_question( GtkWindow* parent,
 	      const char* primary_text,
 	      const char* fmt, ...)
@@ -350,7 +350,7 @@ pop_question( GtkWindow* parent,
 
 
 void
-aghui::
+agh::ui::
 set_cursor_busy( bool busy, GtkWidget *wid)
 {
 	static GdkCursor *cursor_busy   = NULL,
@@ -364,7 +364,8 @@ set_cursor_busy( bool busy, GtkWidget *wid)
 }
 
 
-namespace aghui {
+namespace agh {
+namespace ui {
 
 template <> void
 SUIVar_<GtkListStore, list<string>>::up() const
@@ -395,7 +396,8 @@ SUIVar_<GtkListStore, list<string>>::down() const
 }
 
 
-} // namespace aghui
+}
+} // namespace agh::ui
 
 
 // Local Variables:
diff --git a/src/aghermann/ui/mf/mf-construct.cc b/src/aghermann/ui/mf/mf-construct.cc
index 2d89222..ef2be65 100644
--- a/src/aghermann/ui/mf/mf-construct.cc
+++ b/src/aghermann/ui/mf/mf-construct.cc
@@ -14,7 +14,7 @@
 
 
 int
-aghui::SModelrunFacility::
+agh::ui::SModelrunFacility::
 construct_widgets()
 {
 	if ( !(AGH_GBGETOBJ3 (builder, GtkWindow,	wModelrunFacility)) ||
diff --git a/src/aghermann/ui/mf/mf.cc b/src/aghermann/ui/mf/mf.cc
index e3c930b..8c4f50e 100644
--- a/src/aghermann/ui/mf/mf.cc
+++ b/src/aghermann/ui/mf/mf.cc
@@ -21,7 +21,7 @@
 
 
 using namespace std;
-using namespace aghui;
+using namespace agh::ui;
 
 namespace {
 unsigned short __score_hypn_depth[8] = {
@@ -30,7 +30,7 @@ unsigned short __score_hypn_depth[8] = {
 }
 
 
-aghui::SModelrunFacility::
+agh::ui::SModelrunFacility::
 SModelrunFacility (agh::ach::CModelRun& csim, SExpDesignUI& parent)
       : csimulation (csim),
 // subject is known only by name, so look up his full object now
@@ -111,7 +111,7 @@ SModelrunFacility (agh::ach::CModelRun& csim, SExpDesignUI& parent)
 }
 
 
-aghui::SModelrunFacility::
+agh::ui::SModelrunFacility::
 ~SModelrunFacility()
 {
 	gtk_widget_destroy( (GtkWidget*)wModelrunFacility);
@@ -120,7 +120,7 @@ aghui::SModelrunFacility::
 
 
 void
-aghui::SModelrunFacility::
+agh::ui::SModelrunFacility::
 siman_param_printer( void *xp)
 {
 //	memcpy( __t_set.tunables, xp, __t_set.n_tunables * sizeof(double));
@@ -137,7 +137,7 @@ siman_param_printer( void *xp)
 
 
 void
-aghui::SModelrunFacility::
+agh::ui::SModelrunFacility::
 draw_timeline( cairo_t *cr)
 {
       // empirical SWA
@@ -213,14 +213,14 @@ draw_timeline( cairo_t *cr)
 
 
 
-size_t aghui::SModelrunFacility::swa_smoothover = 2;
+size_t agh::ui::SModelrunFacility::swa_smoothover = 2;
 
 
 
 
 
 void
-aghui::SModelrunFacility::
+agh::ui::SModelrunFacility::
 draw_episode( cairo_t *cr,
 	      const size_t ep,
 	      const size_t ep_start, const size_t ep_end,
@@ -342,7 +342,7 @@ draw_episode( cairo_t *cr,
 
 
 void
-aghui::SModelrunFacility::
+agh::ui::SModelrunFacility::
 draw_ticks( cairo_t *cr,
 	    size_t start, const size_t end)
 {
@@ -385,7 +385,7 @@ draw_ticks( cairo_t *cr,
 
 
 void
-aghui::SModelrunFacility::
+agh::ui::SModelrunFacility::
 update_infobar()
 {
 	_suppress_Vx_value_changed = true;
diff --git a/src/aghermann/ui/mf/mf.hh b/src/aghermann/ui/mf/mf.hh
index 8bfcb41..33454cd 100644
--- a/src/aghermann/ui/mf/mf.hh
+++ b/src/aghermann/ui/mf/mf.hh
@@ -21,7 +21,8 @@
 
 using namespace std;
 
-namespace aghui {
+namespace agh {
+namespace ui {
 
 struct SModelrunFacility {
 
@@ -119,7 +120,8 @@ struct SModelrunFacility {
 };
 
 
-} // namespace aghui
+}
+} // namespace agh::ui
 
 #endif // _AGH_UI_MODELRUN_FACILITY_H
 
diff --git a/src/aghermann/ui/mf/mf_cb.cc b/src/aghermann/ui/mf/mf_cb.cc
index 655dd08..b26ea0f 100644
--- a/src/aghermann/ui/mf/mf_cb.cc
+++ b/src/aghermann/ui/mf/mf_cb.cc
@@ -16,7 +16,7 @@
 #include "mf.hh"
 
 using namespace std;
-using namespace aghui;
+using namespace agh::ui;
 
 extern "C" {
 
@@ -152,7 +152,7 @@ daMFProfile_scroll_event_cb(
 
 
 namespace {
-aghui::SModelrunFacility *this_mf = nullptr;
+agh::ui::SModelrunFacility *this_mf = nullptr;
 void this_mf_siman_param_printer(void *xp)
 {
 	this_mf -> siman_param_printer(xp);
@@ -166,7 +166,7 @@ bMFRun_clicked_cb(
 {
 	auto& MF = *(SModelrunFacility*)userdata;
 
-	aghui::SBusyBlock bb (MF.wModelrunFacility);
+	agh::ui::SBusyBlock bb (MF.wModelrunFacility);
 
 	void (*fun)(void*) = (this_mf == nullptr)
 		? (this_mf = &MF, this_mf_siman_param_printer)
diff --git a/src/aghermann/ui/misc.hh b/src/aghermann/ui/misc.hh
index 2897930..cc2b543 100644
--- a/src/aghermann/ui/misc.hh
+++ b/src/aghermann/ui/misc.hh
@@ -21,7 +21,8 @@
 
 using namespace std;
 
-namespace aghui {
+namespace agh {
+namespace ui {
 
 #define snprintf_buf(...) (snprintf( __buf__, AGH_BUF_SIZE-1, __VA_ARGS__), __buf__)
 
@@ -30,7 +31,8 @@ void snprintf_buf_ts_h( double h);
 void snprintf_buf_ts_m( double m);
 void snprintf_buf_ts_s( double s);
 
-} // namespace aghui
+}
+} // namespace agh::ui
 
 #endif
 
diff --git a/src/aghermann/ui/mw/admit-one.cc b/src/aghermann/ui/mw/admit-one.cc
index e2f29b9..14a1923 100644
--- a/src/aghermann/ui/mw/admit-one.cc
+++ b/src/aghermann/ui/mw/admit-one.cc
@@ -15,11 +15,11 @@
 #include "mw.hh"
 
 using namespace std;
-using namespace aghui;
+using namespace agh::ui;
 
 
 int
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 dnd_maybe_admit_one( const char* fname)
 {
 	try {
diff --git a/src/aghermann/ui/mw/construct.cc b/src/aghermann/ui/mw/construct.cc
index 4331526..7ff93b0 100644
--- a/src/aghermann/ui/mw/construct.cc
+++ b/src/aghermann/ui/mw/construct.cc
@@ -16,11 +16,11 @@
 #include "mw_cb.hh"
 
 using namespace std;
-using namespace aghui;
+using namespace agh::ui;
 
 
 
-aghui::SExpDesignUIWidgets::
+agh::ui::SExpDesignUIWidgets::
 SExpDesignUIWidgets ()
 {
       // load glade
@@ -685,7 +685,7 @@ SExpDesignUIWidgets ()
 }
 
 
-aghui::SExpDesignUIWidgets::
+agh::ui::SExpDesignUIWidgets::
 ~SExpDesignUIWidgets ()
 {
 	g_object_unref( (GObject*)builder);
@@ -724,7 +724,7 @@ aghui::SExpDesignUIWidgets::
 
 
 void
-aghui::SExpDesignUIWidgets::
+agh::ui::SExpDesignUIWidgets::
 set_wMainWindow_interactive( const bool indeed, const bool flush)
 {
 	set_cursor_busy( not indeed, (GtkWidget*)wMainWindow);
@@ -749,7 +749,7 @@ set_wMainWindow_interactive( const bool indeed, const bool flush)
 }
 
 void
-aghui::SExpDesignUIWidgets::
+agh::ui::SExpDesignUIWidgets::
 set_controls_for_empty_experiment( bool indeed, const bool flush)
 {
 	indeed = not indeed;
diff --git a/src/aghermann/ui/mw/loadsave.cc b/src/aghermann/ui/mw/loadsave.cc
index 4cea919..f70e45b 100644
--- a/src/aghermann/ui/mw/loadsave.cc
+++ b/src/aghermann/ui/mw/loadsave.cc
@@ -16,17 +16,17 @@
 #include "mw.hh"
 
 using namespace std;
-using namespace aghui;
+using namespace agh::ui;
 
 #define CONF_FILE ".aghermann.conf"
 
 
 namespace {
 
-forward_list<pair<const char*, aghui::SExpDesignUI::TColour>>
+forward_list<pair<const char*, agh::ui::SExpDesignUI::TColour>>
 saving_colors()
 {
-	using namespace aghui;
+	using namespace agh::ui;
 	return move(
 		forward_list<pair<const char*, SExpDesignUI::TColour>>
 		({
@@ -79,7 +79,7 @@ saving_colors()
 } // namespace
 
 int
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 load_settings()
 {
 	libconfig::Config conf;
@@ -152,7 +152,7 @@ load_settings()
 
 
 int
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 save_settings()
 {
 	libconfig::Config conf;
diff --git a/src/aghermann/ui/mw/mainmenu_cb.cc b/src/aghermann/ui/mw/mainmenu_cb.cc
index e7e1ba8..f9ae78a 100644
--- a/src/aghermann/ui/mw/mainmenu_cb.cc
+++ b/src/aghermann/ui/mw/mainmenu_cb.cc
@@ -16,7 +16,7 @@
 #include "mw_cb.hh"
 
 using namespace std;
-using namespace aghui;
+using namespace agh::ui;
 
 extern "C" {
 
diff --git a/src/aghermann/ui/mw/measurements.cc b/src/aghermann/ui/mw/measurements.cc
index d45d8fc..3735d3f 100644
--- a/src/aghermann/ui/mw/measurements.cc
+++ b/src/aghermann/ui/mw/measurements.cc
@@ -23,7 +23,7 @@
 using namespace std;
 
 bool
-aghui::SExpDesignUI::SSubjectPresentation::
+agh::ui::SExpDesignUI::SSubjectPresentation::
 get_episode_from_timeline_click( unsigned along)
 {
 	try {
@@ -42,7 +42,7 @@ get_episode_from_timeline_click( unsigned along)
 }
 
 void
-aghui::SExpDesignUI::SSubjectPresentation::
+agh::ui::SExpDesignUI::SSubjectPresentation::
 draw_timeline( const string& fname) const
 {
 	cairo_surface_t *cs =
@@ -58,13 +58,13 @@ draw_timeline( const string& fname) const
 
 
 void
-aghui::SExpDesignUI::SSubjectPresentation::
+agh::ui::SExpDesignUI::SSubjectPresentation::
 draw_timeline( cairo_t *cr) const
 {
 	bool have_episodes = cprofile && not cprofile->mm_list().empty();
 
 	if ( not have_episodes )
-		aghui::cairo_put_banner(
+		agh::ui::cairo_put_banner(
 			cr, 400, tl_height(), "(no episodes)", 24);
 
 	if ( have_episodes ) {
@@ -300,7 +300,7 @@ draw_timeline( cairo_t *cr) const
 
 
 void
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 modify_active_profile_scale( const GdkScrollDirection d)
 {
 	auto fac = (d == GDK_SCROLL_DOWN) ? 1/scroll_factor : scroll_factor;
@@ -313,7 +313,7 @@ modify_active_profile_scale( const GdkScrollDirection d)
 }
 
 void
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 modify_profile_scales( const GdkScrollDirection d)
 {
 	auto fac = (d == GDK_SCROLL_DOWN) ? 1/scroll_factor : scroll_factor;
diff --git a/src/aghermann/ui/mw/measurements_cb.cc b/src/aghermann/ui/mw/measurements_cb.cc
index e55782f..708a8f1 100644
--- a/src/aghermann/ui/mw/measurements_cb.cc
+++ b/src/aghermann/ui/mw/measurements_cb.cc
@@ -15,7 +15,7 @@
 #include "mw.hh"
 
 using namespace std;
-using namespace aghui;
+using namespace agh::ui;
 
 extern "C" {
 
diff --git a/src/aghermann/ui/mw/mw.cc b/src/aghermann/ui/mw/mw.cc
index bf1bbec..1019373 100644
--- a/src/aghermann/ui/mw/mw.cc
+++ b/src/aghermann/ui/mw/mw.cc
@@ -27,12 +27,12 @@
 #include "mw_cb.hh"
 
 using namespace std;
-using namespace aghui;
+using namespace agh::ui;
 
 
 
 
-aghui::SExpDesignUI::SSubjectPresentation::
+agh::ui::SExpDesignUI::SSubjectPresentation::
 SSubjectPresentation (agh::CSubject& _j,
 		      SGroupPresentation& parent)
       : csubject (_j),
@@ -47,7 +47,7 @@ SSubjectPresentation (agh::CSubject& _j,
 
 
 agh::SProfileParamSet
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 make_active_profile_paramset() const
 {
 	switch ( display_profile_type ) {
@@ -70,7 +70,7 @@ make_active_profile_paramset() const
 
 
 void
-aghui::SExpDesignUI::SSubjectPresentation::
+agh::ui::SExpDesignUI::SSubjectPresentation::
 create_cprofile()
 {
 	if ( cprofile )
@@ -89,7 +89,7 @@ create_cprofile()
 	}
 }
 
-aghui::SExpDesignUI::SSubjectPresentation::
+agh::ui::SExpDesignUI::SSubjectPresentation::
 ~SSubjectPresentation ()
 {
 	if ( cprofile )
@@ -100,7 +100,7 @@ aghui::SExpDesignUI::SSubjectPresentation::
 
 
 
-aghui::SExpDesignUI::SSubjectPresentation*
+agh::ui::SExpDesignUI::SSubjectPresentation*
 __attribute__ ((pure))
 SExpDesignUI::
 subject_presentation_by_csubject( const agh::CSubject& j)
@@ -115,16 +115,16 @@ subject_presentation_by_csubject( const agh::CSubject& j)
 
 
 const array<unsigned, 4>
-	aghui::SExpDesignUI::FFTPageSizeValues = {{4, 20, 30, 60}};
+	agh::ui::SExpDesignUI::FFTPageSizeValues = {{4, 20, 30, 60}};
 const array<double, 3>
-	aghui::SExpDesignUI::FFTBinSizeValues = {{.1, .25, .5}};
+	agh::ui::SExpDesignUI::FFTBinSizeValues = {{.1, .25, .5}};
 
-double aghui::SExpDesignUI::scroll_factor = 1.05;
+double agh::ui::SExpDesignUI::scroll_factor = 1.05;
 
 using agh::confval::SValidator;
 
-aghui::SExpDesignUI::
-SExpDesignUI (aghui::SSessionChooser *parent,
+agh::ui::SExpDesignUI::
+SExpDesignUI (agh::ui::SSessionChooser *parent,
 	      const string& dir)
       : // let ED and cgroups be initialized after the UI gets constructed
 	// so we could entertain the user with progress_indicator
@@ -219,7 +219,7 @@ SExpDesignUI (aghui::SSessionChooser *parent,
 	ED = new agh::CExpDesign (sure_dir,
 				  bind( &SExpDesignUI::sb_main_progress_indicator, this,
 					placeholders::_1, placeholders::_2, placeholders::_3,
-					aghui::TGtkRefreshMode::gtk));
+					agh::ui::TGtkRefreshMode::gtk));
 	load_artifact_detection_profiles();
 	if ( global_artifact_detection_profiles.empty() )
 		global_artifact_detection_profiles["default"] = metrics::mc::SArtifactDetectionPP ();
@@ -316,7 +316,7 @@ SExpDesignUI (aghui::SSessionChooser *parent,
 }
 
 void
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 load_artifact_detection_profiles()
 {
 	FILE *domien = fopen( (ED->session_dir() + "/.AD_profiles").c_str(), "r");
@@ -356,7 +356,7 @@ load_artifact_detection_profiles()
 }
 
 void
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 save_artifact_detection_profiles() const
 {
 	// libconfig::Config conf;
@@ -390,7 +390,7 @@ save_artifact_detection_profiles() const
 
 size_t
 __attribute__ ((pure))
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 figure_pagesize_item()
 {
 	size_t i = 0;
@@ -400,7 +400,7 @@ figure_pagesize_item()
 }
 size_t
 __attribute__ ((pure))
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 figure_binsize_item()
 {
 	size_t i = 0;
@@ -411,7 +411,7 @@ figure_binsize_item()
 
 
 
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 ~SExpDesignUI ()
 {
 	if ( dl_pid > 0 )
@@ -433,17 +433,17 @@ aghui::SExpDesignUI::
 
 
 void
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 do_rescan_tree( const bool with_update)
 {
-	aghui::SBusyBlock bb (wMainWindow);
+	agh::ui::SBusyBlock bb (wMainWindow);
 
 	depopulate( false);
 	ED -> sync();
 	if ( with_update )
 		ED -> scan_tree( bind (&SExpDesignUI::sb_main_progress_indicator, this,
 				       placeholders::_1, placeholders::_2, placeholders::_3,
-				       aghui::TGtkRefreshMode::gdk));
+				       agh::ui::TGtkRefreshMode::gdk));
 	else
 		ED -> scan_tree();
 	populate( false);
@@ -451,10 +451,10 @@ do_rescan_tree( const bool with_update)
 
 
 void
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 do_purge_computed()
 {
-	aghui::SBusyBlock bb (wMainWindow);
+	agh::ui::SBusyBlock bb (wMainWindow);
 
 	if ( ED->purge_cached_profiles() ) {
 		fprintf( stderr, "Command '%s' returned a non-zero status. This is suspicious.\n", __buf__);
@@ -466,7 +466,7 @@ do_purge_computed()
 
 
 void
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 do_detect_ultradian_cycle( agh::CRecording& M)
 {
 	gsl_siman_params_t siman_params;
@@ -492,7 +492,7 @@ do_detect_ultradian_cycle( agh::CRecording& M)
 
 
 void
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 adjust_op_freq_spinbuttons()
 {
 	suppress_redraw = true;
@@ -516,7 +516,7 @@ adjust_op_freq_spinbuttons()
 
 
 double
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 calculate_profile_scale()
 {
 	double	avg_profile_height = 0.;
@@ -555,7 +555,7 @@ calculate_profile_scale()
 
 
 void
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 show_changelog()
 {
 	gtk_widget_show_all( (GtkWidget*)wAbout);
@@ -567,7 +567,7 @@ show_changelog()
 
 
 void
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 sb_message( const string& msg) const
 {
 	gtk_statusbar_pop( sbMainStatusBar, sbMainContextIdGeneral);
@@ -575,7 +575,7 @@ sb_message( const string& msg) const
 }
 
 void
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 sb_clear() const
 {
 	gtk_statusbar_pop( sbMainStatusBar, sbMainContextIdGeneral);
@@ -584,16 +584,16 @@ sb_clear() const
 
 
 void
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 sb_main_progress_indicator( const string& current,
 			    const size_t n, const size_t i,
-			    const aghui::TGtkRefreshMode mode)
+			    const agh::ui::TGtkRefreshMode mode)
 {
 	sb_message( agh::str::sasprintf( "(%zu of %zu) %s", i, n, current.c_str()));
 
 	switch ( mode ) {
 	case TGtkRefreshMode::gtk:
-		aghui::gtk_flush();  // this brings down the whole of GTK if called from a callback
+		agh::ui::gtk_flush();  // this brings down the whole of GTK if called from a callback
 		break;
 	case TGtkRefreshMode::gdk:
 		gdk_window_process_all_updates(); // this, however, fails to do the update if called *not* from a callback
diff --git a/src/aghermann/ui/mw/mw.hh b/src/aghermann/ui/mw/mw.hh
index 0c8187d..f3c6f7d 100644
--- a/src/aghermann/ui/mw/mw.hh
+++ b/src/aghermann/ui/mw/mw.hh
@@ -37,7 +37,8 @@
 
 using namespace std;
 
-namespace aghui {
+namespace agh {
+namespace ui {
 
 class SExpDesignUI
   : public SExpDesignUIWidgets {
@@ -46,10 +47,10 @@ class SExpDesignUI
     public:
 	agh::CExpDesign
 		*ED;
-	aghui::SSessionChooser
+	agh::ui::SSessionChooser
 		*_p;
       // ctor, dtor
-	SExpDesignUI (aghui::SSessionChooser *parent, const string& dir);
+	SExpDesignUI (agh::ui::SSessionChooser *parent, const string& dir);
        ~SExpDesignUI ();
 
       // forward decl
@@ -205,9 +206,9 @@ class SExpDesignUI
 	void save_artifact_detection_profiles() const;
 
       // currently open SF instances
-	list<aghui::SScoringFacility*>
+	list<agh::ui::SScoringFacility*>
 		open_scoring_facilities;
-	aghui::SScoringFacility
+	agh::ui::SScoringFacility
 		*close_this_SF_now;
 
       // displayed profile selector
@@ -323,7 +324,7 @@ class SExpDesignUI
 	void sb_message( const string&) const;
 	void sb_clear() const;
 	void sb_main_progress_indicator( const string&, size_t n, size_t i,
-					 aghui::TGtkRefreshMode);
+					 agh::ui::TGtkRefreshMode);
 
       // dnd
 	struct SDndIface {
@@ -385,7 +386,8 @@ SExpDesignUI::AghDi() const
 }
 
 
-} // namespace aghui
+}
+} // namespace agh::ui
 
 #endif
 
diff --git a/src/aghermann/ui/mw/mw_cb.cc b/src/aghermann/ui/mw/mw_cb.cc
index 2c7e119..6fa1006 100644
--- a/src/aghermann/ui/mw/mw_cb.cc
+++ b/src/aghermann/ui/mw/mw_cb.cc
@@ -17,7 +17,7 @@
 #include "mw_cb.hh"
 
 using namespace std;
-using namespace aghui;
+using namespace agh::ui;
 
 extern "C" {
 
diff --git a/src/aghermann/ui/mw/populate.cc b/src/aghermann/ui/mw/populate.cc
index 78fbc02..60fb56f 100644
--- a/src/aghermann/ui/mw/populate.cc
+++ b/src/aghermann/ui/mw/populate.cc
@@ -19,11 +19,11 @@
 #include "mw_cb.hh"
 
 using namespace std;
-using namespace aghui;
+using namespace agh::ui;
 
 
 int
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 populate( bool do_load)
 {
 	printf( "\nSExpDesignUI::populate():\n");
@@ -84,7 +84,7 @@ populate( bool do_load)
 		snprintf_buf( "Smooth: %zu", smooth_profile));
 
 	if ( AghTT.empty() )
-		aghui::pop_ok_message(
+		agh::ui::pop_ok_message(
 			wMainWindow,
 			"No EEG channels",
 			"There are no EEG channels found in any recordings in the tree.");
@@ -174,7 +174,7 @@ populate( bool do_load)
 
 
 void
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 depopulate( bool do_save)
 {
 	if ( do_save )
@@ -209,7 +209,7 @@ depopulate( bool do_save)
 
 
 void
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 populate_mSessions()
 {
 	g_signal_handler_block( eMsmtSession, eMsmtSession_changed_cb_handler_id);
@@ -231,7 +231,7 @@ populate_mSessions()
 
 
 void
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 populate_mChannels()
 {
 	g_signal_handler_block( eMsmtChannel, eMsmtChannel_changed_cb_handler_id);
@@ -264,7 +264,7 @@ populate_mChannels()
 
 
 void
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 __reconnect_channels_combo()
 {
 	gtk_combo_box_set_model( eMsmtChannel, (GtkTreeModel*)mEEGChannels);
@@ -280,7 +280,7 @@ __reconnect_channels_combo()
 
 
 void
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 __reconnect_sessions_combo()
 {
 	gtk_combo_box_set_model( eMsmtSession, (GtkTreeModel*)mSessions);
@@ -305,7 +305,7 @@ annotation_type_s( const sigfile::SAnnotation::TType t)
 }
 
 void
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 populate_mGlobalAnnotations()
 {
 	gtk_tree_store_clear( mGlobalAnnotations);
@@ -387,7 +387,7 @@ populate_mGlobalAnnotations()
 
 
 void
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 populate_mGlobalADProfiles()
 {
 	gtk_list_store_clear( mGlobalADProfiles);
@@ -404,7 +404,7 @@ populate_mGlobalADProfiles()
 
 
 void
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 populate_1()
 {
 	if ( ED->groups.empty() )
@@ -600,7 +600,7 @@ populate_1()
 
 
 void
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 sort_subjects()
 {
 	for ( auto Gi = groups.begin(); Gi != groups.end(); ++Gi )
@@ -609,7 +609,7 @@ sort_subjects()
 
 
 bool
-aghui::SExpDesignUI::SSubjectPresentation::
+agh::ui::SExpDesignUI::SSubjectPresentation::
 operator<( const SSubjectPresentation& rv) const
 {
 	if ( _p._p.sort_segregate and csubject.gender != rv.csubject.gender )
diff --git a/src/aghermann/ui/mw/settings_cb.cc b/src/aghermann/ui/mw/settings_cb.cc
index 375d869..f2c216a 100644
--- a/src/aghermann/ui/mw/settings_cb.cc
+++ b/src/aghermann/ui/mw/settings_cb.cc
@@ -20,7 +20,7 @@
 #include "mw.hh"
 
 using namespace std;
-using namespace aghui;
+using namespace agh::ui;
 
 
 
diff --git a/src/aghermann/ui/mw/simulations.cc b/src/aghermann/ui/mw/simulations.cc
index cabe30b..f5faff3 100644
--- a/src/aghermann/ui/mw/simulations.cc
+++ b/src/aghermann/ui/mw/simulations.cc
@@ -16,7 +16,7 @@ using namespace std;
 
 
 void
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 populate_2()
 {
 	gtk_tree_store_clear( mSimulations);
@@ -121,7 +121,7 @@ populate_2()
 
 
 void
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 cleanup_2()
 {
 	ED->remove_untried_modruns();
diff --git a/src/aghermann/ui/mw/simulations_cb.cc b/src/aghermann/ui/mw/simulations_cb.cc
index 0c27a28..7c1ddc3 100644
--- a/src/aghermann/ui/mw/simulations_cb.cc
+++ b/src/aghermann/ui/mw/simulations_cb.cc
@@ -15,7 +15,7 @@
 #include "mw.hh"
 
 using namespace std;
-using namespace aghui;
+using namespace agh::ui;
 
 extern "C" {
 
diff --git a/src/aghermann/ui/mw/splash.cc b/src/aghermann/ui/mw/splash.cc
index 27b42d5..fbf4950 100644
--- a/src/aghermann/ui/mw/splash.cc
+++ b/src/aghermann/ui/mw/splash.cc
@@ -30,7 +30,7 @@ bDownload_clicked_cb(
 	GtkButton*,
 	const gpointer userdata)
 {
-	auto& ED = *(aghui::SExpDesignUI*)userdata;
+	auto& ED = *(agh::ui::SExpDesignUI*)userdata;
 	ED.try_download();
 }
 
@@ -39,18 +39,18 @@ download_process_child_exited_cb(
 	VteTerminal *terminal,
 	const gpointer userdata)
 {
-	auto& ED = *(aghui::SExpDesignUI*)userdata;
+	auto& ED = *(agh::ui::SExpDesignUI*)userdata;
 	ED.set_wMainWindow_interactive( true, true);
 	int exit_status = vte_terminal_get_child_exit_status( terminal);
 	if ( exit_status != 0 )
-		aghui::pop_ok_message(
+		agh::ui::pop_ok_message(
 			ED.wMainWindow,
 			"Download failed",
 			"Exit status %d. Try again next time.", exit_status);
 	ED.dl_pid = -1;
-	ED.ED->scan_tree( bind (&aghui::SExpDesignUI::sb_main_progress_indicator, &ED,
+	ED.ED->scan_tree( bind (&agh::ui::SExpDesignUI::sb_main_progress_indicator, &ED,
 				placeholders::_1, placeholders::_2, placeholders::_3,
-				aghui::TGtkRefreshMode::gdk));
+				agh::ui::TGtkRefreshMode::gdk));
 	ED.populate( false);
 }
 
@@ -61,7 +61,7 @@ download_process_child_exited_cb(
 
 
 void
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 show_empty_experiment_blurb()
 {
 	gtk_container_foreach( (GtkContainer*)cMeasurements,
@@ -111,7 +111,7 @@ show_empty_experiment_blurb()
 
 
 int
-aghui::SExpDesignUI::
+agh::ui::SExpDesignUI::
 try_download()
 {
 	gtk_container_foreach( (GtkContainer*)cMeasurements,
@@ -148,7 +148,7 @@ try_download()
 		&dl_pid,
 		&Error); // GError **error);
 	if ( Error ) {
-		aghui::pop_ok_message(
+		agh::ui::pop_ok_message(
 			wMainWindow,
 			"Error",
 			"%s\n", Error->message);
diff --git a/src/aghermann/ui/mw/widgets.hh b/src/aghermann/ui/mw/widgets.hh
index 4eb3449..b98e0e8 100644
--- a/src/aghermann/ui/mw/widgets.hh
+++ b/src/aghermann/ui/mw/widgets.hh
@@ -26,7 +26,8 @@
 
 using namespace std;
 
-namespace aghui {
+namespace agh {
+namespace ui {
 
 // ui structures everything is public, mainly to give access to the
 // bulk of extern "C" GTK callbacks
@@ -387,7 +388,8 @@ struct SExpDesignUIWidgets {
 		}
 };
 
-} // namespace aghui
+}
+} // namespace agh::ui
 
 #endif // _AGHUI_EXPDESIGN_WIDGETS_H
 
diff --git a/src/aghermann/ui/sf/channel.cc b/src/aghermann/ui/sf/channel.cc
index 44cc8bb..267bfcd 100644
--- a/src/aghermann/ui/sf/channel.cc
+++ b/src/aghermann/ui/sf/channel.cc
@@ -25,12 +25,12 @@
 using namespace std;
 
 pattern::SPatternPPack<TFloat>
-	aghui::SScoringFacility::SChannel::pattern_params =
+	agh::ui::SScoringFacility::SChannel::pattern_params =
 		{.25,  0., 1.5, 1,  .1, .5, 3};
 
 using agh::confval::SValidator;
 
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 SChannel (agh::CRecording& r,
 	  SScoringFacility& parent,
 	  size_t y0,
@@ -161,7 +161,7 @@ SChannel (agh::CRecording& r,
 
 
 void
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 get_signal_original()
 {
 	signal_original =
@@ -175,7 +175,7 @@ get_signal_original()
 }
 
 void
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 get_signal_filtered()
 {
 	signal_filtered =
@@ -190,7 +190,7 @@ get_signal_filtered()
 
 
 list<sigfile::SAnnotation*>
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 in_annotations( const double time) const
 {
 	// select this channel's annotations
@@ -206,7 +206,7 @@ in_annotations( const double time) const
 
 
 void
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 get_psd_course()
 {
 	//psd_profile.compute();
@@ -222,7 +222,7 @@ get_psd_course()
 }
 
 void
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 get_psd_in_bands()
 {
 	crecording.psd_profile.compute();
@@ -251,7 +251,7 @@ get_psd_in_bands()
 
 
 void
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 get_swu_course()
 {
 	//swu_profile.compute();
@@ -268,7 +268,7 @@ get_swu_course()
 
 
 void
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 get_mc_course()
 {
 	//mc_profile.compute();
@@ -286,7 +286,7 @@ get_mc_course()
 
 
 void
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 get_raw_profile()
 {
 	raw_profile = sigproc::raw_signal_profile<TFloat>(
@@ -296,7 +296,7 @@ get_raw_profile()
 
 
 tuple<metrics::TType, valarray<TFloat>&>
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 which_profile( const metrics::TType metric)
 {
 	switch ( schannel().type() ) {
@@ -322,13 +322,13 @@ which_profile( const metrics::TType metric)
 
 
 void
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 get_spectrum( const size_t p)
 {
 	spectrum = crecording.psd_profile.spectrum( p);
 }
 void
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 get_spectrum()
 {
 	spectrum = crecording.psd_profile.spectrum( _p.cur_page());
@@ -340,7 +340,7 @@ get_spectrum()
 
 
 void
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 update_profile_display_scales()
 {
 	psd.display_scale =
@@ -365,7 +365,7 @@ update_profile_display_scales()
 
 
 float
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 calculate_dirty_percent()
 {
 	size_t total = 0; // in samples
@@ -378,7 +378,7 @@ calculate_dirty_percent()
 
 
 void
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 detect_artifacts( const metrics::mc::SArtifactDetectionPP& P)
 {
 	auto marked =
@@ -405,7 +405,7 @@ detect_artifacts( const metrics::mc::SArtifactDetectionPP& P)
 
 
 pair<double, double>
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 mark_flat_regions_as_artifacts( const double minsize, const double pad)
 {
 	double	total_before = artifacts.total();
@@ -451,7 +451,7 @@ mark_flat_regions_as_artifacts( const double minsize, const double pad)
 
 
 void
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 mark_region_as_artifact( const bool do_mark)
 {
 	if ( do_mark )
@@ -480,7 +480,7 @@ mark_region_as_artifact( const bool do_mark)
 }
 
 void
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 mark_region_as_annotation( const string& label,
 			   const sigfile::SAnnotation::TType type)
 {
@@ -493,7 +493,7 @@ mark_region_as_annotation( const string& label,
 
 
 void
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 mark_region_as_pattern()
 {
 	if ( _p.patterns_d().import_from_selection( *this) == 0 )
@@ -503,7 +503,7 @@ mark_region_as_pattern()
 
 
 void
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 update_channel_menu_items( const double x)
 {
 	_p.suppress_redraw = true;
@@ -560,7 +560,7 @@ update_channel_menu_items( const double x)
 }
 
 void
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 update_power_menu_items()
 {
 	_p.suppress_redraw = true;
@@ -578,7 +578,7 @@ update_power_menu_items()
 
 
 void
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 selectively_enable_selection_menu_items()
 {
 	bool findable =
@@ -588,7 +588,7 @@ selectively_enable_selection_menu_items()
 
 
 void
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 put_selection( const size_t a, const size_t e)
 {
 	selection_start = a, selection_end = e;
@@ -598,7 +598,7 @@ put_selection( const size_t a, const size_t e)
 }
 
 void
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 put_selection( const double a, const double e)
 {
 	selection_start_time = a, selection_end_time = e;
@@ -608,7 +608,7 @@ put_selection( const double a, const double e)
 }
 
 void
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 _put_selection()
 {
 	if ( selection_end_time - selection_start_time > 1. ) {
diff --git a/src/aghermann/ui/sf/construct.cc b/src/aghermann/ui/sf/construct.cc
index d04ff5b..024143d 100644
--- a/src/aghermann/ui/sf/construct.cc
+++ b/src/aghermann/ui/sf/construct.cc
@@ -19,7 +19,7 @@
 using namespace std;
 
 
-aghui::SScoringFacilityWidgets::
+agh::ui::SScoringFacilityWidgets::
 SScoringFacilityWidgets ()
 {
 	builder = gtk_builder_new();
@@ -354,7 +354,7 @@ SScoringFacilityWidgets ()
 
 
 
-aghui::SScoringFacilityWidgets::
+agh::ui::SScoringFacilityWidgets::
 ~SScoringFacilityWidgets ()
 {
 	// destroy toplevels
diff --git a/src/aghermann/ui/sf/controls_cb.cc b/src/aghermann/ui/sf/controls_cb.cc
index 0440aeb..43cdf8c 100644
--- a/src/aghermann/ui/sf/controls_cb.cc
+++ b/src/aghermann/ui/sf/controls_cb.cc
@@ -12,7 +12,7 @@
 #include "sf.hh"
 
 using namespace std;
-using namespace aghui;
+using namespace agh::ui;
 
 extern "C" {
 
diff --git a/src/aghermann/ui/sf/d/artifacts-construct.cc b/src/aghermann/ui/sf/d/artifacts-construct.cc
index 9316cff..808166e 100644
--- a/src/aghermann/ui/sf/d/artifacts-construct.cc
+++ b/src/aghermann/ui/sf/d/artifacts-construct.cc
@@ -18,7 +18,7 @@
 using namespace std;
 
 
-aghui::SArtifactsDialogWidgets::
+agh::ui::SArtifactsDialogWidgets::
 SArtifactsDialogWidgets ()
 {
 	builder = gtk_builder_new();
@@ -78,7 +78,7 @@ SArtifactsDialogWidgets ()
 }
 
 
-aghui::SArtifactsDialogWidgets::
+agh::ui::SArtifactsDialogWidgets::
 ~SArtifactsDialogWidgets ()
 {
 	gtk_widget_destroy( (GtkWidget*)wSFAD);
diff --git a/src/aghermann/ui/sf/d/artifacts-simple-construct.cc b/src/aghermann/ui/sf/d/artifacts-simple-construct.cc
index 0eb64e0..9543b85 100644
--- a/src/aghermann/ui/sf/d/artifacts-simple-construct.cc
+++ b/src/aghermann/ui/sf/d/artifacts-simple-construct.cc
@@ -18,7 +18,7 @@
 using namespace std;
 
 
-aghui::SArtifactsSimpleDialogWidgets::
+agh::ui::SArtifactsSimpleDialogWidgets::
 SArtifactsSimpleDialogWidgets ()
 {
 	builder = gtk_builder_new();
@@ -33,7 +33,7 @@ SArtifactsSimpleDialogWidgets ()
 }
 
 
-aghui::SArtifactsSimpleDialogWidgets::
+agh::ui::SArtifactsSimpleDialogWidgets::
 ~SArtifactsSimpleDialogWidgets ()
 {
 	gtk_widget_destroy( (GtkWidget*)wSFADS);
diff --git a/src/aghermann/ui/sf/d/artifacts-simple.cc b/src/aghermann/ui/sf/d/artifacts-simple.cc
index beac7e3..c30cb74 100644
--- a/src/aghermann/ui/sf/d/artifacts-simple.cc
+++ b/src/aghermann/ui/sf/d/artifacts-simple.cc
@@ -13,8 +13,8 @@
 
 using namespace std;
 
-aghui::SScoringFacility::SArtifactsSimpleDialog&
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::SArtifactsSimpleDialog&
+agh::ui::SScoringFacility::
 artifacts_simple_d()
 {
 	if ( not _artifacts_simple_d )
@@ -23,8 +23,8 @@ artifacts_simple_d()
 }
 
 
-aghui::SScoringFacility::SArtifactsSimpleDialog::
-SArtifactsSimpleDialog (aghui::SScoringFacility& p_)
+agh::ui::SScoringFacility::SArtifactsSimpleDialog::
+SArtifactsSimpleDialog (agh::ui::SScoringFacility& p_)
       : min_size (0.5),
 	pad (),
 	_p (p_)
diff --git a/src/aghermann/ui/sf/d/artifacts-simple.hh b/src/aghermann/ui/sf/d/artifacts-simple.hh
index 28da167..b6a3cb6 100644
--- a/src/aghermann/ui/sf/d/artifacts-simple.hh
+++ b/src/aghermann/ui/sf/d/artifacts-simple.hh
@@ -23,7 +23,8 @@
 
 using namespace std;
 
-namespace aghui {
+namespace agh {
+namespace ui {
 
 struct SArtifactsSimpleDialogWidgets {
 
@@ -56,7 +57,8 @@ struct SScoringFacility::SArtifactsSimpleDialog
 		_p;
 };
 
-} // namespace aghui
+}
+} // namespace agh::ui
 
 #endif // _AGH_UI_SF_FILTERS_H
 
diff --git a/src/aghermann/ui/sf/d/artifacts.cc b/src/aghermann/ui/sf/d/artifacts.cc
index db9677e..f42862f 100644
--- a/src/aghermann/ui/sf/d/artifacts.cc
+++ b/src/aghermann/ui/sf/d/artifacts.cc
@@ -13,8 +13,8 @@
 
 using namespace std;
 
-aghui::SScoringFacility::SArtifactsDialog&
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::SArtifactsDialog&
+agh::ui::SScoringFacility::
 artifacts_d()
 {
 	if ( not _artifacts_d )
@@ -23,8 +23,8 @@ artifacts_d()
 }
 
 
-aghui::SScoringFacility::SArtifactsDialog::
-SArtifactsDialog (aghui::SScoringFacility& p_)
+agh::ui::SScoringFacility::SArtifactsDialog::
+SArtifactsDialog (agh::ui::SScoringFacility& p_)
       : using_channel (nullptr),
 	_p (p_)
 {
@@ -52,7 +52,7 @@ SArtifactsDialog (aghui::SScoringFacility& p_)
 
 // maybe it's not needed in GTK+ 3?
 void
-aghui::SScoringFacility::SArtifactsDialog::
+agh::ui::SScoringFacility::SArtifactsDialog::
 populate_mSFADProfiles()
 {
 	g_signal_handler_block( eSFADProfiles, eSFADProfiles_changed_cb_handler_id);
diff --git a/src/aghermann/ui/sf/d/artifacts.hh b/src/aghermann/ui/sf/d/artifacts.hh
index 4591160..b4f8145 100644
--- a/src/aghermann/ui/sf/d/artifacts.hh
+++ b/src/aghermann/ui/sf/d/artifacts.hh
@@ -27,7 +27,8 @@
 
 using namespace std;
 
-namespace aghui {
+namespace agh {
+namespace ui {
 
 struct SArtifactsDialogWidgets {
 
@@ -110,7 +111,8 @@ struct SScoringFacility::SArtifactsDialog
 };
 
 
-} // namespace aghui
+}
+} // namespace agh::ui
 
 
 extern "C" {
diff --git a/src/aghermann/ui/sf/d/artifacts_cb.cc b/src/aghermann/ui/sf/d/artifacts_cb.cc
index 5b0c6b4..4fb02e6 100644
--- a/src/aghermann/ui/sf/d/artifacts_cb.cc
+++ b/src/aghermann/ui/sf/d/artifacts_cb.cc
@@ -14,7 +14,7 @@
 #include "artifacts.hh"
 
 using namespace std;
-using namespace aghui;
+using namespace agh::ui;
 
 
 
diff --git a/src/aghermann/ui/sf/d/filters-construct.cc b/src/aghermann/ui/sf/d/filters-construct.cc
index 57ae895..c45d028 100644
--- a/src/aghermann/ui/sf/d/filters-construct.cc
+++ b/src/aghermann/ui/sf/d/filters-construct.cc
@@ -17,7 +17,7 @@
 
 using namespace std;
 
-aghui::SFiltersDialogWidgets::
+agh::ui::SFiltersDialogWidgets::
 SFiltersDialogWidgets ()
 {
 	builder = gtk_builder_new();
@@ -43,7 +43,7 @@ SFiltersDialogWidgets ()
 	G_CONNECT_2 (eSFFilterLowPassCutoff, value, changed);
 }
 
-aghui::SFiltersDialogWidgets::
+agh::ui::SFiltersDialogWidgets::
 ~SFiltersDialogWidgets ()
 {
 	// destroy toplevels
diff --git a/src/aghermann/ui/sf/d/filters.cc b/src/aghermann/ui/sf/d/filters.cc
index d908085..0304349 100644
--- a/src/aghermann/ui/sf/d/filters.cc
+++ b/src/aghermann/ui/sf/d/filters.cc
@@ -15,8 +15,8 @@
 using namespace std;
 
 
-aghui::SScoringFacility::SFiltersDialog&
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::SFiltersDialog&
+agh::ui::SScoringFacility::
 filters_d()
 {
 	if ( not _filters_d )
@@ -24,7 +24,7 @@ filters_d()
 	return *_filters_d;
 }
 
-aghui::SScoringFacility::SFiltersDialog::
+agh::ui::SScoringFacility::SFiltersDialog::
 SFiltersDialog (SScoringFacility& p_)
       : _p (p_)
 {
diff --git a/src/aghermann/ui/sf/d/filters.hh b/src/aghermann/ui/sf/d/filters.hh
index 82439b4..7e60141 100644
--- a/src/aghermann/ui/sf/d/filters.hh
+++ b/src/aghermann/ui/sf/d/filters.hh
@@ -23,7 +23,8 @@
 
 using namespace std;
 
-namespace aghui {
+namespace agh {
+namespace ui {
 
 struct SFiltersDialogWidgets {
 
@@ -64,7 +65,8 @@ struct SScoringFacility::SFiltersDialog
 		_p;
 };
 
-} // namespace aghui
+}
+} // namespace agh::ui
 
 extern "C" {
 void eSFFilterHighPassCutoff_value_changed_cb( GtkSpinButton*, gpointer);
diff --git a/src/aghermann/ui/sf/d/filters_cb.cc b/src/aghermann/ui/sf/d/filters_cb.cc
index cfc5321..3676954 100644
--- a/src/aghermann/ui/sf/d/filters_cb.cc
+++ b/src/aghermann/ui/sf/d/filters_cb.cc
@@ -15,7 +15,7 @@
 #include "filters.hh"
 
 using namespace std;
-using namespace aghui;
+using namespace agh::ui;
 
 
 extern "C" {
diff --git a/src/aghermann/ui/sf/d/patterns-construct.cc b/src/aghermann/ui/sf/d/patterns-construct.cc
index e27ad51..dd007d0 100644
--- a/src/aghermann/ui/sf/d/patterns-construct.cc
+++ b/src/aghermann/ui/sf/d/patterns-construct.cc
@@ -15,7 +15,7 @@
 
 using namespace std;
 
-aghui::SPatternsDialogWidgets::
+agh::ui::SPatternsDialogWidgets::
 SPatternsDialogWidgets (SScoringFacility& SF)
 {
 	builder = gtk_builder_new();
@@ -141,7 +141,7 @@ SPatternsDialogWidgets (SScoringFacility& SF)
 	G_CONNECT_1 (wSFFD, hide);
 }
 
-aghui::SPatternsDialogWidgets::
+agh::ui::SPatternsDialogWidgets::
 ~SPatternsDialogWidgets ()
 {
 	// destroy toplevels
diff --git a/src/aghermann/ui/sf/d/patterns-draw.cc b/src/aghermann/ui/sf/d/patterns-draw.cc
index 8975eb1..6fe0f75 100644
--- a/src/aghermann/ui/sf/d/patterns-draw.cc
+++ b/src/aghermann/ui/sf/d/patterns-draw.cc
@@ -17,7 +17,7 @@ using namespace std;
 
 
 void
-aghui::SScoringFacility::SPatternsDialog::
+agh::ui::SScoringFacility::SPatternsDialog::
 set_thing_da_width( const int width)
 {
 	static int scrollbar_width = 15;
@@ -28,7 +28,7 @@ set_thing_da_width( const int width)
 }
 
 void
-aghui::SScoringFacility::SPatternsDialog::
+agh::ui::SScoringFacility::SPatternsDialog::
 set_field_da_width( const int width)
 {
 	static int scrollbar_width = 15;
@@ -41,11 +41,11 @@ set_field_da_width( const int width)
 
 
 void
-aghui::SScoringFacility::SPatternsDialog::
+agh::ui::SScoringFacility::SPatternsDialog::
 draw_thing( cairo_t *cr)
 {
 	if ( current_pattern == patterns.end() ) {
-		aghui::cairo_put_banner( cr, da_thing_wd, da_thing_ht, "(make a selection)");
+		agh::ui::cairo_put_banner( cr, da_thing_wd, da_thing_ht, "(make a selection)");
 		return;
 	}
 
@@ -75,7 +75,7 @@ draw_thing( cairo_t *cr)
 	int	zeroline = da_thing_ht/2;
 	cairo_set_source_rgb( cr, 0., 0., 0.);
 	cairo_set_line_width( cr, .8);
-	aghui::cairo_draw_signal( cr, current_pattern->thing, 0, current_pattern->thing.size(),
+	agh::ui::cairo_draw_signal( cr, current_pattern->thing, 0, current_pattern->thing.size(),
 				  da_thing_wd, 0, zeroline,
 				  thing_display_scale);
 	cairo_stroke( cr);
@@ -99,16 +99,16 @@ draw_thing( cairo_t *cr)
 			if ( sigproc::envelope( {current_pattern->thing, current_pattern->samplerate}, Pp2.env_scope,
 						1./current_pattern->samplerate,
 						&env_l, &env_u) == 0 ) {
-				aghui::cairo_put_banner( cr, da_thing_wd, da_thing_ht, "Pattern is too short for this envelope scope");
+				agh::ui::cairo_put_banner( cr, da_thing_wd, da_thing_ht, "Pattern is too short for this envelope scope");
 				goto out;
 			}
 
 			_p._p.CwB[SExpDesignUI::TColour::sf_selection].set_source_rgba_contrasting( cr, .3);
-			aghui::cairo_draw_signal( cr, env_u, 0, env_u.size(),
+			agh::ui::cairo_draw_signal( cr, env_u, 0, env_u.size(),
 						  da_thing_wd, 0, zeroline, thing_display_scale);
-			aghui::cairo_draw_signal( cr, env_l, 0, env_l.size(),
+			agh::ui::cairo_draw_signal( cr, env_l, 0, env_l.size(),
 						  da_thing_wd, 0, zeroline, thing_display_scale,
-						  1, aghui::TDrawSignalDirection::backward);
+						  1, agh::ui::TDrawSignalDirection::backward);
 			cairo_close_path( cr);
 			cairo_fill( cr);
 			cairo_stroke( cr);
@@ -116,7 +116,7 @@ draw_thing( cairo_t *cr)
 	      // target frequency
 		{
 			if ( Pp2.bwf_ffrom >= Pp2.bwf_fupto ) {
-				aghui::cairo_put_banner( cr, da_thing_wd, da_thing_ht, "Bad band-pass range");
+				agh::ui::cairo_put_banner( cr, da_thing_wd, da_thing_ht, "Bad band-pass range");
 				goto out;
 			}
 			target_freq = exstrom::band_pass(
@@ -125,7 +125,7 @@ draw_thing( cairo_t *cr)
 
 			cairo_set_source_rgba( cr, 0.3, 0.3, 0.3, .5);
 			cairo_set_line_width( cr, 3.);
-			aghui::cairo_draw_signal( cr, target_freq, 0, target_freq.size(),
+			agh::ui::cairo_draw_signal( cr, target_freq, 0, target_freq.size(),
 						  da_thing_wd, 0, zeroline, thing_display_scale);
 			cairo_stroke( cr);
 		}
@@ -133,11 +133,11 @@ draw_thing( cairo_t *cr)
 	      // dzcdf
 		{
 			if ( current_pattern->samplerate < 10 ) {
-				aghui::cairo_put_banner( cr, da_thing_wd, da_thing_ht, "Samplerate is too low");
+				agh::ui::cairo_put_banner( cr, da_thing_wd, da_thing_ht, "Samplerate is too low");
 				goto out;
 			}
 			if ( Pp2.dzcdf_step * 10 > current_pattern->pattern_length() ) { // require at least 10 dzcdf points
-				aghui::cairo_put_banner( cr, da_thing_wd, da_thing_ht, "Selection is too short for DZCDF");
+				agh::ui::cairo_put_banner( cr, da_thing_wd, da_thing_ht, "Selection is too short for DZCDF");
 				goto out;
 			}
 
@@ -147,7 +147,7 @@ draw_thing( cairo_t *cr)
 
 			cairo_set_source_rgba( cr, 0.3, 0.3, 0.99, .8);
 			cairo_set_line_width( cr, 1.);
-			aghui::cairo_draw_signal( cr, dzcdf, 0, dzcdf.size(),
+			agh::ui::cairo_draw_signal( cr, dzcdf, 0, dzcdf.size(),
 						  da_thing_wd, 0, zeroline, dzcdf_display_scale);
 			cairo_stroke( cr);
 		}
@@ -157,7 +157,7 @@ out:
 }
 
 void
-aghui::SScoringFacility::SPatternsDialog::
+agh::ui::SScoringFacility::SPatternsDialog::
 draw_field( cairo_t *cr)
 {
       // field
@@ -168,13 +168,13 @@ draw_field( cairo_t *cr)
 	field_profile_type = get<0>(profile_with_corrected_type);
 	auto& profile = get<1>(profile_with_corrected_type);
 	if ( field_profile_type == metrics::TType::raw )
-		aghui::cairo_draw_envelope(
+		agh::ui::cairo_draw_envelope(
 			cr,
 			profile, 0, profile.size(),
 			da_field_wd, 0., da_field_ht/4,
 			field_display_scale);
 	else {
-		aghui::cairo_draw_signal(
+		agh::ui::cairo_draw_signal(
 			cr,
 			profile, 0, profile.size(),
 			da_field_wd, 0., da_field_ht/2,
@@ -188,7 +188,7 @@ draw_field( cairo_t *cr)
 
       // occurrences
 	if ( occurrences.size() > 500 )
-		aghui::cairo_put_banner(
+		agh::ui::cairo_put_banner(
 			cr, da_field_wd, da_field_ht / .75, "Too many; reduce strictness?");
 	else if ( occurrences.size() > 0 ) {
 		cairo_set_line_width( cr, 1.);
@@ -207,7 +207,7 @@ draw_field( cairo_t *cr)
 			cairo_stroke( cr);
 		}
 	} else
-		aghui::cairo_put_banner(
+		agh::ui::cairo_put_banner(
 			cr, da_field_wd, da_field_ht / .75, "Nothing found");
 
       // diff line with degree of criteria attainment
diff --git a/src/aghermann/ui/sf/d/patterns-profiles.cc b/src/aghermann/ui/sf/d/patterns-profiles.cc
index 19b208b..df3109a 100644
--- a/src/aghermann/ui/sf/d/patterns-profiles.cc
+++ b/src/aghermann/ui/sf/d/patterns-profiles.cc
@@ -19,7 +19,7 @@ using namespace std;
 
 
 int
-aghui::SScoringFacility::SPatternsDialog::
+agh::ui::SScoringFacility::SPatternsDialog::
 import_from_selection( SScoringFacility::SChannel& field)
 {
 	// double check, possibly redundant after due check in callback
@@ -28,7 +28,7 @@ import_from_selection( SScoringFacility::SChannel& field)
 	if ( run == 0 )
 		return -1;
 	if ( run_time > 60. ) {
-		aghui::pop_ok_message(
+		agh::ui::pop_ok_message(
 			(GtkWindow*)wSFFD,
 			"<b>Selection greater than a minute</b>",
 			"This is surely the single occurrence, I tell you!");
@@ -36,7 +36,7 @@ import_from_selection( SScoringFacility::SChannel& field)
 	}
 	if ( run_time > 10. and
 	     GTK_RESPONSE_YES !=
-	     aghui::pop_question(
+	     agh::ui::pop_question(
 		     (GtkWindow*)wSFFD,
 		     "<b>The selection is greater than 10 sec</b>",
 		     "Sure to proceed with search?") )
@@ -114,7 +114,7 @@ make_subject_patterns_location( const agh::CExpDesign& ED, const agh::CSubject&
 
 
 void
-aghui::SScoringFacility::SPatternsDialog::
+agh::ui::SScoringFacility::SPatternsDialog::
 load_patterns()
 {
 	patterns.clear();
@@ -141,7 +141,7 @@ load_patterns()
 
 
 void
-aghui::SScoringFacility::SPatternsDialog::
+agh::ui::SScoringFacility::SPatternsDialog::
 populate_combo()
 {
 	g_signal_handler_block( eSFFDPatternList, eSFFDPatternList_changed_cb_handler_id);
@@ -168,7 +168,7 @@ populate_combo()
 
 
 void
-aghui::SScoringFacility::SPatternsDialog::
+agh::ui::SScoringFacility::SPatternsDialog::
 save_patterns()
 {
 	for ( auto& P : patterns )
@@ -193,7 +193,7 @@ save_patterns()
 
 
 void
-aghui::SScoringFacility::SPatternsDialog::
+agh::ui::SScoringFacility::SPatternsDialog::
 discard_current_pattern()
 {
 	if ( current_pattern == patterns.end() )
diff --git a/src/aghermann/ui/sf/d/patterns-profiles_cb.cc b/src/aghermann/ui/sf/d/patterns-profiles_cb.cc
index 74cb3d2..be46562 100644
--- a/src/aghermann/ui/sf/d/patterns-profiles_cb.cc
+++ b/src/aghermann/ui/sf/d/patterns-profiles_cb.cc
@@ -18,7 +18,7 @@
 
 using namespace std;
 
-using namespace aghui;
+using namespace agh::ui;
 
 
 extern "C" {
diff --git a/src/aghermann/ui/sf/d/patterns.cc b/src/aghermann/ui/sf/d/patterns.cc
index 5722574..c38ea3b 100644
--- a/src/aghermann/ui/sf/d/patterns.cc
+++ b/src/aghermann/ui/sf/d/patterns.cc
@@ -15,8 +15,8 @@
 
 using namespace std;
 
-aghui::SScoringFacility::SPatternsDialog&
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::SPatternsDialog&
+agh::ui::SScoringFacility::
 patterns_d()
 {
 	if ( not _patterns_d )
@@ -24,7 +24,7 @@ patterns_d()
 	return *_patterns_d;
 }
 
-aghui::SScoringFacility::SPatternsDialog::
+agh::ui::SScoringFacility::SPatternsDialog::
 SPatternsDialog (SScoringFacility& parent)
       : SPatternsDialogWidgets (parent),
 	Pp2 {.25,  0., 1.5, 1,  .1, .5, 3},
@@ -55,7 +55,7 @@ SPatternsDialog (SScoringFacility& parent)
 	load_patterns();
 }
 
-aghui::SScoringFacility::SPatternsDialog::
+agh::ui::SScoringFacility::SPatternsDialog::
 ~SPatternsDialog ()
 {
 	save_patterns();
@@ -68,7 +68,7 @@ aghui::SScoringFacility::SPatternsDialog::
 
 
 list<pattern::SPattern<TFloat>>::iterator
-aghui::SScoringFacility::SPatternsDialog::
+agh::ui::SScoringFacility::SPatternsDialog::
 pattern_by_idx( size_t idx)
 {
 	size_t i = 0;
@@ -84,7 +84,7 @@ pattern_by_idx( size_t idx)
 
 
 void
-aghui::SScoringFacility::SPatternsDialog::
+agh::ui::SScoringFacility::SPatternsDialog::
 search()
 {
 	assert (field_channel and current_pattern != patterns.end());
@@ -108,7 +108,7 @@ search()
 
 
 size_t
-aghui::SScoringFacility::SPatternsDialog::
+agh::ui::SScoringFacility::SPatternsDialog::
 find_occurrences()
 {
 	if ( unlikely (current_pattern == patterns.end()) )
@@ -132,7 +132,7 @@ find_occurrences()
 
 
 void
-aghui::SScoringFacility::SPatternsDialog::
+agh::ui::SScoringFacility::SPatternsDialog::
 occurrences_to_annotations( sigfile::SAnnotation::TType t)
 {
 	for ( size_t o = 0; o < occurrences.size(); ++o )
@@ -145,14 +145,14 @@ occurrences_to_annotations( sigfile::SAnnotation::TType t)
 }
 
 void
-aghui::SScoringFacility::SPatternsDialog::
+agh::ui::SScoringFacility::SPatternsDialog::
 save_annotations()
 {
 	saved_annotations = field_channel->annotations;
 }
 
 void
-aghui::SScoringFacility::SPatternsDialog::
+agh::ui::SScoringFacility::SPatternsDialog::
 restore_annotations()
 {
 	field_channel->annotations = saved_annotations;
@@ -163,7 +163,7 @@ restore_annotations()
 
 
 void
-aghui::SScoringFacility::SPatternsDialog::
+agh::ui::SScoringFacility::SPatternsDialog::
 setup_controls_for_find()
 {
 	bool	have_any = current_pattern != patterns.end();
@@ -185,7 +185,7 @@ setup_controls_for_find()
 }
 
 void
-aghui::SScoringFacility::SPatternsDialog::
+agh::ui::SScoringFacility::SPatternsDialog::
 setup_controls_for_wait()
 {
 	gtk_widget_set_visible( (GtkWidget*)cSFFDSearchButton, FALSE);
@@ -203,7 +203,7 @@ setup_controls_for_wait()
 }
 
 void
-aghui::SScoringFacility::SPatternsDialog::
+agh::ui::SScoringFacility::SPatternsDialog::
 setup_controls_for_tune()
 {
 	gtk_widget_set_visible( (GtkWidget*)cSFFDSearchButton, FALSE);
@@ -223,7 +223,7 @@ setup_controls_for_tune()
 
 
 void
-aghui::SScoringFacility::SPatternsDialog::
+agh::ui::SScoringFacility::SPatternsDialog::
 set_profile_manage_buttons_visibility()
 {
 	bool	have_any = current_pattern != patterns.end(),
@@ -236,7 +236,7 @@ set_profile_manage_buttons_visibility()
 
 
 void
-aghui::SScoringFacility::SPatternsDialog::
+agh::ui::SScoringFacility::SPatternsDialog::
 preselect_channel( const int h) const
 {
 	if ( h < 0 ) {
@@ -250,7 +250,7 @@ preselect_channel( const int h) const
 
 
 size_t
-aghui::SScoringFacility::SPatternsDialog::
+agh::ui::SScoringFacility::SPatternsDialog::
 nearest_occurrence( const double x) const
 {
 	double shortest = INFINITY;
@@ -269,7 +269,7 @@ nearest_occurrence( const double x) const
 
 
 void
-aghui::SScoringFacility::SPatternsDialog::
+agh::ui::SScoringFacility::SPatternsDialog::
 update_field_check_menu_items()
 {
 	suppress_redraw = true;
diff --git a/src/aghermann/ui/sf/d/patterns.hh b/src/aghermann/ui/sf/d/patterns.hh
index 7672ece..4e05698 100644
--- a/src/aghermann/ui/sf/d/patterns.hh
+++ b/src/aghermann/ui/sf/d/patterns.hh
@@ -21,7 +21,8 @@
 
 using namespace std;
 
-namespace aghui {
+namespace agh {
+namespace ui {
 
 
 struct SPatternsDialogWidgets {
@@ -186,12 +187,13 @@ struct SScoringFacility::SPatternsDialog
 	void set_thing_da_width( int);
 	void set_field_da_width( int);
 
-	aghui::SScoringFacility&
+	agh::ui::SScoringFacility&
 		_p;
 };
 
 
-} // namespace aghui
+}
+} // namespace agh::ui
 
 extern "C" {
 void eSFFDPatternList_changed_cb( GtkComboBox*, gpointer);
diff --git a/src/aghermann/ui/sf/d/patterns_cb.cc b/src/aghermann/ui/sf/d/patterns_cb.cc
index f9aafc8..1752fee 100644
--- a/src/aghermann/ui/sf/d/patterns_cb.cc
+++ b/src/aghermann/ui/sf/d/patterns_cb.cc
@@ -16,7 +16,7 @@
 #include "patterns.hh"
 
 using namespace std;
-using namespace aghui;
+using namespace agh::ui;
 
 extern "C" {
 
diff --git a/src/aghermann/ui/sf/d/phasediff-construct.cc b/src/aghermann/ui/sf/d/phasediff-construct.cc
index 34927cb..f04e3c4 100644
--- a/src/aghermann/ui/sf/d/phasediff-construct.cc
+++ b/src/aghermann/ui/sf/d/phasediff-construct.cc
@@ -15,7 +15,7 @@
 
 using namespace std;
 
-aghui::SPhasediffDialogWidgets::
+agh::ui::SPhasediffDialogWidgets::
 SPhasediffDialogWidgets (SScoringFacility& SF)
 {
 	builder = gtk_builder_new();
@@ -67,7 +67,7 @@ SPhasediffDialogWidgets (SScoringFacility& SF)
 }
 
 
-aghui::SPhasediffDialogWidgets::
+agh::ui::SPhasediffDialogWidgets::
 ~SPhasediffDialogWidgets ()
 {
 	gtk_widget_destroy( (GtkWidget*)wSFPD);
diff --git a/src/aghermann/ui/sf/d/phasediff.cc b/src/aghermann/ui/sf/d/phasediff.cc
index 836ddf8..f88a4b9 100644
--- a/src/aghermann/ui/sf/d/phasediff.cc
+++ b/src/aghermann/ui/sf/d/phasediff.cc
@@ -16,8 +16,8 @@
 
 using namespace std;
 
-aghui::SScoringFacility::SPhasediffDialog&
-aghui::SScoringFacility::phasediff_d()
+agh::ui::SScoringFacility::SPhasediffDialog&
+agh::ui::SScoringFacility::phasediff_d()
 {
 	if ( not _phasediff_d )
 		_phasediff_d = new SScoringFacility::SPhasediffDialog(*this);
@@ -25,8 +25,8 @@ aghui::SScoringFacility::phasediff_d()
 }
 
 
-aghui::SScoringFacility::SPhasediffDialog::
-SPhasediffDialog (aghui::SScoringFacility& parent)
+agh::ui::SScoringFacility::SPhasediffDialog::
+SPhasediffDialog (agh::ui::SScoringFacility& parent)
       : SPhasediffDialogWidgets (parent),
 	channel1 (nullptr),
 	channel2 (nullptr),
@@ -46,7 +46,7 @@ SPhasediffDialog (aghui::SScoringFacility& parent)
 
 
 void
-aghui::SScoringFacility::SPhasediffDialog::
+agh::ui::SScoringFacility::SPhasediffDialog::
 update_course()
 {
 	if ( channel1->samplerate() != channel2->samplerate() )
@@ -80,8 +80,8 @@ update_course()
 	}
 }
 
-const aghui::SScoringFacility::SChannel*
-aghui::SScoringFacility::SPhasediffDialog::
+const agh::ui::SScoringFacility::SChannel*
+agh::ui::SScoringFacility::SPhasediffDialog::
 channel_from_cbox( GtkComboBox *cbox)
 {
 	GtkTreeIter iter;
@@ -100,7 +100,7 @@ channel_from_cbox( GtkComboBox *cbox)
 
 
 void
-aghui::SScoringFacility::SPhasediffDialog::
+agh::ui::SScoringFacility::SPhasediffDialog::
 preselect_channel( GtkComboBox *cbox, const string& ch)
 {
 	GtkTreeModel *model = gtk_combo_box_get_model( cbox);
@@ -127,7 +127,7 @@ preselect_channel( GtkComboBox *cbox, const string& ch)
 
 
 void
-aghui::SScoringFacility::SPhasediffDialog::
+agh::ui::SScoringFacility::SPhasediffDialog::
 draw( cairo_t* cr, const int wd, const int ht)
 {
 	auto& SF = _p;
@@ -139,17 +139,17 @@ draw( cairo_t* cr, const int wd, const int ht)
 	cairo_stroke( cr);
 
 	if ( channel1 == channel2 ) {
-		aghui::cairo_put_banner( cr, wd, ht, "Same channel");
+		agh::ui::cairo_put_banner( cr, wd, ht, "Same channel");
 		return;
 	}
 
 	if ( course.size() == 0 ) {
-		aghui::cairo_put_banner( cr, wd, ht, "Huh?");
+		agh::ui::cairo_put_banner( cr, wd, ht, "Huh?");
 		return;
 	}
 
 	if ( channel1->samplerate() != channel2->samplerate() ) {
-		aghui::cairo_put_banner( cr, wd, ht, "Incompatible channels (different samplerate)");
+		agh::ui::cairo_put_banner( cr, wd, ht, "Incompatible channels (different samplerate)");
 		return;
 	}
 
diff --git a/src/aghermann/ui/sf/d/phasediff.hh b/src/aghermann/ui/sf/d/phasediff.hh
index 21605bb..4aba27f 100644
--- a/src/aghermann/ui/sf/d/phasediff.hh
+++ b/src/aghermann/ui/sf/d/phasediff.hh
@@ -20,7 +20,8 @@
 
 using namespace std;
 
-namespace aghui {
+namespace agh {
+namespace ui {
 
 struct SPhasediffDialogWidgets {
 
@@ -84,7 +85,8 @@ struct SScoringFacility::SPhasediffDialog
 		_p;
 };
 
-} // namespace aghui
+}
+} // namespace agh::ui
 
 extern "C" {
 void eSFPDChannelA_changed_cb( GtkComboBox*, gpointer);
diff --git a/src/aghermann/ui/sf/d/phasediff_cb.cc b/src/aghermann/ui/sf/d/phasediff_cb.cc
index c887d6d..024571f 100644
--- a/src/aghermann/ui/sf/d/phasediff_cb.cc
+++ b/src/aghermann/ui/sf/d/phasediff_cb.cc
@@ -15,7 +15,7 @@
 #include "phasediff.hh"
 
 using namespace std;
-using namespace aghui;
+using namespace agh::ui;
 
 extern "C" {
 
diff --git a/src/aghermann/ui/sf/hypnogram.cc b/src/aghermann/ui/sf/hypnogram.cc
index 7ff9b6b..3c16e53 100644
--- a/src/aghermann/ui/sf/hypnogram.cc
+++ b/src/aghermann/ui/sf/hypnogram.cc
@@ -29,7 +29,7 @@ unsigned short __score_hypn_depth[8] = {
 
 
 void
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 draw_hypnogram( cairo_t *cr)
 {
       // bg
@@ -124,7 +124,7 @@ draw_hypnogram( cairo_t *cr)
 
 
 void
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 do_dialog_import_hypnogram()
 {
 	GtkWidget *f_chooser =
@@ -166,7 +166,7 @@ do_dialog_import_hypnogram()
 
 
 void
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 do_dialog_export_hypnogram() const
 {
 	GtkWidget *f_chooser =
@@ -188,7 +188,7 @@ do_dialog_export_hypnogram() const
 
 
 void
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 do_clear_hypnogram()
 {
 	hypnogram.assign(
diff --git a/src/aghermann/ui/sf/hypnogram_cb.cc b/src/aghermann/ui/sf/hypnogram_cb.cc
index 0c108e8..79c65ae 100644
--- a/src/aghermann/ui/sf/hypnogram_cb.cc
+++ b/src/aghermann/ui/sf/hypnogram_cb.cc
@@ -14,7 +14,7 @@
 #include "sf.hh"
 
 using namespace std;
-using namespace aghui;
+using namespace agh::ui;
 
 extern "C" {
 
diff --git a/src/aghermann/ui/sf/ica.cc b/src/aghermann/ui/sf/ica.cc
index b7bd063..55e43ab 100644
--- a/src/aghermann/ui/sf/ica.cc
+++ b/src/aghermann/ui/sf/ica.cc
@@ -21,10 +21,10 @@
 using namespace std;
 
 const char
-	*aghui::SScoringFacility::ica_unmapped_menu_item_label = "(not mapped)";
+	*agh::ui::SScoringFacility::ica_unmapped_menu_item_label = "(not mapped)";
 
 int
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 setup_ica()
 {
 	if ( ica )
@@ -135,13 +135,13 @@ setup_ica()
 
 
 int
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 run_ica()
 {
 	if ( ica == nullptr )
 		return 1;
 
-	aghui::SBusyBlock bb (wSF);
+	agh::ui::SBusyBlock bb (wSF);
 
 	ica_components = itpp::mat (0, 0); // free up couple of hundred megs
 	ica->obj() . separate();
@@ -155,13 +155,13 @@ run_ica()
 
 
 int
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 remix_ics()
 {
 	if ( ica == nullptr )
 		return 1;
 
-	aghui::SBusyBlock bb (wSF);
+	agh::ui::SBusyBlock bb (wSF);
 
 	switch ( remix_mode ) {
 	case TICARemixMode::map:
@@ -228,7 +228,7 @@ remix_ics()
 }
 
 int
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 restore_ics()
 {
 	if ( ica == nullptr )
@@ -250,7 +250,7 @@ restore_ics()
 
 
 int
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 apply_remix( const bool do_backup)
 {
 	if ( ica == nullptr )
@@ -298,7 +298,7 @@ apply_remix( const bool do_backup)
 
 int
 __attribute__ ((pure))
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 ic_near( const double y) const
 {
 	int nearest = INT_MAX, thisd;
@@ -324,7 +324,7 @@ ic_near( const double y) const
 
 int
 __attribute__ ((pure))
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 ic_of( const SChannel* ch) const
 {
 	int h = 0;
@@ -333,7 +333,7 @@ ic_of( const SChannel* ch) const
 			return h;
 		++h;
 	}
-	throw out_of_range ("aghui::SScoringFacility::ic_of(): bad channel");
+	throw out_of_range ("agh::ui::SScoringFacility::ic_of(): bad channel");
 }
 
 
diff --git a/src/aghermann/ui/sf/ica_cb.cc b/src/aghermann/ui/sf/ica_cb.cc
index 0fb4503..9bfea67 100644
--- a/src/aghermann/ui/sf/ica_cb.cc
+++ b/src/aghermann/ui/sf/ica_cb.cc
@@ -15,7 +15,7 @@
 #include "widgets.hh"
 
 using namespace std;
-using namespace aghui;
+using namespace agh::ui;
 
 extern "C" {
 
diff --git a/src/aghermann/ui/sf/mainmenu_cb.cc b/src/aghermann/ui/sf/mainmenu_cb.cc
index 8e6e82b..7964d09 100644
--- a/src/aghermann/ui/sf/mainmenu_cb.cc
+++ b/src/aghermann/ui/sf/mainmenu_cb.cc
@@ -14,7 +14,7 @@
 #include "d/phasediff.hh"
 
 using namespace std;
-using namespace aghui;
+using namespace agh::ui;
 
 extern "C" {
 
diff --git a/src/aghermann/ui/sf/montage-overlays.cc b/src/aghermann/ui/sf/montage-overlays.cc
index 6142439..6c3f4ff 100644
--- a/src/aghermann/ui/sf/montage-overlays.cc
+++ b/src/aghermann/ui/sf/montage-overlays.cc
@@ -21,7 +21,7 @@ using namespace std;
 
 
 void
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 draw_overlays( cairo_t* cr,
 	       const int wd, const float zeroy) const
 {
@@ -304,7 +304,7 @@ draw_overlays( cairo_t* cr,
 		cairo_set_source( cr, cp);
 
 		cairo_set_line_width( cr, .3);
-		aghui::cairo_draw_envelope(
+		agh::ui::cairo_draw_envelope(
 			cr,
 			raw_profile, 0, raw_profile.size(),
 			_p.da_wd, 0., pbot - EMGProfileHeight/2, signal_display_scale/2.); // half-signal scale, looks ok?
@@ -354,7 +354,7 @@ draw_overlays( cairo_t* cr,
 
 
 void
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 _draw_hour_ticks( cairo_t *cr,
 		  const int htop, const int hbot,
 		  const bool with_cursor)
diff --git a/src/aghermann/ui/sf/montage.cc b/src/aghermann/ui/sf/montage.cc
index 22011a0..9ffe6a9 100644
--- a/src/aghermann/ui/sf/montage.cc
+++ b/src/aghermann/ui/sf/montage.cc
@@ -29,7 +29,7 @@ unsigned short PageTicks[] = {
 
 
 void
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 draw_signal( const valarray<TFloat>& signal,
 	     size_t width, int vdisp, cairo_t *cr) const
 {
@@ -37,7 +37,7 @@ draw_signal( const valarray<TFloat>& signal,
 		end    = _p.cur_vpage_end()    * samplerate(),
 		run    = end - start,
 		half_pad = run * _p.skirting_run_per1;
-	aghui::cairo_draw_signal( cr, signal,
+	agh::ui::cairo_draw_signal( cr, signal,
 				  start - half_pad,
 				  end + half_pad,
 				  width, 0, vdisp, signal_display_scale,
@@ -48,7 +48,7 @@ draw_signal( const valarray<TFloat>& signal,
 
 
 void
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 estimate_montage_height()
 {
 	da_ht = channels.size() * interchannel_gap;
@@ -59,8 +59,8 @@ estimate_montage_height()
 
 
 struct SChHolder {
-	aghui::SScoringFacility::SChannel* ch;
-	SChHolder( aghui::SScoringFacility::SChannel& ini) : ch (&ini) {}
+	agh::ui::SScoringFacility::SChannel* ch;
+	SChHolder( agh::ui::SScoringFacility::SChannel& ini) : ch (&ini) {}
 	bool operator<( const SChHolder& rv) const
 		{
 			return ch->zeroy < rv.ch->zeroy;
@@ -70,7 +70,7 @@ struct SChHolder {
 
 
 sigfile::SAnnotation*
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 interactively_choose_annotation() const
 {
 	// do some on-the-fly construcion
@@ -102,7 +102,7 @@ interactively_choose_annotation() const
 
 
 int
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 find_free_space()
 {
 	vector<SChHolder> thomas;
@@ -134,7 +134,7 @@ find_free_space()
 }
 
 void
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 space_evenly()
 {
 	vector<SChHolder> thomas;
@@ -157,7 +157,7 @@ space_evenly()
 
 
 void
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 expand_by_factor( const double fac)
 {
 	for ( auto &H : channels ) {
@@ -182,7 +182,7 @@ expand_by_factor( const double fac)
 
 
 void
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 draw_for_montage( const string& fname,
 		  const int width, const int height) // to a file
 {
@@ -197,7 +197,7 @@ draw_for_montage( const string& fname,
 }
 
 void
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 draw_for_montage( cairo_t* cr)
 {
 	if ( !hidden ) {
@@ -209,7 +209,7 @@ draw_for_montage( cairo_t* cr)
 
 
 void
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 draw_page( cairo_t *cr,
 	   const int wd, const float y0,
 	   bool draw_marquee) const
@@ -227,7 +227,7 @@ draw_page( cairo_t *cr,
 	}
 
       // marquee, goes first, not to obscure waveforms
-	if ( _p.mode != aghui::SScoringFacility::TMode::shuffling_channels
+	if ( _p.mode != agh::ui::SScoringFacility::TMode::shuffling_channels
 	     and draw_marquee // possibly undesired (such as when drawing for unfazer (what unfazer?))
 	     && agh::alg::overlap(
 		     selection_start_time, selection_end_time,
@@ -287,15 +287,15 @@ draw_page( cairo_t *cr,
 
 					cairo_set_source_rgba( cr, 1, 1, 1, .6);
 					cairo_set_line_width( cr, 1);
-					aghui::cairo_draw_signal(
+					agh::ui::cairo_draw_signal(
 						cr, env_u, 0, env_u.size(),
 						me-ma, ma, y0, signal_display_scale);
-					aghui::cairo_draw_signal(
+					agh::ui::cairo_draw_signal(
 						cr, env_l, 0, env_l.size(),
 						me-ma, ma, y0, signal_display_scale,
 						1,
-						aghui::TDrawSignalDirection::backward,
-						aghui::TDrawSignalPathOption::yes);
+						agh::ui::TDrawSignalDirection::backward,
+						agh::ui::TDrawSignalPathOption::yes);
 					cairo_close_path( cr);
 					cairo_fill( cr);
 					cairo_stroke( cr);
@@ -312,7 +312,7 @@ draw_page( cairo_t *cr,
 
 				cairo_set_source_rgba( cr, 0.3, 0.3, 0.3, .5);
 				cairo_set_line_width( cr, 3.);
-				aghui::cairo_draw_signal(
+				agh::ui::cairo_draw_signal(
 					cr, course, 0, course.size(),
 					me-ma, ma, y0, signal_display_scale);
 				cairo_stroke( cr);
@@ -330,7 +330,7 @@ draw_page( cairo_t *cr,
 
 					cairo_set_source_rgba( cr, 0.3, 0.3, 0.99, .8);
 					cairo_set_line_width( cr, 1.);
-					aghui::cairo_draw_signal(
+					agh::ui::cairo_draw_signal(
 						cr, dzcdf, 0, dzcdf.size(),
 						me-ma, ma, y0, dzcdf_display_scale);
 					cairo_stroke( cr);
@@ -385,7 +385,7 @@ draw_page( cairo_t *cr,
 		draw_signal_filtered( wd, y0, cr);
 		cairo_stroke( cr);
 
-		if ( _p.mode == aghui::SScoringFacility::TMode::scoring ) {
+		if ( _p.mode == agh::ui::SScoringFacility::TMode::scoring ) {
 			_p._p.CwB[SExpDesignUI::TColour::sf_labels].set_source_rgb( cr);
 			cairo_move_to( cr, wd-88, y0 - 15);
 			cairo_set_font_size( cr, 10);
@@ -407,7 +407,7 @@ draw_page( cairo_t *cr,
 		draw_signal_original( wd, y0, cr);
 		cairo_stroke( cr);
 
-		if ( _p.mode == aghui::SScoringFacility::TMode::scoring ) {
+		if ( _p.mode == agh::ui::SScoringFacility::TMode::scoring ) {
 			_p._p.CwB[SExpDesignUI::TColour::sf_labels].set_source_rgb( cr);
 			cairo_move_to( cr, wd-88, y0 - 25);
 			cairo_set_font_size( cr, 10);
@@ -417,7 +417,7 @@ draw_page( cairo_t *cr,
 	}
 
       // waveform: signal_reconstituted
-	if ( _p.mode == aghui::SScoringFacility::TMode::showing_remixed &&
+	if ( _p.mode == agh::ui::SScoringFacility::TMode::showing_remixed &&
 	     signal_reconstituted.size() != 0 ) {
 		if ( apply_reconstituted ) {
 			cairo_set_line_width( cr, fine_line() * 1.3);
@@ -477,7 +477,7 @@ draw_page( cairo_t *cr,
 	}
 
       // annotations
-	if ( _p.mode == aghui::SScoringFacility::TMode::scoring
+	if ( _p.mode == agh::ui::SScoringFacility::TMode::scoring
 	     and not annotations.empty() ) {
 		double last_label_end = 0;
 		int overlap_count = 0;
@@ -633,7 +633,7 @@ draw_page( cairo_t *cr,
 
 
 void
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 draw_montage( const string& fname) // to a file
 {
 	cairo_surface_t *cs = cairo_svg_surface_create( fname.c_str(), da_wd, da_ht);
@@ -647,7 +647,7 @@ draw_montage( const string& fname) // to a file
 
 template <class T>
 void
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 _draw_matrix_to_montage( cairo_t *cr, const itpp::Mat<T>& mat)
 {
 	int gap = da_ht/mat.rows();
@@ -705,7 +705,7 @@ _draw_matrix_to_montage( cairo_t *cr, const itpp::Mat<T>& mat)
 			run   = end - start,
 			half_pad = run * skirting_run_per1;
 
-		aghui::cairo_draw_signal( cr, mat, r,
+		agh::ui::cairo_draw_signal( cr, mat, r,
 					  start - half_pad,
 					  end + half_pad,
 					  da_wd, 0, our_y, our_display_scale);
@@ -716,7 +716,7 @@ _draw_matrix_to_montage( cairo_t *cr, const itpp::Mat<T>& mat)
 
 
 void
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 draw_montage( cairo_t* cr)
 {
 	double	true_frac = 1. - 1. / (1. + 2*skirting_run_per1),
@@ -727,7 +727,7 @@ draw_montage( cairo_t* cr)
 	switch ( mode ) {
 	case TMode::showing_ics:
 		if ( ica_components.size() == 0 ) {
-			aghui::cairo_put_banner(
+			agh::ui::cairo_put_banner(
 				cr, da_wd, da_ht,
 				"Now set up ICA parameters, then press [Compute ICs]");
 		} else
@@ -735,7 +735,7 @@ draw_montage( cairo_t* cr)
 			// draw ignoring channels' zeroy
 	    break;
 	case TMode::separating:
-		aghui::cairo_put_banner(
+		agh::ui::cairo_put_banner(
 			cr, da_wd, da_ht,
 			"Separating...");
 	    break;
diff --git a/src/aghermann/ui/sf/montage_cb.cc b/src/aghermann/ui/sf/montage_cb.cc
index b025c96..30942e0 100644
--- a/src/aghermann/ui/sf/montage_cb.cc
+++ b/src/aghermann/ui/sf/montage_cb.cc
@@ -22,7 +22,7 @@
 
 
 using namespace std;
-using namespace aghui;
+using namespace agh::ui;
 
 extern "C" {
 
@@ -1189,7 +1189,7 @@ iSFPageSelectionAnnotate_activate_cb(
 			: SAnnotation::TType::plain;
 
 		if ( strlen( new_ann) == 0 && type == SAnnotation::TType::plain ) {
-			aghui::pop_ok_message( SF.wSF, "Give a plain annotation a name", "and try again.");
+			agh::ui::pop_ok_message( SF.wSF, "Give a plain annotation a name", "and try again.");
 			return;
 		}
 
diff --git a/src/aghermann/ui/sf/sf.cc b/src/aghermann/ui/sf/sf.cc
index cbcb1a4..dc06f55 100644
--- a/src/aghermann/ui/sf/sf.cc
+++ b/src/aghermann/ui/sf/sf.cc
@@ -27,21 +27,21 @@
 using namespace std;
 
 
-size_t	aghui::SScoringFacility::IntersignalSpace = 120,
-	aghui::SScoringFacility::HypnogramHeight  =  40,
-	aghui::SScoringFacility::EMGProfileHeight =  30;
+size_t	agh::ui::SScoringFacility::IntersignalSpace = 120,
+	agh::ui::SScoringFacility::HypnogramHeight  =  40,
+	agh::ui::SScoringFacility::EMGProfileHeight =  30;
 
 
-// class aghui::SScoringFacility
+// class agh::ui::SScoringFacility
 
 const array<unsigned, 9>
-	aghui::SScoringFacility::DisplayPageSizeValues = {
+	agh::ui::SScoringFacility::DisplayPageSizeValues = {
 	{4, 5, 10, 15, 20, 30, 60, 60*3, 60*5}
 };
 
 size_t
 __attribute__ ((pure))
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 figure_display_pagesize_item( const size_t seconds)
 {
 	size_t i = 0;
@@ -53,10 +53,10 @@ figure_display_pagesize_item( const size_t seconds)
 
 using agh::confval::SValidator;
 
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 SScoringFacility (agh::CSubject& J,
 		  const string& D, const string& E,
-		  aghui::SExpDesignUI& parent)
+		  agh::ui::SExpDesignUI& parent)
       : _p (parent),
 	_csubject (J),
 	_session (D),
@@ -97,7 +97,7 @@ SScoringFacility (agh::CSubject& J,
 	da_wd (800), // gets properly set in a configure_event cb
 	da_ht (NAN) // bad value, to be estimated unless previously saved
 {
-	aghui::SBusyBlock bb (_p.wMainWindow);
+	agh::ui::SBusyBlock bb (_p.wMainWindow);
 
       // complete widget construction
       // histogram -> scores
@@ -260,7 +260,7 @@ SScoringFacility (agh::CSubject& J,
 		}
 	// if there's too many visible, suggest to hide some
 	if ( channels.size() > 10 && n_hidden == 0 )
-		aghui::pop_ok_message(
+		agh::ui::pop_ok_message(
 			wSF, "<b>Montage seems overcrowded</b>",
 			"The recording you are about to view has %zu channels.\n"
 			"You can hide some using appropriate channel context menus.", channels.size() - n_hidden);
@@ -302,7 +302,7 @@ SScoringFacility (agh::CSubject& J,
 }
 
 
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 ~SScoringFacility ()
 {
 	// put scores
@@ -338,7 +338,7 @@ aghui::SScoringFacility::
 }
 
 void
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 redraw_ssubject_timeline() const
 {
 	auto j = _p.subject_presentation_by_csubject( _csubject);
@@ -350,8 +350,8 @@ redraw_ssubject_timeline() const
 
 
 
-aghui::SScoringFacility::SChannel&
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::SChannel&
+agh::ui::SScoringFacility::
 operator[]( const string& ch)
 {
 	auto iter = find( channels.begin(), channels.end(), ch);
@@ -360,8 +360,8 @@ operator[]( const string& ch)
 	return *iter;
 }
 
-aghui::SScoringFacility::SChannel&
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::SChannel&
+agh::ui::SScoringFacility::
 channel_by_idx( size_t i)
 {
 	for ( auto &H : channels )
@@ -371,9 +371,9 @@ channel_by_idx( size_t i)
 }
 
 
-aghui::SScoringFacility::SChannel*
+agh::ui::SScoringFacility::SChannel*
 __attribute__ ((pure))
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 channel_near( const int y)
 {
 	int nearest = INT_MAX, thisy;
@@ -399,7 +399,7 @@ channel_near( const int y)
 
 
 void
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 update_all_channels_profile_display_scale()
 {
 	for ( auto& H : channels )
@@ -410,7 +410,7 @@ update_all_channels_profile_display_scale()
 
 
 void
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 get_hypnogram()
 {
 	// just get from the first source,
@@ -421,7 +421,7 @@ get_hypnogram()
 		hypnogram[p] = F[p].score_code();
 }
 void
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 put_hypnogram()
 {
 	// but put to all
@@ -434,7 +434,7 @@ put_hypnogram()
 
 
 void
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 calculate_scored_percent()
 {
 	using namespace sigfile;
@@ -463,7 +463,7 @@ calculate_scored_percent()
 
 
 void
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 set_cur_vpage( size_t p, const bool touch_self)
 {
 	if ( _cur_vpage == p && !touch_self )
@@ -489,7 +489,7 @@ set_cur_vpage( size_t p, const bool touch_self)
 }
 
 void
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 set_vpagesize_item( int item, const bool touch_self)
 {
 	if ( pagesize_item == item && !touch_self )
@@ -517,7 +517,7 @@ set_vpagesize_item( int item, const bool touch_self)
 
 
 void
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 do_score_forward( const char score_ch)
 {
 	hypnogram[_cur_page] = score_ch;
@@ -527,7 +527,7 @@ do_score_forward( const char score_ch)
 }
 
 void
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 do_score_back( const char score_ch)
 {
 	hypnogram[_cur_page] = score_ch;
@@ -537,7 +537,7 @@ do_score_back( const char score_ch)
 }
 
 size_t
-aghui::SScoringFacility::SChannel::
+agh::ui::SScoringFacility::SChannel::
 marquee_to_selection()
 {
 	if ( marquee_mstart < marquee_mend) {
@@ -565,7 +565,7 @@ marquee_to_selection()
 
 
 bool
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 page_has_artifacts( const size_t p, const bool search_all) const
 {
 	for ( auto &H : channels )
@@ -581,7 +581,7 @@ page_has_artifacts( const size_t p, const bool search_all) const
 
 
 bool
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 page_has_annotations( const size_t p, const SChannel& H) const
 {
 	int	half_pad_samples = skirting_run_per1 * vpagesize() * H.samplerate();
@@ -598,7 +598,7 @@ page_has_annotations( const size_t p, const SChannel& H) const
 
 
 void
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 draw_score_stats() const
 {
 	gtk_label_set_markup(
@@ -617,7 +617,7 @@ draw_score_stats() const
 
 
 void
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 draw_current_pos( const double x) const
 {
 	static const time_t epoch_clockhour = 3 * 60 * 60;
@@ -648,7 +648,7 @@ draw_current_pos( const double x) const
 
 
 void
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 queue_redraw_all() const
 {
 	if ( suppress_redraw )
@@ -668,7 +668,7 @@ queue_redraw_all() const
 
 
 void
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 load_montage()
 {
 	libconfig::Config conf;
@@ -713,7 +713,7 @@ load_montage()
 
 
 void
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 save_montage()
 {
 	libconfig::Config conf;
@@ -740,7 +740,7 @@ save_montage()
 
 
 void
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 sb_message( const string& msg) const
 {
 	gtk_statusbar_pop(  sbSF, sbSFContextIdGeneral);
@@ -748,7 +748,7 @@ sb_message( const string& msg) const
 }
 
 void
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 sb_clear() const
 {
 	gtk_statusbar_pop(  sbSF, sbSFContextIdGeneral);
@@ -757,7 +757,7 @@ sb_clear() const
 
 
 const char* const
-	aghui::SScoringFacility::tooltips[2] = {
+	agh::ui::SScoringFacility::tooltips[2] = {
 	"<b>Page views:</b>\n"
 	"  Wheel:	adjust display scale;\n"
 	"  Ctrl+Wheel:	change scale for\n"
@@ -789,7 +789,7 @@ const char* const
 
 
 void
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 set_tooltip( TTipIdx i) const
 {
 	gtk_widget_set_tooltip_markup( (GtkWidget*)lSFHint, tooltips[i]);
@@ -798,7 +798,7 @@ set_tooltip( TTipIdx i) const
 
 
 void
-aghui::SScoringFacility::
+agh::ui::SScoringFacility::
 update_main_menu_items()
 {
 	bool	all_draw_original[2] = {true, true},
diff --git a/src/aghermann/ui/sf/sf.hh b/src/aghermann/ui/sf/sf.hh
index ad259a0..ea5cfad 100644
--- a/src/aghermann/ui/sf/sf.hh
+++ b/src/aghermann/ui/sf/sf.hh
@@ -39,7 +39,8 @@
 
 using namespace std;
 
-namespace aghui {
+namespace agh {
+namespace ui {
 
 class SScoringFacility
   : public SScoringFacilityWidgets {
@@ -772,9 +773,8 @@ channel_y0( const T& h) const
 }
 
 
-} // namespace aghui
-
-
+}
+} // namespace agh::ui
 
 #endif
 
diff --git a/src/aghermann/ui/sf/sf_cb.cc b/src/aghermann/ui/sf/sf_cb.cc
index 24e7ba0..264b07b 100644
--- a/src/aghermann/ui/sf/sf_cb.cc
+++ b/src/aghermann/ui/sf/sf_cb.cc
@@ -12,7 +12,7 @@
 #include "sf.hh"
 
 using namespace std;
-using namespace aghui;
+using namespace agh::ui;
 
 extern "C" {
 
diff --git a/src/aghermann/ui/sf/widgets.hh b/src/aghermann/ui/sf/widgets.hh
index b536bd5..cb3c1fd 100644
--- a/src/aghermann/ui/sf/widgets.hh
+++ b/src/aghermann/ui/sf/widgets.hh
@@ -15,7 +15,8 @@
 #include <gtk/gtk.h>
 
 // stow this crowd away from first-class gents
-namespace aghui {
+namespace agh {
+namespace ui {
 
 struct SScoringFacilityWidgets {
 
@@ -202,7 +203,8 @@ struct SScoringFacilityWidgets {
 
 };
 
-} // namespace aghui
+}
+} // namespace agh::ui
 
 #endif
 
diff --git a/src/aghermann/ui/sm/sm-construct.cc b/src/aghermann/ui/sm/sm-construct.cc
index 3547f40..4f52952 100644
--- a/src/aghermann/ui/sm/sm-construct.cc
+++ b/src/aghermann/ui/sm/sm-construct.cc
@@ -20,7 +20,7 @@ using namespace std;
 
 
 int
-aghui::SSessionChooser::
+agh::ui::SSessionChooser::
 construct_widgets()
 {
       // load glade
diff --git a/src/aghermann/ui/sm/sm.cc b/src/aghermann/ui/sm/sm.cc
index 74c7949..b41da80 100644
--- a/src/aghermann/ui/sm/sm.cc
+++ b/src/aghermann/ui/sm/sm.cc
@@ -27,7 +27,7 @@ using namespace std;
 
 
 void
-aghui::SSession::
+agh::ui::SSession::
 get_session_stats()
 {
 	agh::fs::total_supported_sigfiles = 0;
@@ -45,7 +45,7 @@ get_session_stats()
 }
 
 
-aghui::SSessionChooser::
+agh::ui::SSessionChooser::
 SSessionChooser (const char* explicit_session)
       : filename (string (getenv("HOME")) + "/.config/aghermann/sessionrc"),
 	ed (nullptr)
@@ -60,7 +60,7 @@ SSessionChooser (const char* explicit_session)
 	try {
 		if ( have_explicit_dir ) {
 			char* canonicalized = canonicalize_file_name( explicit_session);
-			ed = new aghui::SExpDesignUI(
+			ed = new agh::ui::SExpDesignUI(
 				this, canonicalized);
 			set_unique_app_window( ed->wMainWindow);
 			free( canonicalized);
@@ -70,25 +70,25 @@ SSessionChooser (const char* explicit_session)
 			//set_unique_app_window( (GtkWindow*)wSessionChooser);
 
 		} else {
-			ed = new aghui::SExpDesignUI(
+			ed = new agh::ui::SExpDesignUI(
 				this, get_dir());
 			set_unique_app_window( ed->wMainWindow);
 		}
 	} catch (runtime_error ex) {
-		aghui::pop_ok_message( nullptr, "Huh", "%s", ex.what());
+		agh::ui::pop_ok_message( nullptr, "Huh", "%s", ex.what());
 
 		string new_experiment_dir = string (getenv("HOME")) + "/NewExperiment";
 		if ( agh::fs::mkdir_with_parents( new_experiment_dir.c_str()) ) {
-			aghui::pop_ok_message( nullptr, "Failed to create a new directory in your $HOME.",
+			agh::ui::pop_ok_message( nullptr, "Failed to create a new directory in your $HOME.",
 					       " There's nothing we can do about that.");
 		}
-		ed = new aghui::SExpDesignUI( this, new_experiment_dir);
+		ed = new agh::ui::SExpDesignUI( this, new_experiment_dir);
 		// if HOME is non-writable, then don't catch: it's too seriously broken
 	}
 }
 
 
-aghui::SSessionChooser::
+agh::ui::SSessionChooser::
 ~SSessionChooser()
 {
 	destruct_widgets();
@@ -102,7 +102,7 @@ aghui::SSessionChooser::
 
 
 int
-aghui::SSessionChooser::
+agh::ui::SSessionChooser::
 open_selected_session()
 {
 	assert (ed == nullptr);
@@ -111,7 +111,7 @@ open_selected_session()
 		return 1; // double check
 
 	try {
-		ed = new aghui::SExpDesignUI(
+		ed = new agh::ui::SExpDesignUI(
 			this, selected);
 		set_unique_app_window( ed->wMainWindow);
 
@@ -130,7 +130,7 @@ open_selected_session()
 
 
 void
-aghui::SSessionChooser::
+agh::ui::SSessionChooser::
 close_current_session()
 {
 	assert (ed);
@@ -144,7 +144,7 @@ close_current_session()
 
 
 void
-aghui::SSessionChooser::
+agh::ui::SSessionChooser::
 destruct_widgets()
 {
       // // destroy toplevels
@@ -159,7 +159,7 @@ destruct_widgets()
 
 
 void
-aghui::SSessionChooser::
+agh::ui::SSessionChooser::
 buf_on_status_bar( const bool)
 {
 	// gtk_statusbar_pop( sbSessionChooserStatusBar, sbChooserContextIdGeneral);
@@ -167,13 +167,13 @@ buf_on_status_bar( const bool)
 	/// segfaults no matter what. Cannot call gtk_events_pending() from a handler.
 	// if ( ensure ) {
 	//  	g_signal_handler_block( bSessionChooserSelect, bSessionChooserSelect_clicked_cb_handler);
-	//   	aghui::gtk_flush();
+	//   	agh::ui::gtk_flush();
 	//  	g_signal_handler_unblock( bSessionChooserSelect, bSessionChooserSelect_clicked_cb_handler);
 	// }
 }
 
 void
-aghui::SSessionChooser::
+agh::ui::SSessionChooser::
 sb_progress_indicator( const char* current, const size_t n, const size_t i)
 {
 	snprintf_buf( "(%zu of %zu) %s", i, n, current);
@@ -183,7 +183,7 @@ sb_progress_indicator( const char* current, const size_t n, const size_t i)
 
 
 string
-aghui::SSessionChooser::
+agh::ui::SSessionChooser::
 get_selected_dir()
 {
 	auto selection = gtk_tree_view_get_selection( tvSessionChooserList);
@@ -211,7 +211,7 @@ get_selected_dir()
 
 
 string
-aghui::SSessionChooser::
+agh::ui::SSessionChooser::
 get_dir( const int idx) const
 {
 	GtkTreeIter iter;
@@ -244,7 +244,7 @@ get_dir( const int idx) const
 
 
 void
-aghui::SSessionChooser::
+agh::ui::SSessionChooser::
 read_sessionrc()
 {
 	sessions.clear();
@@ -283,7 +283,7 @@ read_sessionrc()
 
 
 void
-aghui::SSessionChooser::
+agh::ui::SSessionChooser::
 write_sessionrc() const
 {
 	try {
@@ -306,7 +306,7 @@ write_sessionrc() const
 
 
 void
-aghui::SSessionChooser::
+agh::ui::SSessionChooser::
 conditionally_enable_buttons()
 {
 	auto selection = gtk_tree_view_get_selection( tvSessionChooserList);
@@ -319,7 +319,7 @@ conditionally_enable_buttons()
 
 
 void
-aghui::SSessionChooser::
+agh::ui::SSessionChooser::
 _sync_list_to_model()
 {
 	gtk_list_store_clear( mSessionChooserList);
@@ -339,7 +339,7 @@ _sync_list_to_model()
 }
 
 void
-aghui::SSessionChooser::
+agh::ui::SSessionChooser::
 _sync_model_to_list()
 {
 	sessions.clear();
diff --git a/src/aghermann/ui/sm/sm.hh b/src/aghermann/ui/sm/sm.hh
index 9299051..e4b9dc6 100644
--- a/src/aghermann/ui/sm/sm.hh
+++ b/src/aghermann/ui/sm/sm.hh
@@ -27,7 +27,8 @@
 using namespace std;
 
 
-namespace aghui {
+namespace agh {
+namespace ui {
 
 struct SSession : public string {
 	size_t	n_groups,
@@ -58,7 +59,7 @@ struct SSessionChooser {
 	list<SSession>
 		sessions;
 
-	aghui::SExpDesignUI* ed;
+	agh::ui::SExpDesignUI* ed;
 
 	string get_selected_dir(); // and assign last_dir_no
 	void read_sessionrc();
@@ -100,7 +101,8 @@ struct SSessionChooser {
 };
 
 
-} // namespace aghui
+}
+} // namespace agh::ui
 
 #endif
 
diff --git a/src/aghermann/ui/sm/sm_cb.cc b/src/aghermann/ui/sm/sm_cb.cc
index 013c1a3..d80c393 100644
--- a/src/aghermann/ui/sm/sm_cb.cc
+++ b/src/aghermann/ui/sm/sm_cb.cc
@@ -18,7 +18,7 @@
 #include "sm_cb.hh"
 
 using namespace std;
-using namespace aghui;
+using namespace agh::ui;
 
 
 extern "C" {
@@ -72,7 +72,7 @@ bSessionChooserOpen_clicked_cb(
 {
 	auto& SC = *(SSessionChooser*)userdata;
 
-	aghui::SBusyBlock bb (SC.wSessionChooser);
+	agh::ui::SBusyBlock bb (SC.wSessionChooser);
 
 	int ret = SC.open_selected_session();
 
@@ -207,7 +207,7 @@ bSessionChooserRemove_clicked_cb(
 	gtk_tree_model_get( model, &iter,
 			    0, &entry,
 			    -1);
-	// SC.sessions.remove_if( [&entry]( aghui::SSession& S) { return S == entry; });
+	// SC.sessions.remove_if( [&entry]( agh::ui::SSession& S) { return S == entry; });
 	gtk_list_store_remove( SC.mSessionChooserList, &iter);
 	SC._sync_model_to_list();
 
diff --git a/src/aghermann/ui/ui++.hh b/src/aghermann/ui/ui++.hh
index 67e65db..277c634 100644
--- a/src/aghermann/ui/ui++.hh
+++ b/src/aghermann/ui/ui++.hh
@@ -28,7 +28,8 @@
 using namespace std;
 
 
-namespace aghui {
+namespace agh {
+namespace ui {
 
 class SBusyBlock {
 	DELETE_DEFAULT_METHODS (SBusyBlock);
@@ -214,7 +215,8 @@ class SUIVarCollection {
 };
 
 
-} // namespace aghui
+}
+} // namespace agh::ui
 
 #endif
 
diff --git a/src/aghermann/ui/ui.hh b/src/aghermann/ui/ui.hh
index 9bcbc6c..1bf1088 100644
--- a/src/aghermann/ui/ui.hh
+++ b/src/aghermann/ui/ui.hh
@@ -31,7 +31,8 @@
 using namespace std;
 
 
-namespace aghui {
+namespace agh {
+namespace ui {
 
 
 struct SGeometry {
@@ -189,7 +190,8 @@ void set_cursor_busy( bool busy, GtkWidget *wid);
 #define G_CONNECT_3(W, A1, A2, A3)					\
 	g_signal_connect(W, #A1 "-" #A2 "-" #A3, (GCallback)W ## _ ## A1 ## _ ## A2 ## _ ## A3 ## _cb, this)
 
-} // namespace aghui
+}
+} // namespace agh::ui
 
 #endif
 
diff --git a/src/tools/edfhed-gtk.cc b/src/tools/edfhed-gtk.cc
index 091b394..c3ad970 100644
--- a/src/tools/edfhed-gtk.cc
+++ b/src/tools/edfhed-gtk.cc
@@ -146,7 +146,7 @@ main( int argc, char **argv)
 			printf( "Usage: %s file.edf\n", argv[0]);
 			return 0;
 		} else {
-			// aghui::pop_ok_message( NULL, "Usage: %s file.edf", argv[0]);
+			// agh::ui::pop_ok_message( NULL, "Usage: %s file.edf", argv[0]);
 			GtkWidget *f_chooser = gtk_file_chooser_dialog_new(
 				"edfhed-gtk: Choose a file to edit",
 				NULL,

-- 
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