diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2014-03-03 11:57:34 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2014-05-07 14:47:24 +0200 |
commit | bf355f47f49eb352985c129544c60c27814f450b (patch) | |
tree | f438b29888099f38534d0572f0a3b89fac591967 | |
parent | 67dab7c4b851573747e41def560e26dacdb8ceac (diff) |
Resolves: fdo#77899 fax etc wizards don't start
Wizards should look for templates in Template_internal, not Template_user
...as only the former reliably denotes the share/template tree where the
wizard templates are stored. (Presumably the latter defaulted to the former as
long as it wasn't explicitly set in the past, but is now always explicitly set
since 838b77f5f3d6d8fd98891e99a23ff78a6a357cb2 "Resolves: rhbz#1065807 use xdg
~/Templates for default Template location.")
Change-Id: I7d1ac47d821c778fe342865465d0505a94b824bf
(cherry picked from commit 97822e3cbc63d3bd110bc3c654b3fbb4d4d1904c)
actively search for wizards dir in all internal templates
(cherry picked from commit 5fa18dc21644f2a719bf39ec948a586fa8837b6a)
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Conflicts:
wizards/com/sun/star/wizards/ui/WizardDialog.py
Change-Id: I4ef6da4d9d1931917e0aaa6e110fd273bd917b26
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
-rw-r--r-- | wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py | 2 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/ui/WizardDialog.py | 12 |
2 files changed, 11 insertions, 3 deletions
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py index 1ff5f1cb5da4..76921d0598b2 100644 --- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py @@ -773,7 +773,7 @@ class LetterWizardDialogImpl(LetterWizardDialog): return None def initializeTemplates(self, xMSF): - sLetterPath = self.sTemplatePath + "/../common/wizard/letter" + sLetterPath = self.sTemplatePath + "/wizard/letter" self.BusinessFiles = \ FileAccess.getFolderTitles( xMSF, "bus", sLetterPath, self.resources.dictBusinessTemplate) diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py index fc1ce41b047c..08a8c2d55ee9 100644 --- a/wizards/com/sun/star/wizards/ui/WizardDialog.py +++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py @@ -23,6 +23,7 @@ from .UnoDialog2 import UnoDialog2, Desktop, PropertyNames, UIConsts, \ from .event.CommonListener import TerminateListenerProcAdapter from ..common.Resource import Resource from ..common.HelpIds import HelpIds +from ..common.FileAccess import FileAccess from ..document.OfficeDocument import OfficeDocument from ..text.TextDocument import TextDocument @@ -114,10 +115,17 @@ class WizardDialog(UnoDialog2): def initializePaths(self): xPropertySet = \ self.xMSF.createInstance("com.sun.star.util.PathSettings") - self.sTemplatePath = \ - xPropertySet.getPropertyValue("Template_user")[0] self.sUserTemplatePath = \ xPropertySet.getPropertyValue("Template_writable") + myFA = FileAccess(self.xMSF) + aInternalPaths = xPropertySet.getPropertyValue("Template_internal") + self.sTemplatePath = "" + for path in aInternalPaths: + if myFA.exists(path + "/wizard", False): + self.sTemplatePath = path + break + if self.sTemplatePath == "": + raise Exception("could not find wizard templates") def addRoadmap(self): try: |