Kaydet (Commit) b7423cee authored tarafından Bjoern Michaelsen's avatar Bjoern Michaelsen

lp#720716: add unity quicklist support

üst 38c7eeeb
......@@ -10,3 +10,8 @@ Name=%PRODUCTNAME Base
GenericName=Database Development
Comment=Manage databases, create queries and reports to track and manage your information by using Base.
InitialPreference=5
X-Ayatana-Desktop-Shortcuts=New
[New Shortcut Group]
UnityQuicklist=New Database
Exec=libreoffice --base %U
TargetEnvironment=Unity
......@@ -10,3 +10,8 @@ Name=%PRODUCTNAME Calc
GenericName=Spreadsheet
Comment=Perform calculations, analyze information and manage lists in spreadsheets by using Calc.
InitialPreference=5
X-Ayatana-Desktop-Shortcuts=New
[New Shortcut Group]
UnityQuicklist=New Spreadsheet
Exec=libreoffice --calc %U
TargetEnvironment=Unity
......@@ -10,3 +10,8 @@ Name=%PRODUCTNAME Draw
GenericName=Drawing Program
Comment=Create and edit drawings, flow charts, and logos by using Draw.
InitialPreference=5
X-Ayatana-Desktop-Shortcuts=New
[New Shortcut Group]
UnityQuicklist=New Drawing
Exec=libreoffice --draw %U
TargetEnvironment=Unity
......@@ -10,3 +10,8 @@ Name=%PRODUCTNAME Impress
GenericName=Presentation
Comment=Create and edit presentations for slideshows, meeting and Web pages by using Impress.
InitialPreference=5
X-Ayatana-Desktop-Shortcuts=New
[New Shortcut Group]
UnityQuicklist=New Presentation
Exec=libreoffice --impress %U
TargetEnvironment=Unity
......@@ -11,3 +11,8 @@ Name=%PRODUCTNAME Math
GenericName=Formula Editor
Comment=Create and edit scientific formulas and equations by using Math.
InitialPreference=5
X-Ayatana-Desktop-Shortcuts=New
[New Shortcut Group]
UnityQuicklist=New Formula
Exec=libreoffice --math %U
TargetEnvironment=Unity
......@@ -10,3 +10,8 @@ Name=%PRODUCTNAME Writer
GenericName=Word Processor
Comment=Create and edit text and graphics in letters, reports, documents and Web pages by using Writer.
InitialPreference=5
X-Ayatana-Desktop-Shortcuts=New
[New Shortcut Group]
UnityQuicklist=New Document
Exec=libreoffice --writer %U
TargetEnvironment=Unity
......@@ -50,6 +50,7 @@ ULFFILES= \
documents.ulf \
launcher_comment.ulf \
launcher_genericname.ulf \
launcher_unityquicklist.ulf \
launcher_name.ulf
LAUNCHERLIST_APPS = writer calc draw impress math base printeradmin startcenter
......@@ -146,7 +147,7 @@ ALLTAR : $(LAUNCHERFLAGFILE) $(SPECFILES) $(COMMONMISC)$/{$(PRODUCTLIST)}$/build
# merge-in the translations.
#
$(LAUNCHERFLAGFILE) : ../productversion.mk brand.pl translate.pl $(ULFDIR)$/launcher_name.ulf $(ULFDIR)$/launcher_comment.ulf $(ULFDIR)/launcher_genericname.ulf
$(LAUNCHERFLAGFILE) : ../productversion.mk brand.pl translate.pl $(ULFDIR)$/launcher_name.ulf $(ULFDIR)$/launcher_comment.ulf $(ULFDIR)/launcher_genericname.ulf $(ULFDIR)/launcher_unityquicklist.ulf
$(LAUNCHERFLAGFILE) : $(LAUNCHERDEPN)
@@-$(MKDIRHIER) $(@:db).$(INPATH).$(@:f)
@echo Creating desktop entries for $(@:f) ..
......@@ -155,6 +156,7 @@ $(LAUNCHERFLAGFILE) : $(LAUNCHERDEPN)
@$(PERL) translate.pl -p '$${{PRODUCTNAME}} $${{PRODUCTVERSION}}' -d $(@:db).$(INPATH).$(@:f) --ext "desktop" --key "Name" $(ULFDIR)$/launcher_name.ulf
@$(PERL) translate.pl -p '$${{PRODUCTNAME}} $${{PRODUCTVERSION}}' -d $(@:db).$(INPATH).$(@:f) --ext "desktop" --key "Comment" $(ULFDIR)$/launcher_comment.ulf
@$(PERL) translate.pl -p '$${{PRODUCTNAME}} $${{PRODUCTVERSION}}' -d $(@:db).$(INPATH).$(@:f) --ext "desktop" --key "GenericName" $(ULFDIR)$/launcher_genericname.ulf
@$(PERL) translate.pl -p '$${{PRODUCTNAME}} $${{PRODUCTVERSION}}' -d $(@:db).$(INPATH).$(@:f) --ext "desktop" --key "UnityQuicklist" $(ULFDIR)$/launcher_unityquicklist.ulf
.IF "$(WITH_LIBSN)"=="YES"
@noop x$(foreach,i,$(LAUNCHERLIST) $(shell @echo "StartupNotify=true" >> $(@:db).$(INPATH).$(@:f)/$i.desktop))x
.ENDIF
......
......@@ -64,6 +64,12 @@ while ($_ = $ARGV[0], /^-/) {
}
}
# hack for unity section
$outkey = $key;
if ( $outkey eq "UnityQuicklist" ) {
$outkey = "Name";
}
# open input file
unless (open(SOURCE, $ARGV[0])) {
print STDERR "Can't open $ARGV[0] file: $!\n";
......@@ -106,9 +112,12 @@ while (<SOURCE>) {
# Pass the head of the template to the output file
KEY: while (<TEMPLATE>) {
print OUTFILE;
$keyline = $_;
last KEY if (/$key/);
print OUTFILE;
}
$keyline=~s/^$key/$outkey/;
print OUTFILE $keyline;
} else {
# split locale = "value" into 2 strings
......@@ -125,10 +134,13 @@ KEY: while (<TEMPLATE>) {
$value=~s/%PRODUCTNAME/$productname/g;
$locale=~s/-/_/;
if (not $value eq '') {
if ($ext eq "desktop") {
print OUTFILE "$key\[$locale\]=$value\n";
print OUTFILE "$outkey\[$locale\]=$value\n";
} else {
print OUTFILE "\t\[$locale\]$key=$value\n";
print OUTFILE "\t\[$locale\]$outkey=$value\n";
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment