[med-svn] [SCM] aghermann branch, master, updated. 4f7a3b774136ffffbaf9b05d90bd568347bc5461
andrei zavada
johnhommer at gmail.com
Fri Nov 16 00:50:21 UTC 2012
The following commit has been merged in the master branch:
commit efdfc61fc4e8b5a92b9c7fb7967d69c384fb80ad
Author: andrei zavada <johnhommer at gmail.com>
Date: Wed Oct 17 02:28:22 2012 +0300
WIP
diff --git a/src/ui/expdesign-construct.cc b/src/ui/expdesign-construct.cc
index d26d576..af24264 100644
--- a/src/ui/expdesign-construct.cc
+++ b/src/ui/expdesign-construct.cc
@@ -662,6 +662,10 @@ SExpDesignUIWidgets ()
(GCallback)bColourX_color_set_cb,
&C.second);
}
+ // get CwB color values from glade
+ for ( auto &C : CwB )
+ g_signal_emit_by_name( C.second.btn, "color-set");
+
// ========= child widgets
// ----- wAbout
diff --git a/src/ui/expdesign.cc b/src/ui/expdesign.cc
index 9f98d59..c410a7b 100644
--- a/src/ui/expdesign.cc
+++ b/src/ui/expdesign.cc
@@ -171,10 +171,6 @@ SExpDesignUI (aghui::SSessionChooser *parent,
{
nodestroy_by_cb = true;
- // scrub colors, get CwB color values from glade
- for ( auto &C : CwB )
- g_signal_emit_by_name( C.second.btn, "color-set");
-
set_wMainWindow_interactive( false);
gtk_widget_show_all( (GtkWidget*)wMainWindow);
@@ -209,7 +205,6 @@ SExpDesignUI (aghui::SSessionChooser *parent,
W_V.reg( eBand[i][0], &freq_bands[i][0]);
W_V.reg( eBand[i][1], &freq_bands[i][1]);
}
- // General tab
W_V.reg( eDAMsmtPPH, (int*)&timeline_pph);
W_V.reg( eDAMsmtTLHeight, (int*)&timeline_height);
W_V.reg( eDAPageHeight, (int*)&SScoringFacility::IntersignalSpace);
@@ -217,7 +212,6 @@ SExpDesignUI (aghui::SSessionChooser *parent,
W_V.reg( eDAEMGHeight, (int*)&SScoringFacility::EMGProfileHeight);
W_V.reg( eBrowseCommand, &browse_command);
-
// set _saved, too
fft_params_welch_window_type_saved = ED->fft_params.welch_window_type;
af_dampen_window_type_saved = ED->af_dampen_window_type;
@@ -260,10 +254,8 @@ figure_binsize_item()
aghui::SExpDesignUI::
~SExpDesignUI ()
{
- printf( "~SExpDesignUI(\"%s\")\n", ED->session_dir());
- delete ED;
-
save_settings();
+ delete ED;
}
@@ -340,6 +332,7 @@ populate( bool do_load)
populate_mChannels();
populate_mSessions();
populate_mGlobalAnnotations();
+ populate_mGlobalADProfiles();
populate_1();
if ( display_profile_type == sigfile::TMetricType::Psd ) {
@@ -391,6 +384,7 @@ depopulate( bool do_save)
gtk_list_store_clear( mAllChannels);
gtk_list_store_clear( mEEGChannels);
gtk_tree_store_clear( mGlobalAnnotations);
+ gtk_list_store_clear( mGlobalADProfiles);
__reconnect_sessions_combo();
g_signal_handler_unblock( eMsmtSession, eMsmtSession_changed_cb_handler_id);
@@ -648,6 +642,13 @@ populate_mGlobalAnnotations()
+void
+aghui::SExpDesignUI::
+populate_mGlobalADProfiles()
+{
+
+}
+
void
diff --git a/src/ui/expdesign.hh b/src/ui/expdesign.hh
index 50f3f12..606f494 100644
--- a/src/ui/expdesign.hh
+++ b/src/ui/expdesign.hh
@@ -233,7 +233,7 @@ class SExpDesignUI
{}
};
map<string, SDetectArtifactsParamPack>
- artifact_detection_profiles;
+ global_artifact_detection_profiles;
// own variables aka saved settings
sigfile::TMetricType
@@ -339,6 +339,7 @@ class SExpDesignUI
void populate_mSessions();
void populate_mChannels();
void populate_mGlobalAnnotations();
+ void populate_mGlobalADProfiles();
void __adjust_op_freq_spinbuttons();
void __reconnect_channels_combo();
void __reconnect_sessions_combo();
diff --git a/src/ui/libcommon.cc b/src/ui/libcommon.cc
index 5123052..69494f3 100644
--- a/src/ui/libcommon.cc
+++ b/src/ui/libcommon.cc
@@ -16,6 +16,7 @@
#include "globals.hh"
#include "misc.hh"
#include "ui.hh"
+#include "ui++.hh"
using namespace std;
@@ -295,5 +296,37 @@ set_cursor_busy( bool busy, GtkWidget *wid)
}
+namespace aghui {
+
+template <> void
+SUIVar_<GtkListStore, list<string>>::up() const
+{
+ gtk_list_store_clear( w);
+ GtkTreeIter iter;
+ for ( auto& s : *v ) {
+ gtk_list_store_append( w, &iter);
+ gtk_list_store_set( w, &iter,
+ 1, s.c_str(),
+ -1);
+ }
+}
+template <> void
+SUIVar_<GtkListStore, list<string>>::down() const
+{
+ v->clear();
+ GtkTreeIter
+ iter;
+ gchar *entry;
+ while ( gtk_tree_model_get_iter_first( (GtkTreeModel*)w, &iter) ) {
+ gtk_tree_model_get( (GtkTreeModel*)w, &iter,
+ 1, &entry,
+ -1);
+ v->emplace_back( entry);
+ g_free( entry);
+ }
+}
+
+} // namespace aghui
+
// eof
diff --git a/src/ui/ui++.hh b/src/ui/ui++.hh
index 6485d27..20a56c5 100644
--- a/src/ui/ui++.hh
+++ b/src/ui/ui++.hh
@@ -166,6 +166,11 @@ class SUIVarCollection {
{
c.push_back( new SUIVar_<GtkEntry, string> (w, v));
}
+ // odd one out
+ void reg( GtkListStore *m, list<string> *l)
+ {
+ c.push_back( new SUIVar_<GtkListStore, list<string>> (m, l));
+ }
void up() const
{
--
Sleep experiment manager
More information about the debian-med-commit
mailing list