diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2015-09-25 00:02:41 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-10-01 09:34:11 +0000 |
commit | 7e09b3656472bd5a3ef4090fd2ea6f521956fd53 (patch) | |
tree | 7e9f1af18326b28f2e0c0b46c22c9885dbadd099 /wizards | |
parent | 54a2c8c006e2f216e9d8c6b0ed625180c843c48b (diff) |
tdf#92553: Web Wizard: Not open FTP Configure on Web Wizard Preview Setting
Inherit from WizardDialog instead of object
Define required constants for buttons
Remove or tweak calls to super methods
Fix call setDialogProperties which was wrong since unification of this method
See ee122cfd36b3af030520f26a6a313bc7cd3156fd
With the patch, FTP dialog opens, we can also connect successfully to an ftp server
Still there are bugs to fix then, first of them directory selection
Change-Id: I86c3c9638114216627d92832c26ad780c12860b4
Reviewed-on: https://gerrit.libreoffice.org/18831
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/com/sun/star/wizards/web/FTPDialog.py | 24 | ||||
-rw-r--r-- | wizards/com/sun/star/wizards/web/FTPDialogResources.py | 2 |
2 files changed, 11 insertions, 15 deletions
diff --git a/wizards/com/sun/star/wizards/web/FTPDialog.py b/wizards/com/sun/star/wizards/web/FTPDialog.py index 765685c21f84..6f3cf755893e 100644 --- a/wizards/com/sun/star/wizards/web/FTPDialog.py +++ b/wizards/com/sun/star/wizards/web/FTPDialog.py @@ -19,7 +19,7 @@ import uno from .WWHID import * from .FTPDialogResources import FTPDialogResources -from ..ui.UnoDialog2 import UnoDialog2 +from ..ui.WizardDialog import WizardDialog from ..ui.UIConsts import UIConsts from ..ui.event.DataAware import DataAware from ..ui.event.UnoDataAware import UnoDataAware @@ -36,11 +36,6 @@ from com.sun.star.ucb import InteractiveNetworkResolveNameException from com.sun.star.ucb import OpenCommandArgument2 from com.sun.star.ucb.OpenMode import FOLDERS -#PushButtonType_OK_value = uno.getConstantByName( "com.sun.star.awt.PushButtonType.OK" ) -#PushButtonType_CANCEL_value = uno.getConstantByName( "com.sun.star.awt.PushButtonType.CANCEL" ) -#PushButtonType_HELP_value = uno.getConstantByName( "com.sun.star.awt.PushButtonType.HELP" ) - - # This is the FTP Dialog. <br/> # The Dialog enables the user: # (*) entering FTP server and user information. @@ -55,7 +50,10 @@ from com.sun.star.ucb.OpenMode import FOLDERS # I use here the DataAware concept to automatically update # the members ip, username, and password (via the methods setXXX(...)) # for details see the ui.events.DataAware classes. <br/> -class FTPDialog(UnoDialog2, UIConsts): +class FTPDialog(WizardDialog): + RES_OK = 2 + RES_CANCEL = 3 + RES_HELP = 4 # A Constant used for the setLabel(int) method to change the # status-display. "unknown" is the status when the user first @@ -97,7 +95,7 @@ class FTPDialog(UnoDialog2, UIConsts): # @throws Exception def __init__(self, xmsf, p, oWizardResource): - super(FTPDialog, self).__init__(xmsf) + super(FTPDialog, self).__init__(xmsf, HID_FTP) self.publish = p templateDir = p.root.soTemplateDir @@ -113,8 +111,8 @@ class FTPDialog(UnoDialog2, UIConsts): self.ucb = UCB(xmsf) # set dialog properties... - self.setDialogProperties( True, 160, HelpIds.getHelpIdString(HID_FTP), - True, "FTPDialog", 167, 82, self.resources.resFTPDialog_title, 222) + self.setDialogProperties(True, 210, True, 104, 52, 1, 1, + self.resources.resFTPDialog_title, 310) # add controls to dialog self.build() @@ -174,13 +172,13 @@ class FTPDialog(UnoDialog2, UIConsts): (14, HelpIds.getHelpIdString(HID_FTP_BTN_PATH), self.resources.resbtnDir_value, "btnDir", 199, 112, 12, 16), self) self.btnOK = self.insertButton("btnOK", None, PROPNAMES_BUTTON2, - (14, HelpIds.getHelpIdString(HID_FTP_OK), self.resources.resbtnOK_value, "btnOK", 165, 142, PushButtonType_OK_value, 13, 50), self) + (14, HelpIds.getHelpIdString(HID_FTP_OK), self.resources.resbtnOK_value, "btnOK", 165, 142, self.RES_OK, 13, 50), self) self.btnCancel = self.insertButton("btnCancel", None, PROPNAMES_BUTTON2, - (14, HelpIds.getHelpIdString(HID_FTP_CANCEL), self.resources.resbtnCancel_value, "btnCancel", 113, 142, PushButtonType_CANCEL_value, 14, 50), self) + (14, HelpIds.getHelpIdString(HID_FTP_CANCEL), self.resources.resbtnCancel_value, "btnCancel", 113, 142, self.RES_CANCEL, 14, 50), self) self.btnHelp = self.insertButton("btnHelp", None, PROPNAMES_BUTTON2, - (14, "", self.resources.resbtnHelp_value, "btnHelp", 57, 142, PushButtonType_HELP_value, 15, 50), self) + (14, "", self.resources.resbtnHelp_value, "btnHelp", 57, 142, self.RES_HELP, 15, 50), self) # Make hostname, username and password text fields data aware. diff --git a/wizards/com/sun/star/wizards/web/FTPDialogResources.py b/wizards/com/sun/star/wizards/web/FTPDialogResources.py index 399913c059f9..184159c1400a 100644 --- a/wizards/com/sun/star/wizards/web/FTPDialogResources.py +++ b/wizards/com/sun/star/wizards/web/FTPDialogResources.py @@ -21,8 +21,6 @@ class FTPDialogResources(object): RID_COMMON_START = 500 def __init__(self, oWizardResource): - super(FTPDialogResources, self).__init__(xmsf, self.MODULE_NAME) - self.resFTPDialog_title = oWizardResource.getResText( self.RID_FTPDIALOG_START + 0) self.reslblUsername_value = oWizardResource.getResText( |