diff options
-rwxr-xr-x | control-center | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/control-center b/control-center index 4b92f539..0b9cad39 100755 --- a/control-center +++ b/control-center @@ -32,6 +32,7 @@ use lib qw(/usr/lib/libDrakX); use lib qw(/usr/lib/libDrakX); use common; use interactive; +use detect_devices; use standalone; use my_gtk qw(:helpers :wrappers); use strict; @@ -115,6 +116,27 @@ my @tree = [_("Mount Points"),'partition-mdk', [ [_("Hard Drives"), 'diskdrake_hd'], + (map { + my ($type, $name, $scan) = @$_; + map_index { + my $full_name = $name . ($::i ? $::i + 1 : ''); + $exec_hash->{$full_name} = [ "diskdrake", "$_sbindir/diskdrake --removable=$_->{device}", 1 ]; + [ $full_name, "diskdrake_$type" ]; + } $scan->(); + } do { + my %cdroms_by_type; + foreach (detect_devices::cdroms()) { + my $type = detect_devices::isBurner($_) ? 'burner' : detect_devices::isDvdDrive($_) ? 'DVD' : 'cdrom'; + push @{$cdroms_by_type{$type}}, $_; + } + ( + [ 'cdrom', _("CD-ROM"), sub { @{$cdroms_by_type{cdrom} || []} } ], + [ 'dvd', _("DVD"), sub { @{$cdroms_by_type{DVD} || []} } ], + [ 'cdburner', _("CD Burner"), sub { @{$cdroms_by_type{burner} || []} } ], + [ 'floppy', _("Floppy"), \&detect_devices::floppies ], + [ 'zip', _("Zip"), \&detect_devices::zips ], + ), + }), [_("Removable disks"), 'diskdrake_other'], [_("NFS mount points"), 'diskdrake_nfs'], [_("Samba mount points"), 'diskdrake_samba'], |