diff --git a/ChangeLog b/ChangeLog index 804290b6..8a5bf82b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2006-09-09 Bart Hakvoort + + * include/Dialog_Progress.h, + src/Dialog_Progress.cc: Show number of warnings after all operations + are completed. Also urge people to save their details in case of + error. + 2006-09-09 Bart Hakvoort * include/Frame_Resizer_Base.h, diff --git a/include/Dialog_Progress.h b/include/Dialog_Progress.h index 38e5a9e7..e37cee20 100644 --- a/include/Dialog_Progress.h +++ b/include/Dialog_Progress.h @@ -92,7 +92,7 @@ private: bool running, succes, cancel, pulse ; pthread_t pthread ; double fraction ; - unsigned int t ; + unsigned int t, warnings ; Glib::ustring str_temp ; Glib::Dispatcher dispatcher_update_gui_elements ; diff --git a/src/Dialog_Progress.cc b/src/Dialog_Progress.cc index c356bdf5..d58b6758 100644 --- a/src/Dialog_Progress.cc +++ b/src/Dialog_Progress.cc @@ -33,6 +33,7 @@ Dialog_Progress::Dialog_Progress( const std::vector & operations ) this ->operations = operations ; succes = true ; cancel = false ; + warnings = 0 ; fraction = 1.00 / operations .size() ; @@ -139,6 +140,7 @@ void Dialog_Progress::on_signal_update( const OperationDetail & operationdetail break ; case STATUS_N_A: treerow[ treeview_operations_columns .status_icon ] = icon_n_a ; + warnings++ ; break ; case STATUS_NONE: static_cast< Glib::RefPtr >( @@ -247,8 +249,12 @@ void Dialog_Progress::on_signal_show() //deal with succes/error... if ( succes ) { - //FIXME: display amount of warnings between braces after this text, deal properly with plurality - progressbar_all .set_text( _("All operations succesfully completed") ) ; + str_temp = _("All operations succesfully completed") ; + + if ( warnings > 0 ) + str_temp += " (" + String::ucompose( _("%1 warnings"), warnings ) + ")" ; + + progressbar_all .set_text( str_temp ) ; progressbar_all .set_fraction( 1.0 ) ; } else @@ -263,11 +269,11 @@ void Dialog_Progress::on_signal_show() Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true ) ; - str_temp = _("The following operation could not be applied to disk:") ; - str_temp += "\n\n" ; - str_temp += label_current .get_text() ; - str_temp += "\n" ; - str_temp += _("See the details for more information") ; + str_temp = _("See the details for more information.") ; + str_temp += "\n\n" + Glib::ustring( _("IMPORTANT") ) + "\n" ; + str_temp += _("If you want support, you need to provide the saved details!") ; + str_temp += "\n" + String::ucompose( + _("See %1 for more information."), "http://gparted.sourceforge.net/larry/tips/save_details.htm" ) + "" ; dialog .set_secondary_text( str_temp, true ) ; dialog .run() ;