[Libreoffice-commits] .: 2 commits - solenv/bin

Christian Dywan cdywan at kemper.freedesktop.org
Sat Sep 3 04:36:01 PDT 2011


 solenv/bin/build.pl |   15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

New commits:
commit 107cce4506e15972c59ee66b73f023f8a7f42d5f
Author: Christian Dywan <christian.dywan at lanedo.com>
Date:   Sat Sep 3 13:23:06 2011 +0200

    Show a zenity tooltip every 5 seconds at best
    
    So notifications don't keep showing up after the module
    finnished building.

diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl
index 03581b9..df779db 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";
commit 3396e19fb134f09a61096d28ca792cd5e9394920
Author: Christian Dywan <christian.dywan at lanedo.com>
Date:   Sat Sep 3 13:22:46 2011 +0200

    Show x/y module status in both console and zenity

diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl
index 3d13254..03581b9 100755
--- a/solenv/bin/build.pl
+++ b/solenv/bin/build.pl
@@ -1904,14 +1904,18 @@ sub print_announce {
     {
         $text = "Building module $prj\n";
     };
+
+    my $total_modules = scalar(keys %build_lists_hash);
+    my $modules_started = scalar(keys %module_announced) + 1;
+    $text = "($modules_started/$total_modules) $text";
+
     my $announce_string = $new_line;
     $announce_string .= $echo . "=============\n";
     $announce_string .= $echo . $text;
     $announce_string .= $echo . "=============\n";
     print $announce_string;
-    my $total_modules = scalar(keys %build_lists_hash);
-    my $modules_started = scalar(keys %module_announced) + 1;
-    zenity_tooltip("($modules_started/$total_modules) $text");
+
+    zenity_tooltip("$text");
     $module_announced{$prj}++;
 };
 


More information about the Libreoffice-commits mailing list