summaryrefslogtreecommitdiff
path: root/solenv
diff options
context:
space:
mode:
authorChristian Dywan <christian.dywan@lanedo.com>2011-09-03 13:23:06 +0200
committerChristian Dywan <christian.dywan@lanedo.com>2011-09-03 13:34:24 +0200
commit107cce4506e15972c59ee66b73f023f8a7f42d5f (patch)
tree124b7f674533b67638455df46b615c0dff0a9f04 /solenv
parent3396e19fb134f09a61096d28ca792cd5e9394920 (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')
-rwxr-xr-xsolenv/bin/build.pl5
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";