Show number of warnings after all operations are completed. Also urge
* 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.
This commit is contained in:
parent
f8daab782c
commit
7044410a08
|
@ -1,3 +1,10 @@
|
||||||
|
2006-09-09 Bart Hakvoort <hakvoort@cvs.gnome.org>
|
||||||
|
|
||||||
|
* 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 <hakvoort@cvs.gnome.org>
|
2006-09-09 Bart Hakvoort <hakvoort@cvs.gnome.org>
|
||||||
|
|
||||||
* include/Frame_Resizer_Base.h,
|
* include/Frame_Resizer_Base.h,
|
||||||
|
|
|
@ -92,7 +92,7 @@ private:
|
||||||
bool running, succes, cancel, pulse ;
|
bool running, succes, cancel, pulse ;
|
||||||
pthread_t pthread ;
|
pthread_t pthread ;
|
||||||
double fraction ;
|
double fraction ;
|
||||||
unsigned int t ;
|
unsigned int t, warnings ;
|
||||||
Glib::ustring str_temp ;
|
Glib::ustring str_temp ;
|
||||||
|
|
||||||
Glib::Dispatcher dispatcher_update_gui_elements ;
|
Glib::Dispatcher dispatcher_update_gui_elements ;
|
||||||
|
|
|
@ -33,6 +33,7 @@ Dialog_Progress::Dialog_Progress( const std::vector<Operation *> & operations )
|
||||||
this ->operations = operations ;
|
this ->operations = operations ;
|
||||||
succes = true ;
|
succes = true ;
|
||||||
cancel = false ;
|
cancel = false ;
|
||||||
|
warnings = 0 ;
|
||||||
|
|
||||||
fraction = 1.00 / operations .size() ;
|
fraction = 1.00 / operations .size() ;
|
||||||
|
|
||||||
|
@ -139,6 +140,7 @@ void Dialog_Progress::on_signal_update( const OperationDetail & operationdetail
|
||||||
break ;
|
break ;
|
||||||
case STATUS_N_A:
|
case STATUS_N_A:
|
||||||
treerow[ treeview_operations_columns .status_icon ] = icon_n_a ;
|
treerow[ treeview_operations_columns .status_icon ] = icon_n_a ;
|
||||||
|
warnings++ ;
|
||||||
break ;
|
break ;
|
||||||
case STATUS_NONE:
|
case STATUS_NONE:
|
||||||
static_cast< Glib::RefPtr<Gdk::Pixbuf> >(
|
static_cast< Glib::RefPtr<Gdk::Pixbuf> >(
|
||||||
|
@ -247,8 +249,12 @@ void Dialog_Progress::on_signal_show()
|
||||||
//deal with succes/error...
|
//deal with succes/error...
|
||||||
if ( succes )
|
if ( succes )
|
||||||
{
|
{
|
||||||
//FIXME: display amount of warnings between braces after this text, deal properly with plurality
|
str_temp = _("All operations succesfully completed") ;
|
||||||
progressbar_all .set_text( _("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 ) ;
|
progressbar_all .set_fraction( 1.0 ) ;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -263,11 +269,11 @@ void Dialog_Progress::on_signal_show()
|
||||||
Gtk::MESSAGE_ERROR,
|
Gtk::MESSAGE_ERROR,
|
||||||
Gtk::BUTTONS_OK,
|
Gtk::BUTTONS_OK,
|
||||||
true ) ;
|
true ) ;
|
||||||
str_temp = _("The following operation could not be applied to disk:") ;
|
str_temp = _("See the details for more information.") ;
|
||||||
str_temp += "\n\n<i>" ;
|
str_temp += "\n\n<i><b>" + Glib::ustring( _("IMPORTANT") ) + "</b>\n" ;
|
||||||
str_temp += label_current .get_text() ;
|
str_temp += _("If you want support, you need to provide the saved details!") ;
|
||||||
str_temp += "</i>\n" ;
|
str_temp += "\n" + String::ucompose(
|
||||||
str_temp += _("See the details for more information") ;
|
_("See %1 for more information."), "http://gparted.sourceforge.net/larry/tips/save_details.htm" ) + "</i>" ;
|
||||||
|
|
||||||
dialog .set_secondary_text( str_temp, true ) ;
|
dialog .set_secondary_text( str_temp, true ) ;
|
||||||
dialog .run() ;
|
dialog .run() ;
|
||||||
|
|
Loading…
Reference in New Issue