summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortv <tv@99302b65-d5f7-0310-b3dd-f8cd6f4e3d94>2008-03-05 05:14:15 +0000
committertv <tv@99302b65-d5f7-0310-b3dd-f8cd6f4e3d94>2008-03-05 05:14:15 +0000
commitc5d9097e9863c59a2f22291922dad15a876d3c96 (patch)
tree7bd53a45dc48b37031bd5a5ad89e6ab0d48fbd3c
parent448d67dad2e14949458738ea103fd3c460d97ed7 (diff)
downloaddraksnapshot-c5d9097e9863c59a2f22291922dad15a876d3c96.tar
draksnapshot-c5d9097e9863c59a2f22291922dad15a876d3c96.tar.gz
draksnapshot-c5d9097e9863c59a2f22291922dad15a876d3c96.tar.bz2
draksnapshot-c5d9097e9863c59a2f22291922dad15a876d3c96.tar.xz
draksnapshot-c5d9097e9863c59a2f22291922dad15a876d3c96.zip
(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
-rw-r--r--NEWS1
-rwxr-xr-xdraksnapshot-applet6
2 files changed, 6 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 9eaae7e..0dadb54 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,6 @@
- applet:
o do not skip initial check
+ o only show up if detecting new discs
o refresh cache of USB devices list
o run check every 2s instead of every 5mns
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;
}