[gparted] Revert "Select unallocated partition by default (#667365)"
- From: Curtis Gedak <gedakc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gparted] Revert "Select unallocated partition by default (#667365)"
- Date: Mon, 18 Mar 2013 16:20:32 +0000 (UTC)
commit 92f4947618ebaa72ea9345d86859ca069efd4eee
Author: Mike Fleetwood <mike fleetwood googlemail com>
Date: Sun Mar 17 09:18:26 2013 +0000
Revert "Select unallocated partition by default (#667365)"
This reverts commit 3dd769d955764455ade6ddee746a37657bff8f4a.
It didn't consider unallocated partitions within extended partitions
when looking for the largest one to select.
src/Win_GParted.cc | 14 +-------------
1 files changed, 1 insertions(+), 13 deletions(-)
---
diff --git a/src/Win_GParted.cc b/src/Win_GParted.cc
index 92cec19..c320f27 100644
--- a/src/Win_GParted.cc
+++ b/src/Win_GParted.cc
@@ -821,7 +821,6 @@ bool Win_GParted::Merge_Operations( unsigned int first, unsigned int second )
void Win_GParted::Refresh_Visual()
{
std::vector<Partition> partitions = devices[ current_device ] .partitions ;
- int largest_unallocated = -1;
//make all operations visible
for ( unsigned int t = 0 ; t < operations .size(); t++ )
@@ -861,12 +860,7 @@ void Win_GParted::Refresh_Visual()
index_extended = t ;
primary_count++;
break;
- case GParted::TYPE_UNALLOCATED :
- if (largest_unallocated == -1)
- largest_unallocated = t;
- else if( (partitions[t].sector_end - partitions[t].sector_start) >
- (partitions[largest_unallocated].sector_end -
partitions[largest_unallocated].sector_start))
- largest_unallocated = t;
+
default :
break;
}
@@ -880,12 +874,6 @@ void Win_GParted::Refresh_Visual()
//no partition can be selected after a refresh..
selected_partition .Reset() ;
- if( largest_unallocated != -1 )
- {
- selected_partition = partitions[largest_unallocated];
- treeview_detail.set_selected( selected_partition );
- drawingarea_visualdisk.set_selected( selected_partition );
- }
set_valid_operations() ;
while ( Gtk::Main::events_pending() )
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]