Rename method to Dialog_Progress::write_operation_details()

And update comment about replacing '\n' to reflect what the code
actually does.
This commit is contained in:
Mike Fleetwood 2019-04-07 16:08:14 +01:00 committed by Curtis Gedak
parent f779002972
commit 4ccee8063c
2 changed files with 6 additions and 6 deletions

View File

@ -54,8 +54,8 @@ private:
void on_save() ;
void write_device_details(const Device& device, std::ofstream& out);
void write_partition_details(const Partition& partition, std::ofstream& out);
void echo_operation_details( const OperationDetail & operation_detail, std::ofstream & out ) ;
void write_operation_details(const OperationDetail& operation_detail, std::ofstream& out);
void on_response( int response_id ) ;
bool on_delete_event( GdkEventAny * event ) ;
bool pulsebar_pulse();

View File

@ -406,7 +406,7 @@ void Dialog_Progress::on_save()
for ( unsigned int t = 0 ; t < operations .size() ; t++ )
{
out << "<p>========================================</p>" << std::endl;
echo_operation_details(operations[t]->operation_detail, out);
write_operation_details(operations[t]->operation_detail, out);
}
//Write out proper HTML finish
@ -493,9 +493,9 @@ void Dialog_Progress::write_partition_details(const Partition& partition, std::o
}
void Dialog_Progress::echo_operation_details( const OperationDetail & operationdetail, std::ofstream & out )
void Dialog_Progress::write_operation_details(const OperationDetail& operationdetail, std::ofstream& out)
{
//replace '\n' with '<br>'
// Replace '\n' with '<br />'
Glib::ustring temp = operationdetail .get_description() ;
for ( unsigned int index = temp .find( "\n" ) ; index < temp .length() ; index = temp .find( "\n" ) )
temp .replace( index, 1, "<br />" ) ;
@ -573,7 +573,7 @@ void Dialog_Progress::echo_operation_details( const OperationDetail & operationd
<< "<td>" << std::endl ;
for ( unsigned int t = 0 ; t < operationdetail .get_childs() .size() ; t++ )
echo_operation_details( *(operationdetail.get_childs()[ t ]), out );
write_operation_details(*(operationdetail.get_childs()[t]), out);
out << "</td>" << std::endl << "</tr>" << std::endl ;
}