Fixed a crasher with the New Partition Dialog (thanks to Tino for
* src/Dialog_Partition_New.cc, src/Frame_Resizer_Base.cc: Fixed a crasher with the New Partition Dialog (thanks to Tino for reporting)
This commit is contained in:
parent
7c9d05b60c
commit
587c4af200
|
@ -1,3 +1,8 @@
|
|||
2004-12-01 Bart Hakvoort <gparted@users.sf.net>
|
||||
|
||||
* src/Dialog_Partition_New.cc,
|
||||
src/Frame_Resizer_Base.cc: Fixed a crasher with the New Partition Dialog (thanks to Tino for reporting)
|
||||
|
||||
2004-11-30 Bart Hakvoort <gparted@users.sf.net>
|
||||
|
||||
* src/fat16.cc,
|
||||
|
|
|
@ -221,7 +221,6 @@ void Dialog_Partition_New::optionmenu_changed( bool type )
|
|||
color_temp .set( Get_Color( FILESYSTEMS[ optionmenu_filesystem.get_history() ] .filesystem ) ) ;
|
||||
frame_resizer_base ->set_rgb_partition_color( color_temp ) ;
|
||||
|
||||
if ( this ->is_realized( ) )
|
||||
frame_resizer_base ->Draw_Partition( ) ;
|
||||
}
|
||||
|
||||
|
@ -237,14 +236,6 @@ void Dialog_Partition_New::Build_Filesystems_Menu( bool only_unformatted )
|
|||
//unformatted is always available
|
||||
menu_filesystem .items( ) .back( ) .set_sensitive( true ) ;
|
||||
|
||||
//find and set first enabled filesystem
|
||||
for ( unsigned int t = 0 ; t < menu_filesystem .items( ) .size( ) ; t++ )
|
||||
if ( menu_filesystem .items( )[ t ] .sensitive( ) )
|
||||
{
|
||||
first_creatable_fs = t ;
|
||||
break ;
|
||||
}
|
||||
|
||||
//check if selected unallocated is big enough for fs'es with min. size
|
||||
//fat16
|
||||
if ( this ->selected_partition .Get_Length_MB() < 32 )
|
||||
|
@ -256,6 +247,13 @@ void Dialog_Partition_New::Build_Filesystems_Menu( bool only_unformatted )
|
|||
if ( this ->selected_partition .Get_Length_MB() < 40 )
|
||||
menu_filesystem .items()[ 5 ] .set_sensitive( false ) ;
|
||||
|
||||
//find and set first enabled filesystem
|
||||
for ( unsigned int t = 0 ; t < menu_filesystem .items( ) .size( ) ; t++ )
|
||||
if ( menu_filesystem .items( )[ t ] .sensitive( ) )
|
||||
{
|
||||
first_creatable_fs = t ;
|
||||
break ;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -222,6 +222,8 @@ void Frame_Resizer_Base::Draw_Partition( )
|
|||
if ( UNUSED < 0 )
|
||||
UNUSED = 0 ;
|
||||
|
||||
if ( drawingarea .get_window( ) )
|
||||
{
|
||||
drawingarea .get_window() ->clear() ;
|
||||
|
||||
//the two rectangles on each side of the partition
|
||||
|
@ -246,6 +248,7 @@ void Frame_Resizer_Base::Draw_Partition( )
|
|||
Draw_Resize_Grip( ARROW_LEFT ) ;
|
||||
|
||||
Draw_Resize_Grip( ARROW_RIGHT ) ;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue