diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2002-02-21 11:15:54 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2002-02-21 11:15:54 +0000 |
commit | d31eb162d61ff7e7a5d68ab753912fce53f2b8f6 (patch) | |
tree | 2e75062a47714209784146a653ec8ff6ab3024d9 | |
parent | 66f5fb2e22a70aa9d6e593d8b874b02c0ddfaec5 (diff) | |
download | control-center-d31eb162d61ff7e7a5d68ab753912fce53f2b8f6.tar control-center-d31eb162d61ff7e7a5d68ab753912fce53f2b8f6.tar.gz control-center-d31eb162d61ff7e7a5d68ab753912fce53f2b8f6.tar.bz2 control-center-d31eb162d61ff7e7a5d68ab753912fce53f2b8f6.tar.xz control-center-d31eb162d61ff7e7a5d68ab753912fce53f2b8f6.zip |
add removable detection/display
-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'], |