From 82e6f6b132fd7960950a71a2af2db6ef93fde583 Mon Sep 17 00:00:00 2001 From: Bart Hakvoort Date: Mon, 21 Aug 2006 19:59:48 +0000 Subject: [PATCH] added nice -n 19, so that all extensive filesystemoperations will be * src/FileSystem.cc: added nice -n 19, so that all extensive filesystemoperations will be 'nice' :) * src/OperationDetail.cc, src/Utils.cc: cleanups --- ChangeLog | 7 +++++++ src/FileSystem.cc | 2 +- src/OperationDetail.cc | 18 +++++++++--------- src/Utils.cc | 7 +------ 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index a48fb6a4..aef62c24 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-08-21 Bart Hakvoort + + * src/FileSystem.cc: added nice -n 19, so that all extensive + filesystemoperations will be 'nice' :) + * src/OperationDetail.cc, + src/Utils.cc: cleanups + 2006-08-20 Bart Hakvoort * src/Dialog_Progress.cc: enabled set_do_overwrite_confirmation() for diff --git a/src/FileSystem.cc b/src/FileSystem.cc index 5dd8d15b..6269424b 100644 --- a/src/FileSystem.cc +++ b/src/FileSystem.cc @@ -29,7 +29,7 @@ int FileSystem::execute_command( const Glib::ustring & command, OperationDetail { operationdetail .add_child( OperationDetail( command, STATUS_NONE, FONT_BOLD_ITALIC ) ) ; - int exit_status = Utils::execute_command( command, output, error ) ; + int exit_status = Utils::execute_command( "nice -n 19 " + command, output, error ) ; if ( ! output .empty() ) operationdetail .get_last_child() .add_child( OperationDetail( output, STATUS_NONE, FONT_ITALIC ) ) ; diff --git a/src/OperationDetail.cc b/src/OperationDetail.cc index ce0bb4df..f3706f4d 100644 --- a/src/OperationDetail.cc +++ b/src/OperationDetail.cc @@ -38,24 +38,24 @@ OperationDetail::OperationDetail( const Glib::ustring & description, OperationDe void OperationDetail::set_description( const Glib::ustring & description, Font font ) { - switch ( font ) - { - case FONT_NORMAL: + switch ( font ) + { + case FONT_NORMAL: this ->description = Glib::Markup::escape_text( description ) ; break ; - case FONT_BOLD: + case FONT_BOLD: this ->description = "" + Glib::Markup::escape_text( description ) + "" ; break ; - case FONT_ITALIC: + case FONT_ITALIC: this ->description = "" + Glib::Markup::escape_text( description ) + "" ; break ; - case FONT_BOLD_ITALIC: + case FONT_BOLD_ITALIC: this ->description = "" + Glib::Markup::escape_text( description ) + "" ; break ; - } + } - if ( ! treepath .empty() ) - on_update( *this ) ; + if ( ! treepath .empty() ) + on_update( *this ) ; } Glib::ustring OperationDetail::get_description() const diff --git a/src/Utils.cc b/src/Utils.cc index dac1692c..28154e7d 100644 --- a/src/Utils.cc +++ b/src/Utils.cc @@ -221,12 +221,7 @@ int Utils::execute_command( const Glib::ustring & command, &exit_status ) ; } else - { - Glib::spawn_command_line_sync( "sh -c '" + command + "'", - &std_out, - &std_error, - &exit_status ) ; - } + Glib::spawn_command_line_sync( "sh -c '" + command + "'", &std_out, &std_error, &exit_status ) ; } catch ( Glib::Exception & e ) {