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:
Bart Hakvoort 2004-12-01 21:31:59 +00:00
parent 7c9d05b60c
commit 587c4af200
3 changed files with 41 additions and 35 deletions

View File

@ -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> 2004-11-30 Bart Hakvoort <gparted@users.sf.net>
* src/fat16.cc, * src/fat16.cc,

View File

@ -221,7 +221,6 @@ void Dialog_Partition_New::optionmenu_changed( bool type )
color_temp .set( Get_Color( FILESYSTEMS[ optionmenu_filesystem.get_history() ] .filesystem ) ) ; color_temp .set( Get_Color( FILESYSTEMS[ optionmenu_filesystem.get_history() ] .filesystem ) ) ;
frame_resizer_base ->set_rgb_partition_color( color_temp ) ; frame_resizer_base ->set_rgb_partition_color( color_temp ) ;
if ( this ->is_realized( ) )
frame_resizer_base ->Draw_Partition( ) ; frame_resizer_base ->Draw_Partition( ) ;
} }
@ -237,14 +236,6 @@ void Dialog_Partition_New::Build_Filesystems_Menu( bool only_unformatted )
//unformatted is always available //unformatted is always available
menu_filesystem .items( ) .back( ) .set_sensitive( true ) ; 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 //check if selected unallocated is big enough for fs'es with min. size
//fat16 //fat16
if ( this ->selected_partition .Get_Length_MB() < 32 ) 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 ) if ( this ->selected_partition .Get_Length_MB() < 40 )
menu_filesystem .items()[ 5 ] .set_sensitive( false ) ; 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 ;
}
} }

View File

@ -222,6 +222,8 @@ void Frame_Resizer_Base::Draw_Partition( )
if ( UNUSED < 0 ) if ( UNUSED < 0 )
UNUSED = 0 ; UNUSED = 0 ;
if ( drawingarea .get_window( ) )
{
drawingarea .get_window() ->clear() ; drawingarea .get_window() ->clear() ;
//the two rectangles on each side of the partition //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_LEFT ) ;
Draw_Resize_Grip( ARROW_RIGHT ) ; Draw_Resize_Grip( ARROW_RIGHT ) ;
}
} }