Merge branch 'master' of ssh://mri.wsr.ac.at/home/hjp/wrk/xfce-xterm-launcher-update

This commit is contained in:
Peter J. Holzer 2017-06-17 12:34:45 +02:00
commit 736c5f1cc9
1 changed files with 4 additions and 3 deletions

View File

@ -8,6 +8,7 @@ use Data::Dumper;
use experimental qw(autoderef);
my $launcher = $ARGV[0];
my $verbose = 0;
my $launcher_dir = "$ENV{HOME}/.config/xfce4/panel/launcher-$launcher";
@ -32,7 +33,7 @@ for my $xterm_script (@xterm_scripts) {
if ($desktop_files{$name}{content_fields}{Icon} ne $icon_file) {
$desktop_files{$name}{content_fields}{Icon} = $icon_file;
replace($desktop_files{$name});
say STDERR "replaced desktop entry $desktop_files{$name}{filename} for $name";
say STDERR "replaced desktop entry $desktop_files{$name}{filename} for $name" if $verbose;
}
} else {
@ -49,7 +50,7 @@ for my $xterm_script (@xterm_scripts) {
current => 1
};
replace($desktop_files{$name});
say STDERR "created new desktop entry $desktop_files{$name}{filename} for $name";
say STDERR "created new desktop entry $desktop_files{$name}{filename} for $name" if $verbose;
}
}
@ -57,7 +58,7 @@ $desktop_files{XTerm}{current} = 1; # we always want that
for my $name (sort keys %desktop_files) {
unless ($desktop_files{$name}{current}) {
say STDERR "deleting obsolete desktop entry $desktop_files{$name}{filename} for $name";
say STDERR "deleting obsolete desktop entry $desktop_files{$name}{filename} for $name" if $verbose;
unlink($desktop_files{$name}{filename});
}
}