From 465e30c0b762ed9fed156ec7b7e3e4d1c3b9375a Mon Sep 17 00:00:00 2001 From: Curtis Gedak Date: Wed, 24 Sep 2008 23:42:04 +0000 Subject: [PATCH] Enhanced detail log gparted_details.htm to pass HTML validator svn path=/trunk/; revision=912 --- ChangeLog | 7 +++++++ src/Dialog_Progress.cc | 22 ++++++++++++++++++---- 2 files changed, 25 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3efd0a36..b34b5e94 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-09-24 Curtis Gedak + + * src/Dialog_Progress.cc: Added proper HTML start and finish. + - gparted_details.htm now passes as HTML 4.0 Transitional + in the validator found at http://validator.w3.org/ + - Closes GParted bug #525347 + 2008-09-22 Curtis Gedak * configure.in, diff --git a/src/Dialog_Progress.cc b/src/Dialog_Progress.cc index 6298fbe7..df032029 100644 --- a/src/Dialog_Progress.cc +++ b/src/Dialog_Progress.cc @@ -344,14 +344,28 @@ void Dialog_Progress::on_save() std::ofstream out( dialog .get_filename() .c_str() ) ; if ( out ) { + //Write out proper HTML start + out << "" ; + out << "" ; + out << "" ; + out << " " ; + out << " GParted Details" ; + out << "" ; + out << "" ; + + out << "

" ; out << "GParted " << VERSION << "

" << std::endl ; - out << "Libparted " << signal_get_libparted_version .emit() << "

" << std::endl ; + out << "Libparted " << signal_get_libparted_version .emit() ; + out << "

" << std::endl ; for ( unsigned int t = 0 ; t < operations .size() ; t++ ) { echo_operation_details( operations[ t ] ->operation_detail, out ) ; - out << "
========================================

" << std::endl ; + out << "

========================================

" << std::endl ; } - + + //Write out proper HTML finish + out << "" ; + out << "" ; out .close() ; } } @@ -362,7 +376,7 @@ void Dialog_Progress::echo_operation_details( const OperationDetail & operationd //replace '\n' with '
' Glib::ustring temp = operationdetail .get_description() ; for ( unsigned int index = temp .find( "\n" ) ; index < temp .length() ; index = temp .find( "\n" ) ) - temp .replace( index, 1, "
" ) ; + temp .replace( index, 1, "
" ) ; //and export everything to some kind of html... out << "" << std::endl ;