summaryrefslogtreecommitdiff
path: root/wizards/com/sun/star/wizards/web
diff options
context:
space:
mode:
Diffstat (limited to 'wizards/com/sun/star/wizards/web')
-rw-r--r--wizards/com/sun/star/wizards/web/WWD_Events.py4
-rw-r--r--wizards/com/sun/star/wizards/web/WWD_General.py36
-rw-r--r--wizards/com/sun/star/wizards/web/WWD_Startup.py9
-rw-r--r--wizards/com/sun/star/wizards/web/WebWizardConst.py3
-rw-r--r--wizards/com/sun/star/wizards/web/WebWizardDialog.py3
5 files changed, 33 insertions, 22 deletions
diff --git a/wizards/com/sun/star/wizards/web/WWD_Events.py b/wizards/com/sun/star/wizards/web/WWD_Events.py
index af88c00160db..50d5bc793f29 100644
--- a/wizards/com/sun/star/wizards/web/WWD_Events.py
+++ b/wizards/com/sun/star/wizards/web/WWD_Events.py
@@ -425,8 +425,8 @@ class WWD_Events(WWD_Startup):
'''
def updatePublishUI(self, number):
- (self.pubAware[number]).updateUI()
- (self.pubAware[number + 1]).updateUI()
+ self.pubAware[number].updateUI()
+ self.pubAware[number + 1].updateUI()
self.checkPublish()
'''
diff --git a/wizards/com/sun/star/wizards/web/WWD_General.py b/wizards/com/sun/star/wizards/web/WWD_General.py
index 4a06ce67e80d..cecd51e66365 100644
--- a/wizards/com/sun/star/wizards/web/WWD_General.py
+++ b/wizards/com/sun/star/wizards/web/WWD_General.py
@@ -30,10 +30,7 @@ from ..common.HelpIds import HelpIds
from ..common.PropertyNames import PropertyNames
from ..ui.event.ListModelBinder import ListModelBinder
-from com.sun.star.lang import IllegalArgumentException
-
'''
-@author rpiterman
This class implements general methods, used by different sub-classes
(either WWD_Sturtup, or WWD_Events) or both.
'''
@@ -172,6 +169,8 @@ class WWD_General(WebWizardDialog):
If it is empty, then step3 and on are disabled.
'''
if self.checkDocList():
+ self.changeLocalDirState(self.chkLocalDir.Model.State)
+ self.changeZipState(self.chkZip.Model.State)
self.checkPublish()
'''
@@ -232,7 +231,7 @@ class WWD_General(WebWizardDialog):
if p.cp_Publish:
url = getattr(text.Model, _property)
if url is None or url == "":
- raise IllegalArgumentException ()
+ return False
else:
return True
else:
@@ -248,15 +247,12 @@ class WWD_General(WebWizardDialog):
'''
def checkPublish_(self):
- try:
- return \
- self.checkPublish2(LOCAL_PUBLISHER, self.txtLocalDir, "Text") \
- or (not self.proxies and self.checkPublish2(
- FTP_PUBLISHER, self.lblFTP, PropertyNames.PROPERTY_LABEL) \
- or self.checkPublish2(ZIP_PUBLISHER, self.txtZip, "Text")) \
- and self.checkSaveSession()
- except IllegalArgumentException as ex:
- return False
+ return \
+ self.checkPublish2(LOCAL_PUBLISHER, self.txtLocalDir, "Text") \
+ or (not self.proxies and self.checkPublish2(
+ FTP_PUBLISHER, self.lblFTP, PropertyNames.PROPERTY_LABEL) \
+ or self.checkPublish2(ZIP_PUBLISHER, self.txtZip, "Text")) \
+ and self.checkSaveSession()
'''
This method checks if the publishing
@@ -269,6 +265,20 @@ class WWD_General(WebWizardDialog):
def checkPublish(self):
self.enableFinishButton(self.checkPublish_())
+ def chkLocalDirItemChanged(self):
+ self.changeLocalDirState(self.chkLocalDir.Model.State)
+ self.checkPublish()
+
+ def chkZipItemChanged(self):
+ self.changeZipState(self.chkZip.Model.State)
+ self.checkPublish()
+
+ def changeLocalDirState(self, enable):
+ self.btnLocalDir.Model.Enabled = enable
+
+ def changeZipState(self, enable):
+ self.btnZip.Model.Enabled = enable
+
'''
shows a message box "Unexpected Error... " :-)
@param ex
diff --git a/wizards/com/sun/star/wizards/web/WWD_Startup.py b/wizards/com/sun/star/wizards/web/WWD_Startup.py
index f76ffc4f327d..b2dfecda0460 100644
--- a/wizards/com/sun/star/wizards/web/WWD_Startup.py
+++ b/wizards/com/sun/star/wizards/web/WWD_Startup.py
@@ -127,6 +127,8 @@ class WWD_Startup(WWD_General):
self.buildStep5()
self.buildStep6()
self.buildStep7(self.proxies, exclamationURL)
+ self.txtLocalDir.Model.Enabled = False
+ self.txtZip.Model.Enabled = False
self.buildStepX()
self.xMSF = xmsf
xDesktop = Desktop.getDesktop(xmsf)
@@ -223,7 +225,6 @@ class WWD_Startup(WWD_General):
DataAware.updateUIs(self.genAware)
DataAware.updateUIs(self.pubAware)
self.sessionNameDA.updateUI()
- self.checkPublish()
'''
create the peer, add roadmap,
@@ -448,9 +449,9 @@ class WWD_Startup(WWD_General):
self.pubAware_(
LOCAL_PUBLISHER, self.chkLocalDir, self.txtLocalDir, False)
self.pubAware_(
- FTP_PUBLISHER, self.chkFTP, self.lblFTP, True)
- self.pubAware_(
ZIP_PUBLISHER, self.chkZip, self.txtZip, False)
+ self.pubAware_(
+ FTP_PUBLISHER, self.chkFTP, self.lblFTP, True)
self.sessionNameDA = UnoDataAware.attachEditControl(
self.settings.cp_DefaultSession, "cp_Name",
self.cbSaveSettings, True)
@@ -466,8 +467,6 @@ class WWD_Startup(WWD_General):
def pubAware_(self, publish, checkbox, textbox, isLabel):
p = self.settings.cp_DefaultSession.cp_Publishing.getElement(publish)
uda = UnoDataAware.attachCheckBox(p, "cp_Publish", checkbox, True)
- uda.Inverse = True
- uda.disableObjects = [textbox]
self.pubAware.append(uda)
if isLabel:
aux = UnoDataAware.attachLabel(p, "cp_URL", textbox, False)
diff --git a/wizards/com/sun/star/wizards/web/WebWizardConst.py b/wizards/com/sun/star/wizards/web/WebWizardConst.py
index 7af2518441f0..f6a2282dc9f7 100644
--- a/wizards/com/sun/star/wizards/web/WebWizardConst.py
+++ b/wizards/com/sun/star/wizards/web/WebWizardConst.py
@@ -29,7 +29,8 @@ BTNICONSETS_ACTION_PERFORMED = "chooseIconset" # "btnIconSetsActionPerformed"
BTNFAVICON_ACTION_PERFORMED = "chooseFavIcon" # "btnFavIconActionPerformed"
BTNPREVIEW_ACTION_PERFORMED = "documentPreview" # "btnPreviewActionPerformed"
BTNFTP_ACTION_PERFORMED = "setFTPPublish" # "btnFTPActionPerformed"
-CHKLOCALDIR_ITEM_CHANGED = "checkPublish" # "chkLocalDirItemChanged"
+CHKLOCALDIR_ITEM_CHANGED = "chkLocalDirItemChanged" # "chkLocalDirItemChanged"
+CHKZIP_ITEM_CHANGED = "chkZipItemChanged"
CHKSAVESETTINGS_ITEM_CHANGED = "checkPublish" # "chkSaveSettingsItemChanged"
TXTSAVESETTINGS_TEXT_CHANGED = "checkPublish" # "txtSaveSettingsTextChanged"
BTNLOCALDIR_ACTION_PERFORMED = "setPublishLocalDir" # "btnLocalDirActionPerformed"
diff --git a/wizards/com/sun/star/wizards/web/WebWizardDialog.py b/wizards/com/sun/star/wizards/web/WebWizardDialog.py
index 47a788079f3a..80b221c96310 100644
--- a/wizards/com/sun/star/wizards/web/WebWizardDialog.py
+++ b/wizards/com/sun/star/wizards/web/WebWizardDialog.py
@@ -599,7 +599,8 @@ class WebWizardDialog(WizardDialog):
self.resources.resbtnLocalDir_value, "btnLocalDir",
308, 77, 7, tabIndex + 1, 16), self)
self.chkZip = self.insertCheckBox(
- "chkZip", None, WebWizardDialog.PROPNAMES_CHKBOX,
+ "chkZip", CHKZIP_ITEM_CHANGED,
+ WebWizardDialog.PROPNAMES_CHKBOX,
(9, HelpIds.getHelpIdString(HID7_CHK_PUBLISH_ZIP),
self.resources.reschkZip_value, "chkZip", 103, 96, 0, 7,
tabIndex + 1, 215), self)