Prevent a copied partition from being pasted into an existing partition

svn path=/trunk/; revision=972
This commit is contained in:
Curtis Gedak 2008-11-19 23:44:30 +00:00
parent 1582dc3c64
commit 3836232cfb
2 changed files with 6 additions and 1 deletions

View File

@ -1,5 +1,9 @@
2008-11-19 Curtis Gedak <gedakc@gmail.com>
* src/Win_GParted.cc: Fixed dangerous copy and paste problem.
- Prevent a copied partition from being pasted into an existing
partition.
* src/Win_GParted.cc: Added language length conditional Undo display.
- If translated language is relatively long, then
split the "Resize/Move" toolbar button text into two lines, and

View File

@ -896,7 +896,8 @@ void Win_GParted::set_valid_operations()
if ( ! copied_partition .get_path() .empty() &&
copied_partition .get_length() <= selected_partition .get_length() &&
selected_partition .status == GParted::STAT_REAL &&
copied_partition != selected_partition )
copied_partition != selected_partition &&
selected_partition .type == GParted::TYPE_UNALLOCATED )
allow_paste( true ) ;
//see if we can somehow check/repair this file system....