fixed some resizing-issues with reiserfs.
* src/Dialog_Base_Partition.cc,src/Dialog_Partition_Resize_Move.cc: fixed some resizing-issues with reiserfs.
This commit is contained in:
parent
110868837b
commit
3bf218f8a0
|
@ -1,3 +1,8 @@
|
||||||
|
2004-10-08 Bart Hakvoort <gparted@users.sf.net>
|
||||||
|
|
||||||
|
* src/Dialog_Base_Partition.cc,
|
||||||
|
src/Dialog_Partition_Resize_Move.cc: fixed some resizing-issues with reiserfs.
|
||||||
|
|
||||||
2004-10-07 Bart Hakvoort <gparted@users.sf.net>
|
2004-10-07 Bart Hakvoort <gparted@users.sf.net>
|
||||||
|
|
||||||
* src/Dialog_Base_Partition.cc,
|
* src/Dialog_Base_Partition.cc,
|
||||||
|
|
|
@ -147,7 +147,7 @@ void Dialog_Base_Partition::Set_Confirm_Button( CONFIRMBUTTON button_type )
|
||||||
{
|
{
|
||||||
case NEW : this->add_button( Gtk::Stock::ADD,Gtk::RESPONSE_OK );
|
case NEW : this->add_button( Gtk::Stock::ADD,Gtk::RESPONSE_OK );
|
||||||
break ;
|
break ;
|
||||||
case RESIZE_MOVE: if ( selected_partition.filesystem == "ext2" || selected_partition.filesystem == "ext3" )
|
case RESIZE_MOVE: if ( selected_partition.filesystem == "ext2" || selected_partition.filesystem == "ext3" || selected_partition.filesystem == "reiserfs")
|
||||||
str_temp = _("Resize") ;
|
str_temp = _("Resize") ;
|
||||||
else
|
else
|
||||||
str_temp = _("Resize/Move") ;
|
str_temp = _("Resize/Move") ;
|
||||||
|
@ -225,7 +225,16 @@ void Dialog_Base_Partition::on_signal_resize( int x_start, int x_end, Frame_Resi
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//check for lower limit reiserfs
|
||||||
|
if ( selected_partition.filesystem == "reiserfs" && ( x_end - x_start ) * MB_PER_PIXEL < 40 )
|
||||||
|
{
|
||||||
|
frame_resizer_base ->set_x_start( this ->x_start );
|
||||||
|
frame_resizer_base ->set_x_end( this ->x_end );
|
||||||
|
|
||||||
|
frame_resizer_base ->Draw_Partition() ;
|
||||||
|
GRIP = false ;
|
||||||
|
return ;
|
||||||
|
}
|
||||||
|
|
||||||
spinbutton_size .set_value( ( x_end - x_start ) * MB_PER_PIXEL ) ;
|
spinbutton_size .set_value( ( x_end - x_start ) * MB_PER_PIXEL ) ;
|
||||||
|
|
||||||
|
|
|
@ -63,7 +63,7 @@ void Dialog_Partition_Resize_Move::Resize_Move_Normal( const std::vector <Partit
|
||||||
{
|
{
|
||||||
|
|
||||||
//see if we need a fixed_start
|
//see if we need a fixed_start
|
||||||
if ( selected_partition.filesystem == "ext2" || selected_partition.filesystem == "ext3" )
|
if ( selected_partition.filesystem == "ext2" || selected_partition.filesystem == "ext3" || selected_partition.filesystem == "reiserfs" )
|
||||||
{
|
{
|
||||||
this ->set_title( String::ucompose( _("Resize %1"), selected_partition .partition) ) ;
|
this ->set_title( String::ucompose( _("Resize %1"), selected_partition .partition) ) ;
|
||||||
this ->fixed_start = true;
|
this ->fixed_start = true;
|
||||||
|
@ -85,8 +85,8 @@ void Dialog_Partition_Resize_Move::Resize_Move_Normal( const std::vector <Partit
|
||||||
|
|
||||||
Sector previous, next ;
|
Sector previous, next ;
|
||||||
previous = next = 0 ;
|
previous = next = 0 ;
|
||||||
//also check the partitions filesystem ( if this is ext2/3 then previous should be 0 )
|
//also check the partitions filesystem ( if this is ext2/3 or reiserfs then previous should be 0 )
|
||||||
if ( t >= 1 && partitions[t -1].type == GParted::UNALLOCATED && selected_partition.filesystem != "ext2" && selected_partition.filesystem != "ext3" && partitions[t -1] .inside_extended == selected_partition.inside_extended )
|
if ( t >= 1 && partitions[t -1].type == GParted::UNALLOCATED && selected_partition.filesystem != "ext2" && selected_partition.filesystem != "ext3" && selected_partition.filesystem != "reiserfs" && partitions[t -1] .inside_extended == selected_partition.inside_extended )
|
||||||
{
|
{
|
||||||
previous = partitions[t -1].sector_end - partitions[t -1].sector_start ;
|
previous = partitions[t -1].sector_end - partitions[t -1].sector_start ;
|
||||||
START = partitions[t -1].sector_start ;
|
START = partitions[t -1].sector_start ;
|
||||||
|
@ -121,6 +121,8 @@ void Dialog_Partition_Resize_Move::Resize_Move_Normal( const std::vector <Partit
|
||||||
LOWER = 32 +1 ;
|
LOWER = 32 +1 ;
|
||||||
else if ( selected_partition.filesystem == "fat32" && selected_partition .Get_Used_MB() < 256 )
|
else if ( selected_partition.filesystem == "fat32" && selected_partition .Get_Used_MB() < 256 )
|
||||||
LOWER = 256 +1; //when shrinking to 256 the filesystem converts to fat16, thats why i added the 1
|
LOWER = 256 +1; //when shrinking to 256 the filesystem converts to fat16, thats why i added the 1
|
||||||
|
else if ( selected_partition.filesystem == "reiserfs" && selected_partition .Get_Used_MB() < 40 )
|
||||||
|
LOWER = 40 ;
|
||||||
else
|
else
|
||||||
LOWER = selected_partition .Get_Used_MB() +1;
|
LOWER = selected_partition .Get_Used_MB() +1;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue