[gparted] Add requested partition details to log when resize/move fails
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Add requested partition details to log when resize/move fails
- Date: Sun, 18 Mar 2012 15:48:36 +0000 (UTC)
commit 57ee0a1638b940de7f06e42affd426efd2defeac
Author: Curtis Gedak <gedakc gmail com>
Date: Fri Mar 16 13:02:48 2012 -0600
Add requested partition details to log when resize/move fails
src/GParted_Core.cc | 17 ++++++++++++++++-
1 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc
index cefd084..58efa04 100644
--- a/src/GParted_Core.cc
+++ b/src/GParted_Core.cc
@@ -2223,6 +2223,7 @@ bool GParted_Core::resize_move_partition( const Partition & partition_old,
if ( return_value )
{
+ //Change to partition succeeded
operationdetail .get_last_child() .add_child(
OperationDetail(
String::ucompose( _("new start: %1"), new_start ) + "\n" +
@@ -2247,7 +2248,21 @@ bool GParted_Core::resize_move_partition( const Partition & partition_old,
}
#endif
}
-
+ else
+ {
+ //Change to partition failed
+ operationdetail .get_last_child() .add_child(
+ OperationDetail(
+ String::ucompose( _("requested start: %1"), partition_new .sector_start ) + "\n" +
+ String::ucompose( _("requested end: %1"), partition_new . sector_end ) + "\n" +
+ String::ucompose( _("requested size: %1 (%2)"),
+ partition_new .get_sector_length(),
+ Utils::format_size( partition_new .get_sector_length(), partition_new .sector_size ) ),
+ STATUS_NONE,
+ FONT_ITALIC )
+ ) ;
+ }
+
operationdetail .get_last_child() .set_status( return_value ? STATUS_SUCCES : STATUS_ERROR ) ;
return return_value ;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]