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