src/eric7/WebBrowser/Sync/SyncHostTypePage.py

branch
eric7
changeset 9221
bf71ee032bb4
parent 9209
b99e7fd55fd3
child 9413
80c06d472826
equal deleted inserted replaced
9220:e9e7eca7efee 9221:bf71ee032bb4
18 18
19 class SyncHostTypePage(QWizardPage, Ui_SyncHostTypePage): 19 class SyncHostTypePage(QWizardPage, Ui_SyncHostTypePage):
20 """ 20 """
21 Class implementing the synchronization host type wizard page. 21 Class implementing the synchronization host type wizard page.
22 """ 22 """
23
23 def __init__(self, parent=None): 24 def __init__(self, parent=None):
24 """ 25 """
25 Constructor 26 Constructor
26 27
27 @param parent reference to the parent widget (QWidget) 28 @param parent reference to the parent widget (QWidget)
28 """ 29 """
29 super().__init__(parent) 30 super().__init__(parent)
30 self.setupUi(self) 31 self.setupUi(self)
31 32
32 if Preferences.getWebBrowser("SyncType") == SyncGlobals.SyncTypeFtp: 33 if Preferences.getWebBrowser("SyncType") == SyncGlobals.SyncTypeFtp:
33 self.ftpRadioButton.setChecked(True) 34 self.ftpRadioButton.setChecked(True)
34 elif ( 35 elif Preferences.getWebBrowser("SyncType") == SyncGlobals.SyncTypeDirectory:
35 Preferences.getWebBrowser("SyncType") ==
36 SyncGlobals.SyncTypeDirectory
37 ):
38 self.directoryRadioButton.setChecked(True) 36 self.directoryRadioButton.setChecked(True)
39 else: 37 else:
40 self.noneRadioButton.setChecked(True) 38 self.noneRadioButton.setChecked(True)
41 39
42 def nextId(self): 40 def nextId(self):
43 """ 41 """
44 Public method returning the ID of the next wizard page. 42 Public method returning the ID of the next wizard page.
45 43
46 @return next wizard page ID (integer) 44 @return next wizard page ID (integer)
47 """ 45 """
48 # save the settings 46 # save the settings
49 if self.ftpRadioButton.isChecked(): 47 if self.ftpRadioButton.isChecked():
50 Preferences.setWebBrowser("SyncType", SyncGlobals.SyncTypeFtp) 48 Preferences.setWebBrowser("SyncType", SyncGlobals.SyncTypeFtp)
51 return SyncGlobals.PageFTPSettings 49 return SyncGlobals.PageFTPSettings
52 elif self.directoryRadioButton.isChecked(): 50 elif self.directoryRadioButton.isChecked():
53 Preferences.setWebBrowser( 51 Preferences.setWebBrowser("SyncType", SyncGlobals.SyncTypeDirectory)
54 "SyncType", SyncGlobals.SyncTypeDirectory)
55 return SyncGlobals.PageDirectorySettings 52 return SyncGlobals.PageDirectorySettings
56 else: 53 else:
57 Preferences.setWebBrowser("SyncType", SyncGlobals.SyncTypeNone) 54 Preferences.setWebBrowser("SyncType", SyncGlobals.SyncTypeNone)
58 return SyncGlobals.PageCheck 55 return SyncGlobals.PageCheck

eric ide

mercurial