Preferences/ConfigurationPages/PluginManagerPage.py

branch
Py2 comp.
changeset 3142
55030c09e142
parent 3058
0a02c433f52d
parent 3113
2780e230f129
child 3145
a9de05d4a22f
equal deleted inserted replaced
3141:72f3bde98c58 3142:55030c09e142
41 self.activateExternalPluginsCheckBox.setChecked( 41 self.activateExternalPluginsCheckBox.setChecked(
42 Preferences.getPluginManager("ActivateExternal")) 42 Preferences.getPluginManager("ActivateExternal"))
43 self.downloadDirEdit.setText( 43 self.downloadDirEdit.setText(
44 Preferences.getPluginManager("DownloadPath")) 44 Preferences.getPluginManager("DownloadPath"))
45 45
46 period = Preferences.getPluginManager("UpdatesCheckInterval")
47 if period == 0:
48 self.noCheckRadioButton.setChecked(True)
49 elif period == 1:
50 self.dailyCheckRadioButton.setChecked(True)
51 elif period == 2:
52 self.weeklyCheckRadioButton.setChecked(True)
53 elif period == 3:
54 self.monthlyCheckRadioButton.setChecked(True)
55
56 self.downloadedOnlyCheckBox.setChecked(
57 Preferences.getPluginManager("CheckInstalledOnly"))
58
59 self.__repositoryUrl = Preferences.getUI("PluginRepositoryUrl5")
60 self.repositoryUrlEdit.setText(self.__repositoryUrl)
61
46 def save(self): 62 def save(self):
47 """ 63 """
48 Public slot to save the Viewmanager configuration. 64 Public slot to save the Viewmanager configuration.
49 """ 65 """
50 Preferences.setPluginManager( 66 Preferences.setPluginManager(
51 "ActivateExternal", 67 "ActivateExternal",
52 self.activateExternalPluginsCheckBox.isChecked()) 68 self.activateExternalPluginsCheckBox.isChecked())
53 Preferences.setPluginManager( 69 Preferences.setPluginManager(
54 "DownloadPath", 70 "DownloadPath",
55 self.downloadDirEdit.text()) 71 self.downloadDirEdit.text())
72
73 if self.noCheckRadioButton.isChecked():
74 period = 0
75 elif self.dailyCheckRadioButton.isChecked():
76 period = 1
77 elif self.weeklyCheckRadioButton.isChecked():
78 period = 2
79 elif self.monthlyCheckRadioButton.isChecked():
80 period = 3
81 Preferences.setPluginManager("UpdatesCheckInterval", period)
82
83 Preferences.setPluginManager(
84 "CheckInstalledOnly",
85 self.downloadedOnlyCheckBox.isChecked())
86
87 if self.repositoryUrlEdit.text() != self.__repositoryUrl:
88 Preferences.setUI(
89 "PluginRepositoryUrl5", self.repositoryUrlEdit.text())
56 90
57 @pyqtSlot() 91 @pyqtSlot()
58 def on_downloadDirButton_clicked(self): 92 def on_downloadDirButton_clicked(self):
59 """ 93 """
60 Private slot to handle the directory selection via dialog. 94 Private slot to handle the directory selection via dialog.
69 dn = Utilities.toNativeSeparators(directory) 103 dn = Utilities.toNativeSeparators(directory)
70 while dn.endswith(os.sep): 104 while dn.endswith(os.sep):
71 dn = dn[:-1] 105 dn = dn[:-1]
72 self.downloadDirEdit.setText(dn) 106 self.downloadDirEdit.setText(dn)
73 107
108 @pyqtSlot(bool)
109 def on_repositoryUrlEditButton_toggled(self, checked):
110 """
111 Private slot to set the read only status of the repository URL line
112 edit.
113
114 @param checked state of the push button (boolean)
115 """
116 self.repositoryUrlEdit.setReadOnly(not checked)
117
74 118
75 def create(dlg): 119 def create(dlg):
76 """ 120 """
77 Module function to create the configuration page. 121 Module function to create the configuration page.
78 122

eric ide

mercurial