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
This commit is contained in:
Bart Hakvoort 2006-08-21 19:59:48 +00:00
parent ce9431824c
commit 82e6f6b132
4 changed files with 18 additions and 16 deletions

View File

@ -1,3 +1,10 @@
2006-08-21 Bart Hakvoort <hakvoort@cvs.gnome.org>
* 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 <hakvoort@cvs.gnome.org> 2006-08-20 Bart Hakvoort <hakvoort@cvs.gnome.org>
* src/Dialog_Progress.cc: enabled set_do_overwrite_confirmation() for * src/Dialog_Progress.cc: enabled set_do_overwrite_confirmation() for

View File

@ -29,7 +29,7 @@ int FileSystem::execute_command( const Glib::ustring & command, OperationDetail
{ {
operationdetail .add_child( OperationDetail( command, STATUS_NONE, FONT_BOLD_ITALIC ) ) ; 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() ) if ( ! output .empty() )
operationdetail .get_last_child() .add_child( OperationDetail( output, STATUS_NONE, FONT_ITALIC ) ) ; operationdetail .get_last_child() .add_child( OperationDetail( output, STATUS_NONE, FONT_ITALIC ) ) ;

View File

@ -38,24 +38,24 @@ OperationDetail::OperationDetail( const Glib::ustring & description, OperationDe
void OperationDetail::set_description( const Glib::ustring & description, Font font ) void OperationDetail::set_description( const Glib::ustring & description, Font font )
{ {
switch ( font ) switch ( font )
{ {
case FONT_NORMAL: case FONT_NORMAL:
this ->description = Glib::Markup::escape_text( description ) ; this ->description = Glib::Markup::escape_text( description ) ;
break ; break ;
case FONT_BOLD: case FONT_BOLD:
this ->description = "<b>" + Glib::Markup::escape_text( description ) + "</b>" ; this ->description = "<b>" + Glib::Markup::escape_text( description ) + "</b>" ;
break ; break ;
case FONT_ITALIC: case FONT_ITALIC:
this ->description = "<i>" + Glib::Markup::escape_text( description ) + "</i>" ; this ->description = "<i>" + Glib::Markup::escape_text( description ) + "</i>" ;
break ; break ;
case FONT_BOLD_ITALIC: case FONT_BOLD_ITALIC:
this ->description = "<b><i>" + Glib::Markup::escape_text( description ) + "</i></b>" ; this ->description = "<b><i>" + Glib::Markup::escape_text( description ) + "</i></b>" ;
break ; break ;
} }
if ( ! treepath .empty() ) if ( ! treepath .empty() )
on_update( *this ) ; on_update( *this ) ;
} }
Glib::ustring OperationDetail::get_description() const Glib::ustring OperationDetail::get_description() const

View File

@ -221,12 +221,7 @@ int Utils::execute_command( const Glib::ustring & command,
&exit_status ) ; &exit_status ) ;
} }
else 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 ) catch ( Glib::Exception & e )
{ {