diff options
Diffstat (limited to 'draksnapshot-applet')
-rwxr-xr-x | draksnapshot-applet | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/draksnapshot-applet b/draksnapshot-applet index 9cc1c50..655886c 100755 --- a/draksnapshot-applet +++ b/draksnapshot-applet @@ -110,9 +110,7 @@ if ($dbus) { my $bool; eval { my $device = $hal->get_object(($msg->get_args_list)[0], "$hal_dn.Device"); - $bool = - $device->QueryCapability('volume') && !$device->GetProperty('volume.is_disc') && - $device->GetProperty('volume.is_mounted'); + $bool = is_proper_device($device); }; if ($bool) { my $time = time(); @@ -209,6 +207,12 @@ sub configure() { go2State('config_in_progress'); } +sub is_proper_device { + my ($device) = @_; + $device->QueryCapability('volume') && !$device->GetProperty('volume.is_disc') && + $device->GetProperty('volume.is_mounted'); +} + sub firstCheck() { my @discs = grep { $_->{usb_bus} && detect_devices::may_be_a_hd($_) } detect_devices::getSCSI(); |