[Libreoffice-commits] .: wizards/com

Xisco Fauli xfauli at kemper.freedesktop.org
Thu Jul 7 06:11:38 PDT 2011


 wizards/com/sun/star/wizards/common/Resource.py               |    1 
 wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py       |    2 
 wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py |   22 +++-------
 wizards/com/sun/star/wizards/ui/WizardDialog.py               |    9 ----
 4 files changed, 9 insertions(+), 25 deletions(-)

New commits:
commit c989ee10e5a849d07c2b4ecd191d8a8144ab390d
Author: Xisco Fauli <anistenis at gmail.com>
Date:   Thu Jul 7 13:47:20 2011 +0200

    Show wizard dialog on top

diff --git a/wizards/com/sun/star/wizards/common/Resource.py b/wizards/com/sun/star/wizards/common/Resource.py
index c6afce2..ce2c9e1 100644
--- a/wizards/com/sun/star/wizards/common/Resource.py
+++ b/wizards/com/sun/star/wizards/common/Resource.py
@@ -23,7 +23,6 @@ class Resource(object):
 
             self.xStringIndexAccess = xResource.getByName("String")
             self.xStringListIndexAccess = xResource.getByName("StringList")
-
             if self.xStringListIndexAccess is None:
                 raise Exception ("could not initialize xStringListIndexAccess")
 
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
index f4495e2..94ffa54 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
@@ -422,7 +422,7 @@ class FaxWizardDialogImpl(FaxWizardDialog):
         #set correct Configuration tree:
         if self.optBusinessFax.State:
             self.optBusinessFaxItemChanged()
-        if self.optPrivateFax.State:
+        elif self.optPrivateFax.State:
             self.optPrivateFaxItemChanged()
 
     def optBusinessFaxItemChanged(self):
diff --git a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
index bc1e3ec..ca37b8d 100644
--- a/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
+++ b/wizards/com/sun/star/wizards/letter/LetterWizardDialogImpl.py
@@ -77,7 +77,6 @@ class LetterWizardDialogImpl(LetterWizardDialog):
             self.buildStep4()
             self.buildStep5()
             self.buildStep6()
-
             self.__initializePaths()
             self.initializeNorms()
             self.initializeSalutation()
@@ -379,7 +378,6 @@ class LetterWizardDialogImpl(LetterWizardDialog):
         self.chkBusinessPaperItemChanged()
         self.setElements(False)
         self.myLetterDoc.xTextDocument.unlockControllers()
-        self.activate()
 
     def lstPrivOfficialStyleItemChanged(self):
         TextDocument.xTextDocument = \
@@ -391,7 +389,6 @@ class LetterWizardDialogImpl(LetterWizardDialog):
         self.setPossibleSenderData(True)
         self.setElements(False)
         self.myLetterDoc.xTextDocument.unlockControllers()
-        self.activate()
 
     def lstPrivateStyleItemChanged(self):
         TextDocument.xTextDocument = \
@@ -402,7 +399,6 @@ class LetterWizardDialogImpl(LetterWizardDialog):
         self.initializeElements()
         self.setElements(True)
         self.myLetterDoc.xTextDocument.unlockControllers()
-        self.activate()
 
     def numLogoHeightTextChanged(self):
         self.BusCompanyLogo.iHeight = int(self.numLogoHeight.Value * 1000)
@@ -892,10 +888,10 @@ class LetterWizardDialogImpl(LetterWizardDialog):
         if self.optBusinessLetter.State:
             self.lstBusinessStyleItemChanged()
 
-        if optPrivOfficialLetter.State:
+        elif optPrivOfficialLetter.State:
             self.lstPrivOfficialStyleItemChanged()
 
-        if optPrivateLetter.State:
+        elif optPrivateLetter.State:
             self.lstPrivateStyleItemChanged()
 
     def initializeSalutation(self):
@@ -928,6 +924,7 @@ class LetterWizardDialogImpl(LetterWizardDialog):
         found = False
         cIsoCode = ""
         MSID = ""
+        LanguageLabels = []
 
         for i in nameList:
             found = False
@@ -950,13 +947,10 @@ class LetterWizardDialogImpl(LetterWizardDialog):
             if found:
                 self.Norms.append(cIsoCode)
                 self.NormPaths.append(i)
-                #LanguageLabelsVector.add(lc.getLanguageString(MSID))
+                #LanguageLabels.append(lc.getLanguageString(MSID))
 
-        #COMMENTED
-        #LanguageLabels = [LanguageLabelsVector.size()]
-        #LanguageLabelsVector.toArray(LanguageLabels)
-        #self.setControlProperty(
-        #    "lstLetterNorm", "StringItemList", LanguageLabels)
+        self.setControlProperty(
+            "lstLetterNorm", "StringItemList", tuple(LanguageLabels))
 
     def getCurrentLetter(self):
         if self.myConfig.cp_LetterType == 0:
@@ -1029,10 +1023,10 @@ class LetterWizardDialogImpl(LetterWizardDialog):
         if self.optBusinessLetter.State:
             self.optBusinessLetterItemChanged()
 
-        if self.optPrivOfficialLetter.State:
+        elif self.optPrivOfficialLetter.State:
             self.optPrivOfficialLetterItemChanged()
 
-        if self.optPrivateLetter.State:
+        elif self.optPrivateLetter.State:
             self.optPrivateLetterItemChanged()
 
     def setElements(self, privLetter):
diff --git a/wizards/com/sun/star/wizards/ui/WizardDialog.py b/wizards/com/sun/star/wizards/ui/WizardDialog.py
index f32f01a..30e55da 100644
--- a/wizards/com/sun/star/wizards/ui/WizardDialog.py
+++ b/wizards/com/sun/star/wizards/ui/WizardDialog.py
@@ -47,15 +47,6 @@ class WizardDialog(UnoDialog2):
     def getResource(self):
         return self.__oWizardResource
 
-    def activate(self):
-        try:
-            if self.xUnoDialog is not None:
-                self.xUnoDialog.toFront()
-
-        except Exception, ex:
-            pass
-            # do nothing;
-
     def itemStateChanged(self, itemEvent):
         try:
             self.nNewStep = itemEvent.ItemId


More information about the Libreoffice-commits mailing list