[Libreoffice-commits] .: Branch 'feature/gsoc2011_wizards' - wizards/com
Xisco Fauli
xfauli at kemper.freedesktop.org
Sun Jun 19 06:36:17 PDT 2011
wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py | 11 ++++++++---
wizards/com/sun/star/wizards/ui/PathSelection.py | 4 +++-
2 files changed, 11 insertions(+), 4 deletions(-)
New commits:
commit 98aeeaa61d2e57e3e4b874570e1da5035bedc2b2
Author: Xisco Fauli <anistenis at gmail.com>
Date: Sun Jun 19 15:32:48 2011 +0200
Avoid crashing after finnish button is clicked
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
index 4d1119d..58ee5ac 100644
--- a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
+++ b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
@@ -138,12 +138,16 @@ class FaxWizardDialogImpl(FaxWizardDialog):
self.myFaxDoc.setWizardTemplateDocInfo( \
self.resources.resFaxWizardDialog_title,
self.resources.resTemplateDescription)
+ endWizard = True
try:
fileAccess = FileAccess(self.xMSF)
self.sPath = self.myPathSelection.getSelectedPath()
- if self.sPath is "":
+ if self.sPath == "":
self.myPathSelection.triggerPathPicker()
self.sPath = self.myPathSelection.getSelectedPath()
+ if self.sPath == "":
+ endWizard = False
+ return
self.sPath = fileAccess.getURL(self.sPath)
#first, if the filename was not changed, thus
@@ -206,8 +210,9 @@ class FaxWizardDialogImpl(FaxWizardDialog):
except UnoException, e:
traceback.print_exc()
finally:
- self.xUnoDialog.endExecute()
- self.running = False
+ if endWizard:
+ self.xUnoDialog.endExecute()
+ self.running = False
return True
diff --git a/wizards/com/sun/star/wizards/ui/PathSelection.py b/wizards/com/sun/star/wizards/ui/PathSelection.py
index ef5f6e4..b848799 100644
--- a/wizards/com/sun/star/wizards/ui/PathSelection.py
+++ b/wizards/com/sun/star/wizards/ui/PathSelection.py
@@ -89,6 +89,8 @@ class PathSelection(object):
def triggerPathPicker(self):
try:
+ print self.iTransferMode
+ print self.TransferMode.SAVE
if self.iTransferMode == self.TransferMode.SAVE:
if self.iDialogType == self.DialogTypes.FOLDER:
#TODO: write code for picking a folder for saving
@@ -106,7 +108,7 @@ class PathSelection(object):
self.xSaveTextBox.Text = myFA.getPath(sStorePath, None)
self.sDefaultDirectory = \
FileAccess.getParentDir(sStorePath)
- self.sDefaultName = myFA.getFilename(self.sStorePath)
+ self.sDefaultName = myFA.getFilename(sStorePath)
return
elif iTransferMode == TransferMode.LOAD:
if iDialogType == DialogTypes.FOLDER:
More information about the Libreoffice-commits
mailing list