diff options
author | Michael Meeks <michael.meeks@suse.com> | 2013-05-11 17:25:11 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-05-11 17:36:52 +0100 |
commit | 363b82fdb4016bc42877fea2ebde9227b27579fe (patch) | |
tree | 1f102c2dd0d6da446cd802825436b98380f1d574 /sysui/desktop/share | |
parent | b4a74af711b9645533f1c98476667fcec9d84bdc (diff) |
fdo#64311 - .desktop files: use %U for URLs only if we have gvfs or gio.
Change-Id: I52c75432eb30a46b2c6a597211df09fdbb08056c
Diffstat (limited to 'sysui/desktop/share')
-rw-r--r-- | sysui/desktop/share/brand.pl | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/sysui/desktop/share/brand.pl b/sysui/desktop/share/brand.pl index f10e99dab639..ae2911be9ed0 100644 --- a/sysui/desktop/share/brand.pl +++ b/sysui/desktop/share/brand.pl @@ -20,10 +20,9 @@ eval 'exec perl -wS $0 ${1+"$@"}' # the License at http://www.apache.org/licenses/LICENSE-2.0 . # - -#********************************************************************* # -# main +# This tool is used to re-write and substitute variables +# into Unix .desktop, mimelnk, .keys files etc. # $destdir = pop @ARGV; @@ -31,6 +30,7 @@ mkdir $destdir,0777; $productname = "LibreOffice"; $productfilename = "libreoffice"; +$urls = 0; $prefix = ""; $iconprefix = ""; @@ -57,6 +57,10 @@ while ($_ = $ARGV[0], /^-/) { $category = $ARGV[0]; shift; } + # Whether we can handle URLs on the command-line + if (/^--urls/) { + $urls = 1; + } } @@ -110,6 +114,12 @@ while (<>) { # replace %PRODUCTNAME placeholders s/%PRODUCTNAME/$productname/g; + if ( $urls ) { + s/%%FILE%%/%U/g; + } else { + s/%%FILE%%/%F/g; + } + print OUTFILE "$_\n"; } |