Preferences/ConfigurationPages/EditorFilePage.py

changeset 3020
542e97d4ecb3
parent 3010
befeff46ec0f
child 3025
67064c71df21
equal deleted inserted replaced
3019:7912530a33e2 3020:542e97d4ecb3
184 @param filter file filter pattern to check (string) 184 @param filter file filter pattern to check (string)
185 @return flag indicating validity (boolean) 185 @return flag indicating validity (boolean)
186 """ 186 """
187 if not self.__showsOpenFilters and \ 187 if not self.__showsOpenFilters and \
188 filter.count("*") != 1: 188 filter.count("*") != 1:
189 E5MessageBox.critical(self, 189 E5MessageBox.critical(
190 self,
190 self.trUtf8("Add File Filter"), 191 self.trUtf8("Add File Filter"),
191 self.trUtf8("""A Save File Filter must contain exactly one""" 192 self.trUtf8("""A Save File Filter must contain exactly one"""
192 """ wildcard pattern. Yours contains {0}.""")\ 193 """ wildcard pattern. Yours contains {0}.""")\
193 .format(filter.count("*"))) 194 .format(filter.count("*")))
194 return False 195 return False
195 196
196 if filter.count("*") == 0: 197 if filter.count("*") == 0:
197 E5MessageBox.critical(self, 198 E5MessageBox.critical(
199 self,
198 self.trUtf8("Add File Filter"), 200 self.trUtf8("Add File Filter"),
199 self.trUtf8("""A File Filter must contain at least one""" 201 self.trUtf8("""A File Filter must contain at least one"""
200 """ wildcard pattern.""")) 202 """ wildcard pattern."""))
201 return False 203 return False
202 204

eric ide

mercurial