From 934b348b84fe6cb6c7cdc0d48d0c454d420293db Mon Sep 17 00:00:00 2001 From: Bart Hakvoort Date: Sat, 28 Jan 2006 15:09:50 +0000 Subject: [PATCH] added markup to operationdetails * include/Dialog_Progress.h, src/Dialog_Progress.cc, src/FileSystem.cc: added markup to operationdetails --- ChangeLog | 6 ++++++ include/Dialog_Progress.h | 1 + src/Dialog_Progress.cc | 11 ++++++++++- src/FileSystem.cc | 6 +++--- 4 files changed, 20 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9a5e2a44..2155d2a3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-01-28 Bart Hakvoort + + * include/Dialog_Progress.h, + src/Dialog_Progress.cc, + src/FileSystem.cc: added markup to operationdetails + 2006-01-26 Bart Hakvoort * include/Dialog_Progress.h, diff --git a/include/Dialog_Progress.h b/include/Dialog_Progress.h index 2bcff4cf..67c3c7b0 100644 --- a/include/Dialog_Progress.h +++ b/include/Dialog_Progress.h @@ -44,6 +44,7 @@ private: void update_operation_details( const Gtk::TreeRow & treerow, const OperationDetails & operation_details ) ; void on_signal_show() ; void on_expander_changed() ; + void on_cell_data_description( Gtk::CellRenderer * renderer, const Gtk::TreeModel::iterator & iter) ; static void *static_pthread_apply_operation( void * p_dialog_progress ) ; void on_cancel() ; diff --git a/src/Dialog_Progress.cc b/src/Dialog_Progress.cc index d7c77e1d..4b06a811 100644 --- a/src/Dialog_Progress.cc +++ b/src/Dialog_Progress.cc @@ -74,12 +74,15 @@ Dialog_Progress::Dialog_Progress( const std::vector & operations ) { treerow = *( treestore_operations ->append() ); treerow[ treeview_operations_columns .operation_icon ] = operations[ t ] .operation_icon ; - treerow[ treeview_operations_columns .operation_description ] = operations[ t ] .str_operation ; + treerow[ treeview_operations_columns .operation_description ] = "" + operations[ t ] .str_operation + "" ; this ->operations[ t ] .operation_details .description = operations[ t ] .str_operation ; } treeview_operations .get_column( 1 ) ->set_expand( true ) ; + treeview_operations .get_column( 1 ) ->set_cell_data_func( + * ( treeview_operations .get_column( 1 ) ->get_first_cell_renderer() ), + sigc::mem_fun(*this, &Dialog_Progress::on_cell_data_description) ) ; scrolledwindow .set_shadow_type( Gtk::SHADOW_ETCHED_IN ) ; scrolledwindow .set_policy( Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC ) ; @@ -241,6 +244,12 @@ void Dialog_Progress::on_expander_changed() this ->set_resizable( expander_details .get_expanded() ) ; } +void Dialog_Progress::on_cell_data_description( Gtk::CellRenderer * renderer, const Gtk::TreeModel::iterator & iter ) +{ + dynamic_cast( renderer ) ->property_markup() = + static_cast( * iter )[ treeview_operations_columns .operation_description ] ; +} + void * Dialog_Progress::static_pthread_apply_operation( void * p_dialog_progress ) { Dialog_Progress *dp = static_cast( p_dialog_progress ) ; diff --git a/src/FileSystem.cc b/src/FileSystem.cc index 3920143c..66439d2a 100644 --- a/src/FileSystem.cc +++ b/src/FileSystem.cc @@ -32,7 +32,7 @@ int FileSystem::execute_command( std::vector argv, std::vector" + temp + "", OperationDetails::NONE ) ) ; try { @@ -53,10 +53,10 @@ int FileSystem::execute_command( std::vector argv, std::vector" + output + "", OperationDetails::NONE ) ) ; if ( ! error .empty() ) - operation_details .back() .sub_details .push_back( OperationDetails( error, OperationDetails::NONE ) ) ; + operation_details .back() .sub_details .push_back( OperationDetails( "" + error + "", OperationDetails::NONE ) ) ; return exit_status ; }