Kaydet (Commit) e3f8eb8d authored tarafından Julien Nabet's avatar Julien Nabet

tdf#94743: Web Wizard: Cannot export in ftp

1) Fix value of constants RES_OK, RES_CANCEL and RES_HELP
http://opengrok.libreoffice.org/xref/core/offapi/com/sun/star/awt/PushButtonType.idl#29

2) self.updatePublishUI was wrong because FTP appears in second but there are 2 elements
for each module (local dir, zip, ftp) in pubAware vector
comment was wrong:
- local takes elements 0 and 1
- zip takes elements 2 and 3
- ftp takes elements 4 (that's why "4" is the right value) and 5
see http://opengrok.libreoffice.org/xref/core/wizards/com/sun/star/wizards/web/WWD_Startup.py#509
So fix value passed to self.updatePublishUI + comment

Just a bit of history:
before fix of tdf#92934: Web Wizard: Cannot Export Zip archive (http://cgit.freedesktop.org/libreoffice/core/commit/?id=e72a4a3c2e1608e301daef0b6e87cc70d814e736),
the order seemed to be this one for pubAware: local, ftp, zip (whereas UI order was already local, zip and ftp)
Perhaps the fix was wrong since there was a similar pb for tdf#94421: Web Wizard, option shift when loading saved session

Anyway now the pubAware order is the same as UI order, it may help for readability.

minor
a) increase space for lblStatus (there weren't enough room for some locales, eg French)
b) replace use of copy3 (deprecated) by copy2

Change-Id: I27d3c2dd699fbe2d51a63e462c7b39e78895d1be
Reviewed-on: https://gerrit.libreoffice.org/19115Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarJulien Nabet <serval2412@yahoo.fr>
üst 1a6ec13d
......@@ -64,7 +64,7 @@ class UCB(object):
def copy1(self, sourceDir, targetDir, verifier):
files = self.listFiles(sourceDir, verifier)
for i in range(len(files)):
self.copy3(sourceDir, files[i], targetDir)
self.copy2(sourceDir, files[i], targetDir, "")
def copy2(self, sourceDir, filename, targetDir, targetName):
if (not self.fa.exists(targetDir, True)):
......
......@@ -51,9 +51,9 @@ from com.sun.star.ucb.OpenMode import FOLDERS
# the members ip, username, and password (via the methods setXXX(...))
# for details see the ui.events.DataAware classes. <br/>
class FTPDialog(WizardDialog):
RES_OK = 2
RES_CANCEL = 3
RES_HELP = 4
RES_OK = 1
RES_CANCEL = 2
RES_HELP = 3
# A Constant used for the setLabel(int) method to change the
# status-display. "unknown" is the status when the user first
......@@ -160,7 +160,7 @@ class FTPDialog(WizardDialog):
(0, 14, 68, 80, False, False, 14))
self.lblStatus = self.insertLabel("lblStatus",
PROPNAMES_LABEL,
(8, self.resources.resFTPDisconnected, "lblStatus", 86, 82, 9, 99))
(8, self.resources.resFTPDisconnected, "lblStatus", 86, 82, 9, 130))
self.ln3 = self.insertFixedLine("ln3",
PROPNAMES_LABEL,
(8, self.resources.resln3_value, "ln3", 6, 100, 10, 210))
......
......@@ -434,7 +434,7 @@ class WWD_Events(WWD_Startup):
def setFTPPublish(self):
if self.showFTPDialog(self.getPublisher(FTP_PUBLISHER)):
self.getPublisher(FTP_PUBLISHER).cp_Publish = True
self.updatePublishUI(2)
self.updatePublishUI(4)
'''
show the ftp dialog
......
......@@ -513,7 +513,7 @@ class WWD_Startup(WWD_General):
Objects on the same Vector need different DataObjectBinding,
I use this method...
@param data the CGPublish object
@param i the number of the object (0 = local, 1 = ftp, 2 = zip)
@param i the number of the object (0 = local, 1 = zip, 2 = ftp)
'''
def mountDataAware(self, data, i):
......
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