added markup to operationdetails
* include/Dialog_Progress.h, src/Dialog_Progress.cc, src/FileSystem.cc: added markup to operationdetails
This commit is contained in:
parent
ca3bcaa096
commit
934b348b84
|
@ -1,3 +1,9 @@
|
||||||
|
2006-01-28 Bart Hakvoort <hakvoort@cvs.gnome.org>
|
||||||
|
|
||||||
|
* include/Dialog_Progress.h,
|
||||||
|
src/Dialog_Progress.cc,
|
||||||
|
src/FileSystem.cc: added markup to operationdetails
|
||||||
|
|
||||||
2006-01-26 Bart Hakvoort <hakvoort@cvs.gnome.org>
|
2006-01-26 Bart Hakvoort <hakvoort@cvs.gnome.org>
|
||||||
|
|
||||||
* include/Dialog_Progress.h,
|
* include/Dialog_Progress.h,
|
||||||
|
|
|
@ -44,6 +44,7 @@ private:
|
||||||
void update_operation_details( const Gtk::TreeRow & treerow, const OperationDetails & operation_details ) ;
|
void update_operation_details( const Gtk::TreeRow & treerow, const OperationDetails & operation_details ) ;
|
||||||
void on_signal_show() ;
|
void on_signal_show() ;
|
||||||
void on_expander_changed() ;
|
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 ) ;
|
static void *static_pthread_apply_operation( void * p_dialog_progress ) ;
|
||||||
void on_cancel() ;
|
void on_cancel() ;
|
||||||
|
|
||||||
|
|
|
@ -74,12 +74,15 @@ Dialog_Progress::Dialog_Progress( const std::vector<Operation> & operations )
|
||||||
{
|
{
|
||||||
treerow = *( treestore_operations ->append() );
|
treerow = *( treestore_operations ->append() );
|
||||||
treerow[ treeview_operations_columns .operation_icon ] = operations[ t ] .operation_icon ;
|
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 ] = "<b>" + operations[ t ] .str_operation + "</b>" ;
|
||||||
|
|
||||||
this ->operations[ t ] .operation_details .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_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_shadow_type( Gtk::SHADOW_ETCHED_IN ) ;
|
||||||
scrolledwindow .set_policy( Gtk::POLICY_AUTOMATIC, Gtk::POLICY_AUTOMATIC ) ;
|
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() ) ;
|
this ->set_resizable( expander_details .get_expanded() ) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Dialog_Progress::on_cell_data_description( Gtk::CellRenderer * renderer, const Gtk::TreeModel::iterator & iter )
|
||||||
|
{
|
||||||
|
dynamic_cast<Gtk::CellRendererText *>( renderer ) ->property_markup() =
|
||||||
|
static_cast<Gtk::TreeRow>( * iter )[ treeview_operations_columns .operation_description ] ;
|
||||||
|
}
|
||||||
|
|
||||||
void * Dialog_Progress::static_pthread_apply_operation( void * p_dialog_progress )
|
void * Dialog_Progress::static_pthread_apply_operation( void * p_dialog_progress )
|
||||||
{
|
{
|
||||||
Dialog_Progress *dp = static_cast<Dialog_Progress *>( p_dialog_progress ) ;
|
Dialog_Progress *dp = static_cast<Dialog_Progress *>( p_dialog_progress ) ;
|
||||||
|
|
|
@ -32,7 +32,7 @@ int FileSystem::execute_command( std::vector<std::string> argv, std::vector<Oper
|
||||||
for ( unsigned int t = 0 ; t < argv .size() ; t++ )
|
for ( unsigned int t = 0 ; t < argv .size() ; t++ )
|
||||||
temp += argv[ t ] + " " ;
|
temp += argv[ t ] + " " ;
|
||||||
|
|
||||||
operation_details .push_back( OperationDetails( temp, OperationDetails::NONE ) ) ;
|
operation_details .push_back( OperationDetails( "<b><i>" + temp + "</i></b>", OperationDetails::NONE ) ) ;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
@ -53,10 +53,10 @@ int FileSystem::execute_command( std::vector<std::string> argv, std::vector<Oper
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( ! output .empty() )
|
if ( ! output .empty() )
|
||||||
operation_details .back() .sub_details .push_back( OperationDetails( output, OperationDetails::NONE ) ) ;
|
operation_details .back() .sub_details .push_back( OperationDetails( "<i>" + output + "</i>", OperationDetails::NONE ) ) ;
|
||||||
|
|
||||||
if ( ! error .empty() )
|
if ( ! error .empty() )
|
||||||
operation_details .back() .sub_details .push_back( OperationDetails( error, OperationDetails::NONE ) ) ;
|
operation_details .back() .sub_details .push_back( OperationDetails( "<i>" + error + "</i>", OperationDetails::NONE ) ) ;
|
||||||
|
|
||||||
return exit_status ;
|
return exit_status ;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue