summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorXisco Fauli <anistenis@gmail.com>2011-06-19 15:32:48 +0200
committerXisco Fauli <anistenis@gmail.com>2011-06-19 15:32:48 +0200
commita773886f14f8739be11661acd55d62b6ee6e5e73 (patch)
tree56681615b8a7d8fd94b08f5b04652fb9956861cb /wizards
parent80e28a53f96e2727b618a07fa5534a8343983c72 (diff)
Avoid crashing after finnish button is clicked
Diffstat (limited to 'wizards')
-rw-r--r--wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py11
-rw-r--r--wizards/com/sun/star/wizards/ui/PathSelection.py4
2 files changed, 11 insertions, 4 deletions
diff --git a/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py b/wizards/com/sun/star/wizards/fax/FaxWizardDialogImpl.py
index 4d1119dee46a..58ee5ac8a3d3 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 ef5f6e4473a5..b8487990cead 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: