ProjectFlask/FlaskBabelExtension/PyBabelConfigDialog.py

branch
eric7
changeset 84
f39230b845e4
parent 83
d8788dc3442f
child 87
075f7667f69d
equal deleted inserted replaced
83:d8788dc3442f 84:f39230b845e4
39 39
40 self.configFilePicker.setMode( 40 self.configFilePicker.setMode(
41 EricPathPickerModes.SAVE_FILE_ENSURE_EXTENSION_MODE 41 EricPathPickerModes.SAVE_FILE_ENSURE_EXTENSION_MODE
42 ) 42 )
43 self.configFilePicker.setFilters( 43 self.configFilePicker.setFilters(
44 self.tr("Configuration Files (*.cfg);;" "All Files (*)") 44 self.tr("Configuration Files (*.cfg);;All Files (*)")
45 ) 45 )
46 self.configFilePicker.setDefaultDirectory(self.__ericProject.getProjectPath()) 46 self.configFilePicker.setDefaultDirectory(self.__ericProject.getProjectPath())
47 47
48 self.translationsDirectoryPicker.setMode(EricPathPickerModes.DIRECTORY_MODE) 48 self.translationsDirectoryPicker.setMode(EricPathPickerModes.DIRECTORY_MODE)
49 self.translationsDirectoryPicker.setDefaultDirectory( 49 self.translationsDirectoryPicker.setDefaultDirectory(
52 52
53 self.catalogFilePicker.setMode( 53 self.catalogFilePicker.setMode(
54 EricPathPickerModes.SAVE_FILE_ENSURE_EXTENSION_MODE 54 EricPathPickerModes.SAVE_FILE_ENSURE_EXTENSION_MODE
55 ) 55 )
56 self.catalogFilePicker.setFilters( 56 self.catalogFilePicker.setFilters(
57 self.tr("Message Catalog Files (*.pot);;" "All Files (*)") 57 self.tr("Message Catalog Files (*.pot);;All Files (*)")
58 ) 58 )
59 self.catalogFilePicker.setDefaultDirectory(self.__ericProject.getProjectPath()) 59 self.catalogFilePicker.setDefaultDirectory(self.__ericProject.getProjectPath())
60 60
61 self.configFilePicker.setFocus(Qt.FocusReason.OtherFocusReason) 61 self.configFilePicker.setFocus(Qt.FocusReason.OtherFocusReason)
62 62
142 self.catalogFilePicker.setText( 142 self.catalogFilePicker.setText(
143 os.path.join(translationsDirectory, "{0}.pot".format(domain)) 143 os.path.join(translationsDirectory, "{0}.pot".format(domain))
144 ) 144 )
145 145
146 @pyqtSlot(str) 146 @pyqtSlot(str)
147 def on_configFilePicker_textChanged(self, txt): 147 def on_configFilePicker_textChanged(self, txt): # noqa: U100
148 """ 148 """
149 Private slot to handle a change of the configuration file name. 149 Private slot to handle a change of the configuration file name.
150 150
151 @param txt configuration file name 151 @param txt configuration file name
152 @type str 152 @type str
153 """ 153 """
154 self.__updateOK() 154 self.__updateOK()
155 155
156 @pyqtSlot(str) 156 @pyqtSlot(str)
157 def on_translationsDirectoryPicker_textChanged(self, txt): 157 def on_translationsDirectoryPicker_textChanged(self, txt): # noqa: U100
158 """ 158 """
159 Private slot to handle a change of the catalog file name. 159 Private slot to handle a change of the catalog file name.
160 160
161 @param txt configuration file name 161 @param txt configuration file name
162 @type str 162 @type str
163 """ 163 """
164 self.__updateOK() 164 self.__updateOK()
165 self.__updateCatalogPicker() 165 self.__updateCatalogPicker()
166 166
167 @pyqtSlot(str) 167 @pyqtSlot(str)
168 def on_domainEdit_textChanged(self, txt): 168 def on_domainEdit_textChanged(self, txt): # noqa: U100
169 """ 169 """
170 Private slot to handle a change of the translations domain. 170 Private slot to handle a change of the translations domain.
171 171
172 @param txt entered translations domain 172 @param txt entered translations domain
173 @type str 173 @type str

eric ide

mercurial