When ( ! deep_scan ) now only one device is scanned (first found one).
* src/GParted_Core.cc: When ( ! deep_scan ) now only one device is scanned (first found one). Shaves off a couple of millisec from startuptime |-) * src/Win_GParted.cc: Fixed small bug with removable devices and the devicemenu. Also fixed redundant calling of 2 functions.
This commit is contained in:
parent
4040901610
commit
f18885aa04
|
@ -1,3 +1,8 @@
|
|||
2004-12-03 Bart Hakvoort <gparted@users.sf.net>
|
||||
|
||||
* src/GParted_Core.cc: When ( ! deep_scan ) now only one device is scanned (first found one). Shaves off a couple of millisec from startuptime |-)
|
||||
* src/Win_GParted.cc: Fixed small bug with removable devices and the devicemenu. Also fixed redundant calling of 2 functions.
|
||||
|
||||
2004-12-02 Bart Hakvoort <gparted@users.sf.net>
|
||||
|
||||
* src/Win_GParted.cc,
|
||||
|
|
|
@ -64,13 +64,19 @@ void GParted_Core::get_devices( std::vector<Device> & devices, bool deep_scan )
|
|||
while ( device && strlen( device ->path ) > 6 && ( (Glib::ustring) device ->path ) .is_ascii( ) )
|
||||
{
|
||||
if ( open_device( device ->path, device ) )
|
||||
{
|
||||
device_paths .push_back( get_sym_path( device ->path ) ) ;
|
||||
|
||||
if ( ! deep_scan )
|
||||
break ;
|
||||
}
|
||||
|
||||
|
||||
device = ped_device_get_next( device ) ;
|
||||
}
|
||||
close_device_and_disk( device, disk ) ;
|
||||
|
||||
//and sort the devices on name.. (this prevents some very weird errors ;) )
|
||||
//and sort the devices by name.. (this prevents some very weird errors ;) )
|
||||
sort( device_paths .begin( ), device_paths .end( ) ) ;
|
||||
|
||||
|
||||
|
|
|
@ -347,7 +347,7 @@ void Win_GParted::Find_Devices( bool deep_scan )
|
|||
{
|
||||
gparted_core .get_devices( devices, deep_scan ) ;
|
||||
|
||||
//paranoia check.. :) <---NOT threadsave..
|
||||
//paranoia check.. :)
|
||||
if ( devices .empty( ) )
|
||||
{
|
||||
str_temp = "<span weight=\"bold\" size=\"larger\">" ;
|
||||
|
@ -356,7 +356,7 @@ void Win_GParted::Find_Devices( bool deep_scan )
|
|||
str_temp += _("You have probably encountered a bug. GParted will quit now.") ;
|
||||
|
||||
Gtk::MessageDialog dialog( *this, str_temp, true, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true ) ;
|
||||
dialog .run( ) ;
|
||||
dialog .run( ) ; //<---NOT threadsave..
|
||||
|
||||
exit( 0 ) ;
|
||||
}
|
||||
|
@ -382,6 +382,8 @@ void Win_GParted::Refresh_OptionMenu( )
|
|||
}
|
||||
|
||||
menu_devices .show_all_children();
|
||||
|
||||
optionmenu_devices .set_history( current_device ) ;
|
||||
}
|
||||
|
||||
void Win_GParted::Show_Pulsebar( )
|
||||
|
@ -710,17 +712,11 @@ void Win_GParted::menu_gparted_refresh_devices()
|
|||
|
||||
Show_Pulsebar( ) ;
|
||||
|
||||
Refresh_OptionMenu( ) ;
|
||||
|
||||
//check if current_device is still available (think about hotpluggable shit like usbdevices)
|
||||
if ( current_device >= devices .size( ) )
|
||||
current_device = 0 ;
|
||||
|
||||
//rebuild visualdisk and treeview
|
||||
Refresh_Visual( );
|
||||
|
||||
//and refresh the device info...
|
||||
Fill_Label_Device_Info( ) ;
|
||||
Refresh_OptionMenu( ) ;
|
||||
|
||||
//show read-only warning if necessary
|
||||
Glib::ustring readonly_paths ;
|
||||
|
@ -740,7 +736,6 @@ void Win_GParted::menu_gparted_refresh_devices()
|
|||
str_temp += "\n" ;
|
||||
str_temp += _("Unmount all mounted partitions on a device to get full access.") ;
|
||||
|
||||
|
||||
Gtk::MessageDialog dialog( *this, str_temp, true, Gtk::MESSAGE_WARNING, Gtk::BUTTONS_OK, true ) ;
|
||||
dialog.run( ) ;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue