made some small adjustments to devicechecks.
* src/GParted_Core.cc: made some small adjustments to devicechecks.
This commit is contained in:
parent
fddb3d4475
commit
511a628939
|
@ -1,3 +1,7 @@
|
||||||
|
2006-03-26 Bart Hakvoort <hakvoort@cvs.gnome.org>
|
||||||
|
|
||||||
|
* src/GParted_Core.cc: made some small adjustments to devicechecks.
|
||||||
|
|
||||||
2006-03-26 Bart Hakvoort <hakvoort@cvs.gnome.org>
|
2006-03-26 Bart Hakvoort <hakvoort@cvs.gnome.org>
|
||||||
|
|
||||||
* src/GParted_Core.cc: sort devices alphabetically by default.
|
* src/GParted_Core.cc: sort devices alphabetically by default.
|
||||||
|
|
|
@ -108,13 +108,7 @@ void GParted_Core::set_user_devices( const std::vector<Glib::ustring> & user_dev
|
||||||
|
|
||||||
bool GParted_Core::check_device_path( const Glib::ustring & device_path )
|
bool GParted_Core::check_device_path( const Glib::ustring & device_path )
|
||||||
{
|
{
|
||||||
if ( device_path .length() > 6 && device_path .is_ascii() && open_device( device_path ) )
|
return ( device_path .length() > 6 && device_path .is_ascii() ) ;
|
||||||
{
|
|
||||||
close_device_and_disk() ;
|
|
||||||
return true ;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GParted_Core::get_devices( std::vector<Device> & devices )
|
void GParted_Core::get_devices( std::vector<Device> & devices )
|
||||||
|
@ -146,7 +140,9 @@ void GParted_Core::get_devices( std::vector<Device> & devices )
|
||||||
|
|
||||||
for ( unsigned int t = 0 ; t < device_paths .size() ; t++ )
|
for ( unsigned int t = 0 ; t < device_paths .size() ; t++ )
|
||||||
{
|
{
|
||||||
if ( check_device_path( device_paths[ t ] ) && open_device_and_disk( device_paths[ t ], false ) )
|
if ( check_device_path( device_paths[ t ] ) &&
|
||||||
|
open_device_and_disk( device_paths[ t ], false ) &&
|
||||||
|
lp_device )
|
||||||
{
|
{
|
||||||
temp_device .Reset() ;
|
temp_device .Reset() ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue