From c5d9097e9863c59a2f22291922dad15a876d3c96 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 5 Mar 2008 05:14:15 +0000 Subject: (silentCheck) only show up if detecting new discs git-svn-id: http://svn.mandriva.com/svn/soft/draksnapshot/trunk@238623 99302b65-d5f7-0310-b3dd-f8cd6f4e3d94 --- draksnapshot-applet | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'draksnapshot-applet') diff --git a/draksnapshot-applet b/draksnapshot-applet index 99af9f4..4bdd41d 100755 --- a/draksnapshot-applet +++ b/draksnapshot-applet @@ -140,18 +140,22 @@ sub configure() { } sub silentCheck() { + state @old_discs; return if $config_pid; my $w = $::main_window ? $::main_window->window : undef; gtkset_mousecursor_wait($w); # force refreshing cache: detect_devices::probeall_update_cache(); + @discs = grep { $_->{usb_bus} } detect_devices::hds(); # are there any updates ? - if (@discs = grep { $_->{usb_bus} } detect_devices::hds()) { + my @a = difference2(\@discs, \@old_discs); + if (@a) { go2State('disk_found'); } + @old_discs = @discs; gtkset_mousecursor_normal($w) if !$insensitive_while_running_a_child; } -- cgit v1.2.1