summaryrefslogtreecommitdiffstats
path: root/draksnapshot-applet
diff options
context:
space:
mode:
authortv <tv@99302b65-d5f7-0310-b3dd-f8cd6f4e3d94>2008-09-29 15:31:43 +0000
committertv <tv@99302b65-d5f7-0310-b3dd-f8cd6f4e3d94>2008-09-29 15:31:43 +0000
commit16bd45686e8f032d1b9311a7752e04e70dc29355 (patch)
tree94ee16cc871cbcc1f12f7e3c5133f54a60d46198 /draksnapshot-applet
parenta989ea066f87ad14b8430f7ba82f21ba896c1acf (diff)
downloaddraksnapshot-16bd45686e8f032d1b9311a7752e04e70dc29355.tar
draksnapshot-16bd45686e8f032d1b9311a7752e04e70dc29355.tar.gz
draksnapshot-16bd45686e8f032d1b9311a7752e04e70dc29355.tar.bz2
draksnapshot-16bd45686e8f032d1b9311a7752e04e70dc29355.tar.xz
draksnapshot-16bd45686e8f032d1b9311a7752e04e70dc29355.zip
(is_proper_device) split it out (needed for next commits)
git-svn-id: http://svn.mandriva.com/svn/soft/draksnapshot/trunk@247017 99302b65-d5f7-0310-b3dd-f8cd6f4e3d94
Diffstat (limited to 'draksnapshot-applet')
-rwxr-xr-xdraksnapshot-applet10
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();