[med-svn] [aghermann] 19/23: complete 8e00c4efbe829
andrei zavada
hmmr-guest at alioth.debian.org
Sat Aug 17 18:05:44 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 7c4cc2bbfdf3e07f9713af9386e409f39eb68ce2
Author: Andrei Zavada <johnhommer at gmail.com>
Date: Sun Aug 11 15:24:30 2013 +0300
complete 8e00c4efbe829
---
src/aghermann/expdesign/primaries.cc | 4 ++--
src/aghermann/expdesign/primaries.hh | 11 ++++-------
src/aghermann/expdesign/tree-scanner.cc | 2 +-
src/aghermann/ui/mw/admit-one.cc | 2 +-
src/aghermann/ui/mw/mainmenu_cb.cc | 2 +-
src/aghermann/ui/mw/measurements_cb.cc | 8 ++++----
src/aghermann/ui/mw/mw.cc | 4 ++--
src/aghermann/ui/mw/splash.cc | 2 +-
src/aghermann/ui/sf/d/patterns-profiles.cc | 2 +-
9 files changed, 17 insertions(+), 20 deletions(-)
diff --git a/src/aghermann/expdesign/primaries.cc b/src/aghermann/expdesign/primaries.cc
index 27db5c1..54d9db5 100644
--- a/src/aghermann/expdesign/primaries.cc
+++ b/src/aghermann/expdesign/primaries.cc
@@ -116,7 +116,7 @@ CExpDesign (const string& session_dir_,
if ( fs::exists_and_is_writable( session_dir()) == false )
throw invalid_argument (string("Experiment directory ") + _session_dir + " does not exist or is not writable");
- if ( chdir( session_dir().c_str()) == -1 )
+ if ( chdir( session_dir()) == -1 )
throw invalid_argument (string("Failed to cd to ") + _session_dir);
load_settings();
@@ -596,7 +596,7 @@ purge_cached_profiles()
return system(
agh::str::sasprintf(
"find '%s' \\( -name '.*.psd' -or -name '.*.mc' -or -name '.*.swu' \\) -delete",
- session_dir().c_str())
+ session_dir())
.c_str());
}
diff --git a/src/aghermann/expdesign/primaries.hh b/src/aghermann/expdesign/primaries.hh
index c7ee505..6c4d085 100644
--- a/src/aghermann/expdesign/primaries.hh
+++ b/src/aghermann/expdesign/primaries.hh
@@ -290,14 +290,11 @@ class CExpDesign {
}
int status() const
- {
- return _status;
- }
+ { return _status; }
- const string& session_dir() const
- {
- return _session_dir;
- }
+ const char*
+ session_dir() const
+ { return _session_dir.c_str(); }
string name() const // dirname
{
diff --git a/src/aghermann/expdesign/tree-scanner.cc b/src/aghermann/expdesign/tree-scanner.cc
index 70d1786..6d9f99a 100644
--- a/src/aghermann/expdesign/tree-scanner.cc
+++ b/src/aghermann/expdesign/tree-scanner.cc
@@ -345,7 +345,7 @@ scan_tree( TMsmtCollectProgressIndicatorFun user_progress_fun)
agh::fs::total_supported_sigfiles = 0;
nftw( "./", agh::fs::supported_sigfile_counter, 20, 0);
printf( "CExpDesign::scan_tree(\"%s\"): %zu edf file(s) found\n",
- session_dir().c_str(), agh::fs::total_supported_sigfiles);
+ session_dir(), agh::fs::total_supported_sigfiles);
if ( agh::fs::total_supported_sigfiles == 0 )
return;
diff --git a/src/aghermann/ui/mw/admit-one.cc b/src/aghermann/ui/mw/admit-one.cc
index 7a296a4..e24a00c 100644
--- a/src/aghermann/ui/mw/admit-one.cc
+++ b/src/aghermann/ui/mw/admit-one.cc
@@ -157,7 +157,7 @@ dnd_maybe_admit_one( const char* fname)
using agh::str::sasprintf;
dest_path = sasprintf(
"%s/%s/%s/%s",
- ED->session_dir().c_str(), selected_group,
+ ED->session_dir(), selected_group,
F.subject().id.c_str(), selected_session);
dest = sasprintf(
"%s/%s.edf",
diff --git a/src/aghermann/ui/mw/mainmenu_cb.cc b/src/aghermann/ui/mw/mainmenu_cb.cc
index 5f6d111..4b0e6cb 100644
--- a/src/aghermann/ui/mw/mainmenu_cb.cc
+++ b/src/aghermann/ui/mw/mainmenu_cb.cc
@@ -394,7 +394,7 @@ bGlobalMontageResetAll_clicked_cb(
auto& ED = *(SExpDesignUI*)userdata;
snprintf_buf( "find '%s' -name '.*.montage' -delete",
- ED.ED->session_dir().c_str());
+ ED.ED->session_dir());
if ( system( global::buf) )
pop_ok_message(
ED.wMainWindow,
diff --git a/src/aghermann/ui/mw/measurements_cb.cc b/src/aghermann/ui/mw/measurements_cb.cc
index 19dfbc6..0b95d03 100644
--- a/src/aghermann/ui/mw/measurements_cb.cc
+++ b/src/aghermann/ui/mw/measurements_cb.cc
@@ -242,7 +242,7 @@ iSubjectTimelineSaveAsSVG_activate_cb(
string tmp = agh::str::sasprintf(
"%s/%s/%s/%s/%s.svg",
- ED.ED->session_dir().c_str(), ED.ED->group_of( J->csubject.id), J->csubject.id.c_str(),
+ ED.ED->session_dir(), ED.ED->group_of( J->csubject.id), J->csubject.id.c_str(),
ED.AghD(), ED.AghT());
J->is_focused = true;
J->draw_timeline( tmp);
@@ -263,7 +263,7 @@ iSubjectTimelineBrowse_activate_cb(
if ( system( agh::str::sasprintf(
"%s '%s/%s/%s/%s' &",
ED.browse_command.c_str(),
- ED.ED->session_dir().c_str(), ED.ED->group_of( J->csubject.id), J->csubject.id.c_str(), ED.AghD())
+ ED.ED->session_dir(), ED.ED->group_of( J->csubject.id), J->csubject.id.c_str(), ED.AghD())
.c_str()) ) {
pop_ok_message(
ED.wMainWindow,
@@ -284,10 +284,10 @@ iSubjectTimelineResetMontage_activate_cb(
string exec = (not J->is_episode_focused())
? agh::str::sasprintf(
"find '%s/%s/%s/%s' -name '.*.montage' -delete",
- ED.ED->session_dir().c_str(), ED.ED->group_of( J->csubject.id), J->csubject.id.c_str(), ED.AghD())
+ ED.ED->session_dir(), ED.ED->group_of( J->csubject.id), J->csubject.id.c_str(), ED.AghD())
: agh::str::sasprintf(
"rm -f '%s/%s/%s/%s/.%s.montage'",
- ED.ED->session_dir().c_str(), ED.ED->group_of( J->csubject.id), J->csubject.id.c_str(), ED.AghD(), ED.AghE());
+ ED.ED->session_dir(), ED.ED->group_of( J->csubject.id), J->csubject.id.c_str(), ED.AghD(), ED.AghE());
if ( system( exec.c_str()) )
pop_ok_message(
diff --git a/src/aghermann/ui/mw/mw.cc b/src/aghermann/ui/mw/mw.cc
index 2f5e20d..d551253 100644
--- a/src/aghermann/ui/mw/mw.cc
+++ b/src/aghermann/ui/mw/mw.cc
@@ -317,7 +317,7 @@ void
SExpDesignUI::
load_artifact_detection_profiles()
{
- FILE *domien = fopen( (ED->session_dir() + "/.AD_profiles").c_str(), "r");
+ FILE *domien = fopen( (string(ED->session_dir()) + "/.AD_profiles").c_str(), "r");
if ( domien ) {
while ( !feof (domien) ) {
metrics::mc::SArtifactDetectionPP P;
@@ -363,7 +363,7 @@ save_artifact_detection_profiles() const
if ( global_artifact_detection_profiles.size() == 0 )
return;
- FILE *domien = fopen( (ED->session_dir() + "/.AD_profiles").c_str(), "w");
+ FILE *domien = fopen( (string(ED->session_dir()) + "/.AD_profiles").c_str(), "w");
if ( domien ) {
for ( auto &P : global_artifact_detection_profiles ) {
fprintf( domien, "%s\n", P.first.c_str());
diff --git a/src/aghermann/ui/mw/splash.cc b/src/aghermann/ui/mw/splash.cc
index c93dff0..10af910 100644
--- a/src/aghermann/ui/mw/splash.cc
+++ b/src/aghermann/ui/mw/splash.cc
@@ -138,7 +138,7 @@ try_download()
vte_terminal_fork_command_full(
tTerm,
VTE_PTY_DEFAULT,
- ED->session_dir().c_str(),
+ ED->session_dir(),
const_cast<char**> (argv),
NULL, // char **envv,
(GSpawnFlags)G_SPAWN_DO_NOT_REAP_CHILD, // GSpawnFlags spawn_flags,
diff --git a/src/aghermann/ui/sf/d/patterns-profiles.cc b/src/aghermann/ui/sf/d/patterns-profiles.cc
index 422fd40..17e6c76 100644
--- a/src/aghermann/ui/sf/d/patterns-profiles.cc
+++ b/src/aghermann/ui/sf/d/patterns-profiles.cc
@@ -103,7 +103,7 @@ make_user_patterns_location()
string
make_experiment_patterns_location( const agh::CExpDesign& ED)
{
- return agh::str::sasprintf( "%s/.patterns", ED.session_dir().c_str());
+ return agh::str::sasprintf( "%s/.patterns", ED.session_dir());
}
string
--
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