diff options
author | Xisco Fauli <anistenis@gmail.com> | 2012-10-03 20:53:37 +0200 |
---|---|---|
committer | Xisco Fauli <anistenis@gmail.com> | 2012-10-03 23:01:29 +0200 |
commit | ee70864a632e2abf219fe514b8736d887aba2602 (patch) | |
tree | 800241c93f75e01040984e6cb45f483751351510 /wizards | |
parent | ca821bf466759347089dd1938162bcd5fdd3ae00 (diff) |
pyfax: Cleanup resources
Change-Id: I68059a9ae31d22be3f1390eb065f13f98df8116b
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py | 15 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py | 43 |
2 files changed, 27 insertions, 31 deletions
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py index 249c2491bc14..b678f38a0dce 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py @@ -327,25 +327,28 @@ class FaxWizardDialogImpl(FaxWizardDialog): self.myFaxDoc.updateDateFields() def initializeSalutation(self): + #'Saludation' dropdown list self.setControlProperty("lstSalutation", "StringItemList", - self.resources.SalutationLabels) + tuple(self.resources.SalutationLabels)) def initializeGreeting(self): + #'Complimentary Close' dropdown list self.setControlProperty("lstGreeting", "StringItemList", - self.resources.GreetingLabels) + tuple(self.resources.GreetingLabels)) def initializeCommunication(self): + #'Type of message' dropdown list self.setControlProperty("lstCommunicationType", "StringItemList", - self.resources.CommunicationLabels) + tuple(self.resources.CommunicationLabels)) def __setDefaultForGreetingAndSalutationAndCommunication(self): - if self.lstSalutation.Text == "": + if not self.lstSalutation.Text: self.lstSalutation.setText(self.resources.SalutationLabels[0]) - if self.lstGreeting.Text == "": + if not self.lstGreeting.Text: self.lstGreeting.setText(self.resources.GreetingLabels[0]) - if self.lstCommunicationType.Text == "": + if not self.lstCommunicationType.Text: self.lstCommunicationType.setText( \ self.resources.CommunicationLabels[0]) diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py index ef60232fc7b0..33bda5616e36 100644 --- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py +++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogResources.py @@ -35,17 +35,13 @@ class FaxWizardDialogResources(Resource): resConsist2PlaceHolder = "#consist2#" resConsist3PlaceHolder = "#consist3#" - def __init__(self, xmsf): super(FaxWizardDialogResources,self).__init__(xmsf, FaxWizardDialogResources.MODULE_NAME) - self.RoadmapLabels = () - self.SalutationLabels = () - self.GreetingLabels = () - self.CommunicationLabels = () - - #Delete the String, uncomment the self.getResText method - + self.RoadmapLabels = [] + self.SalutationLabels = [] + self.GreetingLabels = [] + self.CommunicationLabels = [] self.resFaxWizardDialog_title = self.getResText( FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 1) @@ -145,40 +141,37 @@ class FaxWizardDialogResources(Resource): FaxWizardDialogResources.resConsist3PlaceHolder : self.getResText( FaxWizardDialogResources.RID_FAXWIZARDDIALOG_START + 48)} - self.loadRoadmapResources() - self.loadSalutationResources() - self.loadGreetingResources() - self.loadCommunicationResources() - self.loadCommonResources() - - def loadCommonResources(self): + #Common Resources self.resOverwriteWarning = self.getResText( FaxWizardDialogResources.RID_RID_COMMON_START + 19) self.resTemplateDescription = self.getResText( FaxWizardDialogResources.RID_RID_COMMON_START + 20) + + self.loadRoadmapResources() + self.loadSalutationResources() + self.loadGreetingResources() + self.loadCommunicationResources() def loadRoadmapResources(self): for i in xrange(5): - self.RoadmapLabels = self.RoadmapLabels + ((self.getResText( + self.RoadmapLabels.append(self.getResText( FaxWizardDialogResources.RID_FAXWIZARDROADMAP_START + \ - + i + 1)),) + + i + 1)) def loadSalutationResources(self): - i = 1 for i in xrange(4): - self.SalutationLabels = self.SalutationLabels + ((self.getResText( + self.SalutationLabels.append(self.getResText( FaxWizardDialogResources.RID_FAXWIZARDSALUTATION_START + \ - i + 1)),) + i + 1)) def loadGreetingResources(self): for i in xrange(4): - self.GreetingLabels = self.GreetingLabels + ((self.getResText( + self.GreetingLabels.append(self.getResText( FaxWizardDialogResources.RID_FAXWIZARDGREETING_START + \ - i +1 )),) + i + 1)) def loadCommunicationResources(self): for i in xrange(3): - self.CommunicationLabels = \ - self.CommunicationLabels + ((self.getResText( + self.CommunicationLabels.append(self.getResText( FaxWizardDialogResources.RID_FAXWIZARDCOMMUNICATION_START + \ - i + 1)),) + i + 1)) |