Kaydet (Commit) ee70864a authored tarafından Xisco Fauli's avatar Xisco Fauli

pyfax: Cleanup resources

Change-Id: I68059a9ae31d22be3f1390eb065f13f98df8116b
üst ca821bf4
......@@ -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])
......
......@@ -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))
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