[Libreoffice-commits] .: solenv/bin
Michael Meeks
mmeeks at kemper.freedesktop.org
Tue Oct 26 06:34:00 PDT 2010
solenv/bin/build.pl | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
New commits:
commit 7b48ec4c9d1d980d0a75aa69cb2a68bb6995327d
Author: Michael Meeks <michael.meeks at novell.com>
Date: Tue Oct 26 14:32:59 2010 +0100
enable zenity only when DISPLAY is set
diff --git a/solenv/bin/build.pl b/solenv/bin/build.pl
index e8537df..6af2bfd 100755
--- a/solenv/bin/build.pl
+++ b/solenv/bin/build.pl
@@ -2153,36 +2153,42 @@ sub print_announce {
$module_announced{$Prj}++;
};
+sub zenity_enabled {
+ return 0 if (!defined $ENV{DISPLAY});
+ return 0 if ($ENV{ENABLE_ZENITY} ne "TRUE");
+ return 1;
+}
+
sub zenity_open {
- if ($ENV{ENABLE_ZENITY} eq "TRUE") {
+ if (zenity_enabled()) {
my $zenity_pid = open3($zenity_in, $zenity_out, $zenity_err,
"zenity --notification --listen");
};
};
sub zenity_close {
- if ($ENV{ENABLE_ZENITY} eq "TRUE") {
+ if (zenity_enabled()) {
sleep(1); # Give Zenity a chance to show the message.
kill 1, $zenity_pid;
};
};
sub zenity_icon {
- if ($ENV{ENABLE_ZENITY} eq "TRUE") {
+ if (zenity_enabled()) {
my $filename = shift;
print $zenity_in "icon: $filename\n";
};
};
sub zenity_tooltip {
- if ($ENV{ENABLE_ZENITY} eq "TRUE") {
+ if (zenity_enabled()) {
my $text = shift;
print $zenity_in "tooltip: LibreOffice Build: $text\n";
};
};
sub zenity_message {
- if ($ENV{ENABLE_ZENITY} eq "TRUE") {
+ if (zenity_enabled()) {
my $text = shift;
print $zenity_in "message: $text\n";
};
More information about the Libreoffice-commits
mailing list