P )
* some minor internal codechanges, which should save a few bytes of mem here and there. (i was in a nitpicking mood :P )
This commit is contained in:
parent
10e8f3338d
commit
3703fd3783
|
@ -1,3 +1,8 @@
|
||||||
|
2004-12-15 Bart Hakvoort <gparted@users.sf.net>
|
||||||
|
|
||||||
|
* some minor internal codechanges, which should save a few bytes of mem here and there.
|
||||||
|
(i was in a nitpicking mood :P )
|
||||||
|
|
||||||
2004-12-15 Bart Hakvoort <gparted@users.sf.net>
|
2004-12-15 Bart Hakvoort <gparted@users.sf.net>
|
||||||
|
|
||||||
* Gparted_Core::get_fs now returns a const reference.
|
* Gparted_Core::get_fs now returns a const reference.
|
||||||
|
|
|
@ -77,7 +77,6 @@ protected:
|
||||||
void on_signal_resize( int, int, Frame_Resizer_Base::ArrowType );
|
void on_signal_resize( int, int, Frame_Resizer_Base::ArrowType );
|
||||||
void on_spinbutton_value_changed( SPINBUTTON ) ;
|
void on_spinbutton_value_changed( SPINBUTTON ) ;
|
||||||
|
|
||||||
std::vector<FS> FILESYSTEMS ;
|
|
||||||
bool fixed_start, GRIP ;
|
bool fixed_start, GRIP ;
|
||||||
double before_value ;
|
double before_value ;
|
||||||
FS fs ;
|
FS fs ;
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace GParted
|
||||||
class Dialog_Partition_Copy : public Dialog_Base_Partition
|
class Dialog_Partition_Copy : public Dialog_Base_Partition
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Dialog_Partition_Copy( std::vector<FS> FILESYSTEMS, Sector cylinder_size ) ;
|
Dialog_Partition_Copy( const FS & fs, Sector cylinder_size ) ;
|
||||||
void Set_Data( const Partition & selected_partition, const Partition & copied_partition );
|
void Set_Data( const Partition & selected_partition, const Partition & copied_partition );
|
||||||
Partition Get_New_Partition( ) ;
|
Partition Get_New_Partition( ) ;
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace GParted
|
||||||
class Dialog_Partition_Resize_Move : public Dialog_Base_Partition
|
class Dialog_Partition_Resize_Move : public Dialog_Base_Partition
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
Dialog_Partition_Resize_Move( std::vector<FS> FILESYSTEMS, Sector cylinder_size ) ;
|
Dialog_Partition_Resize_Move( const FS & fs, Sector cylinder_size ) ;
|
||||||
void Set_Data( const Partition & selected_partition, const std::vector <Partition> & partitions ) ;
|
void Set_Data( const Partition & selected_partition, const std::vector <Partition> & partitions ) ;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -20,9 +20,9 @@
|
||||||
namespace GParted
|
namespace GParted
|
||||||
{
|
{
|
||||||
|
|
||||||
Dialog_Partition_Copy::Dialog_Partition_Copy( std::vector<FS> FILESYSTEMS, Sector cylinder_size )
|
Dialog_Partition_Copy::Dialog_Partition_Copy( const FS & fs, Sector cylinder_size )
|
||||||
{
|
{
|
||||||
this ->FILESYSTEMS = FILESYSTEMS ;
|
this ->fs = fs ;
|
||||||
|
|
||||||
//some disk have a small cylindersize, for safetyreasons i keep this size at >=1
|
//some disk have a small cylindersize, for safetyreasons i keep this size at >=1
|
||||||
if ( cylinder_size < 2048 )
|
if ( cylinder_size < 2048 )
|
||||||
|
@ -36,8 +36,6 @@ Dialog_Partition_Copy::Dialog_Partition_Copy( std::vector<FS> FILESYSTEMS, Secto
|
||||||
|
|
||||||
void Dialog_Partition_Copy::Set_Data( const Partition & selected_partition, const Partition & copied_partition )
|
void Dialog_Partition_Copy::Set_Data( const Partition & selected_partition, const Partition & copied_partition )
|
||||||
{
|
{
|
||||||
fs = Get_FS( copied_partition .filesystem, FILESYSTEMS ) ;
|
|
||||||
|
|
||||||
GRIP = true ; //prevents on spinbutton_changed from getting activated prematurely
|
GRIP = true ; //prevents on spinbutton_changed from getting activated prematurely
|
||||||
|
|
||||||
this ->set_title( String::ucompose( _("Paste %1"), copied_partition .partition ) ) ;
|
this ->set_title( String::ucompose( _("Paste %1"), copied_partition .partition ) ) ;
|
||||||
|
|
|
@ -20,9 +20,9 @@
|
||||||
namespace GParted
|
namespace GParted
|
||||||
{
|
{
|
||||||
|
|
||||||
Dialog_Partition_Resize_Move::Dialog_Partition_Resize_Move( std::vector<FS> FILESYSTEMS, Sector cylinder_size )
|
Dialog_Partition_Resize_Move::Dialog_Partition_Resize_Move( const FS & fs, Sector cylinder_size )
|
||||||
{
|
{
|
||||||
this ->FILESYSTEMS = FILESYSTEMS ;
|
this ->fs = fs ;
|
||||||
|
|
||||||
//some disk have a small cylindersize, for safetyreasons i keep this size at >=1
|
//some disk have a small cylindersize, for safetyreasons i keep this size at >=1
|
||||||
if ( cylinder_size < 2048 )
|
if ( cylinder_size < 2048 )
|
||||||
|
@ -64,7 +64,6 @@ void Dialog_Partition_Resize_Move::Set_Data( const Partition & selected_partitio
|
||||||
|
|
||||||
void Dialog_Partition_Resize_Move::Resize_Move_Normal( const std::vector <Partition> & partitions )
|
void Dialog_Partition_Resize_Move::Resize_Move_Normal( const std::vector <Partition> & partitions )
|
||||||
{
|
{
|
||||||
fs = Get_FS( selected_partition .filesystem, FILESYSTEMS ) ;
|
|
||||||
if ( ! selected_partition .error .empty( ) )
|
if ( ! selected_partition .error .empty( ) )
|
||||||
fs .shrink = false ;
|
fs .shrink = false ;
|
||||||
|
|
||||||
|
|
|
@ -879,7 +879,7 @@ void Win_GParted::activate_resize()
|
||||||
operations[ t ] .Apply_Operation_To_Visual( partitions ) ;
|
operations[ t ] .Apply_Operation_To_Visual( partitions ) ;
|
||||||
|
|
||||||
|
|
||||||
Dialog_Partition_Resize_Move dialog( gparted_core .get_fs( ), devices[ current_device ] .heads * devices[ current_device ] .sectors ) ;
|
Dialog_Partition_Resize_Move dialog( Get_FS( selected_partition .filesystem, gparted_core .get_fs( ) ), devices[ current_device ] .heads * devices[ current_device ] .sectors ) ;
|
||||||
|
|
||||||
if ( selected_partition .type == GParted::LOGICAL )
|
if ( selected_partition .type == GParted::LOGICAL )
|
||||||
{
|
{
|
||||||
|
@ -927,7 +927,7 @@ void Win_GParted::activate_paste()
|
||||||
{
|
{
|
||||||
if ( ! max_amount_prim_reached( ) )
|
if ( ! max_amount_prim_reached( ) )
|
||||||
{
|
{
|
||||||
Dialog_Partition_Copy dialog( gparted_core .get_fs( ), devices[ current_device ] .heads * devices[ current_device ] .sectors ) ;
|
Dialog_Partition_Copy dialog( Get_FS( copied_partition .filesystem, gparted_core .get_fs( ) ), devices[ current_device ] .heads * devices[ current_device ] .sectors ) ;
|
||||||
copied_partition .error .clear( ) ; //we don't need the errors of the source partition.
|
copied_partition .error .clear( ) ; //we don't need the errors of the source partition.
|
||||||
dialog .Set_Data( selected_partition, copied_partition ) ;
|
dialog .Set_Data( selected_partition, copied_partition ) ;
|
||||||
dialog .set_transient_for( *this );
|
dialog .set_transient_for( *this );
|
||||||
|
|
Loading…
Reference in New Issue