diff options
author | Christian Dywan <christian.dywan@lanedo.com> | 2011-09-03 13:23:06 +0200 |
---|---|---|
committer | Christian Dywan <christian.dywan@lanedo.com> | 2011-09-03 13:34:24 +0200 |
commit | 107cce4506e15972c59ee66b73f023f8a7f42d5f (patch) | |
tree | 124b7f674533b67638455df46b615c0dff0a9f04 /solenv/bin | |
parent | 3396e19fb134f09a61096d28ca792cd5e9394920 (diff) |
Show a zenity tooltip every 5 seconds at best
So notifications don't keep showing up after the module
finnished building.
Diffstat (limited to 'solenv/bin')
-rwxr-xr-x | solenv/bin/build.pl | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl index 03581b9cc87e..df779db6fdf9 100755 --- a/solenv/bin/build.pl +++ b/solenv/bin/build.pl @@ -175,6 +175,7 @@ my $zenity_in = ''; my $zenity_out = ''; my $zenity_err = ''; + my $last_message_time = 0; my $verbose = 0; my @modules_built = (); @@ -1949,6 +1950,10 @@ sub zenity_icon { }; sub zenity_tooltip { + my $current_message_time = time(); + return if (!($current_message_time > $last_message_time + 5)); + $last_message_time = $current_message_time; + if (zenity_enabled()) { my $text = shift; print $zenity_in "tooltip: LibreOffice Build: $text\n"; |