[med-svn] [aghermann] 12/24: ui/mw: organize delete_all_montages()
andrei zavada
hmmr-guest at moszumanska.debian.org
Mon Jun 15 01:48:25 UTC 2015
This is an automated email from the git hooks/post-receive script.
hmmr-guest pushed a commit to branch WIP
in repository aghermann.
commit 806f0e340f9b5d795a8c67d8465082105573a5f1
Author: Andrei Zavada <hmmr at ra>
Date: Sun Jun 14 20:08:12 2015 +0300
ui/mw: organize delete_all_montages()
---
upstream/src/aghermann/ui/mw/mainmenu_cb.cc | 7 +------
upstream/src/aghermann/ui/mw/mw.cc | 22 +++++++++++++++++++---
upstream/src/aghermann/ui/mw/mw.hh | 1 +
3 files changed, 21 insertions(+), 9 deletions(-)
diff --git a/upstream/src/aghermann/ui/mw/mainmenu_cb.cc b/upstream/src/aghermann/ui/mw/mainmenu_cb.cc
index f86b331..7487679 100644
--- a/upstream/src/aghermann/ui/mw/mainmenu_cb.cc
+++ b/upstream/src/aghermann/ui/mw/mainmenu_cb.cc
@@ -582,12 +582,7 @@ bGlobalMontageResetAll_clicked_cb(
{
auto& ED = *(SExpDesignUI*)userdata;
- snprintf_buf( "find '%s' -name '.*.montage' -delete",
- ED.ED->session_dir());
- if ( system( global::buf) )
- pop_ok_message(
- ED.wMainWindow,
- "How strange!", "Command '%s' returned a non-zero status. This is weird.", global::buf);
+ ED.do_delete_all_montages();
}
diff --git a/upstream/src/aghermann/ui/mw/mw.cc b/upstream/src/aghermann/ui/mw/mw.cc
index d679500..b228cc5 100644
--- a/upstream/src/aghermann/ui/mw/mw.cc
+++ b/upstream/src/aghermann/ui/mw/mw.cc
@@ -19,6 +19,7 @@
#include "libmetrics/mc-artifacts.hh"
#include "libmetrics/bands.hh"
//#include "aghermann/expdesign/expdesign.hh"
+#include "aghermann/globals.hh"
#include "aghermann/model/beersma.hh"
#include "aghermann/ui/misc.hh"
#include "aghermann/ui/sf/sf.hh"
@@ -374,11 +375,26 @@ do_purge_computed()
SBusyBlock bb (wMainWindow);
if ( ED->purge_cached_profiles() ) {
- fprintf( stderr, "Command '%s' returned a non-zero status. This is suspicious.\n", ui::global::buf);
+ APPLOG_WARN( "Command '%s' returned a non-zero status. This is suspicious.\n", ui::global::buf);
sb_message( "Failed to purge cache files. This is odd.");
- }
+ } else
+ sb_message( "Purged computed files cache");
+}
+
- sb_message( "Purged computed files cache");
+void
+SExpDesignUI::
+do_delete_all_montages()
+{
+ SBusyBlock bb (wMainWindow);
+
+ snprintf_buf( "find '%s' -name '.*.montage' -delete",
+ ED->session_dir());
+ if ( system( global::buf) ) {
+ APPLOG_WARN( "Command '%s' returned a non-zero status. This is suspicious.\n", ui::global::buf);
+ sb_message( "Failed to purge cache files. This is odd.");
+ } else
+ sb_message( "Reset all montages");
}
diff --git a/upstream/src/aghermann/ui/mw/mw.hh b/upstream/src/aghermann/ui/mw/mw.hh
index 4827111..da5a758 100644
--- a/upstream/src/aghermann/ui/mw/mw.hh
+++ b/upstream/src/aghermann/ui/mw/mw.hh
@@ -154,6 +154,7 @@ class SExpDesignUI
void cleanup_2();
void do_rescan_tree( bool with_progress_bar = true);
void do_purge_computed();
+ void do_delete_all_montages();
void do_detect_ultradian_cycle( agh::CRecording&);
void show_empty_experiment_blurb();
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/aghermann.git
More information about the debian-med-commit
mailing list