From a11ddd749653d60527a9b6e36deb8c71b8d0cea1 Mon Sep 17 00:00:00 2001 From: Bart Hakvoort Date: Wed, 19 Jul 2006 19:02:18 +0000 Subject: [PATCH] added some progressfeedback * src/GParted_Core.cc: added some progressfeedback --- ChangeLog | 4 ++++ src/GParted_Core.cc | 18 ++++++++++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 3fd57fc2..d7da9cd3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2006-07-19 Bart Hakvoort + + * src/GParted_Core.cc: added some progressfeedback + 2006-07-19 Bart Hakvoort * src/xfs.cc: fixed potential crasher in read algorithm (#347914) diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc index 7ec54e3e..4d33a2e2 100644 --- a/src/GParted_Core.cc +++ b/src/GParted_Core.cc @@ -1130,13 +1130,23 @@ bool GParted_Core::move_filesystem( const Partition & partition_old, Partition & partition_new, std::vector & operation_details ) { - //FIXME: i think it's best if we check at this level (in each function) if there are real changes. - //if not, then display the suboperation (in this case 'move filesystem') and add a child (italic) with - //something like 'new and old partition have the same positition. skipping move' and return true.. if ( partition_new .sector_start < partition_old .sector_start ) operation_details .push_back( OperationDetails( _("move filesystem to the left") ) ) ; - else + else if ( partition_new .sector_start > partition_old .sector_start ) operation_details .push_back( OperationDetails( _("move filesystem to the right") ) ) ; + else + { + operation_details .push_back( OperationDetails( _("move filesystem") ) ) ; + operation_details .back() .sub_details .push_back( + OperationDetails( + Glib::ustring( "" ) + + _("new and old filesystem have the same positition. skipping this operation") + + Glib::ustring( "" ), + OperationDetails::NONE ) ) ; + + operation_details .back() .status = OperationDetails::SUCCES ; + return true ; + } bool succes = false ; if ( open_device_and_disk( partition_old .device_path ) )