ViewManager/ViewManager.py

changeset 2331
9e623311630d
parent 2329
7706d05104c5
child 2334
fc69ad77e18a
equal deleted inserted replaced
2329:7706d05104c5 2331:9e623311630d
209 if len(self.recent): 209 if len(self.recent):
210 return self.recent[0] 210 return self.recent[0]
211 else: 211 else:
212 return None 212 return None
213 213
214 def setSbInfo(self, sbFile, sbLine, sbPos, sbWritable, sbEncoding, sbLanguage, sbEol): 214 def setSbInfo(self, sbLine, sbPos, sbWritable, sbEncoding, sbLanguage, sbEol):
215 """ 215 """
216 Public method to transfer statusbar info from the user interface to viewmanager. 216 Public method to transfer statusbar info from the user interface to viewmanager.
217 217
218 @param sbFile reference to the file part of the statusbar (E5SqueezeLabelPath)
219 @param sbLine reference to the line number part of the statusbar (QLabel) 218 @param sbLine reference to the line number part of the statusbar (QLabel)
220 @param sbPos reference to the character position part of the statusbar (QLabel) 219 @param sbPos reference to the character position part of the statusbar (QLabel)
221 @param sbWritable reference to the writability indicator part of 220 @param sbWritable reference to the writability indicator part of
222 the statusbar (QLabel) 221 the statusbar (QLabel)
223 @param sbEncoding reference to the encoding indicator part of the 222 @param sbEncoding reference to the encoding indicator part of the
224 statusbar (QLabel) 223 statusbar (QLabel)
225 @param sbLanguage reference to the language indicator part of the 224 @param sbLanguage reference to the language indicator part of the
226 statusbar (QLabel) 225 statusbar (QLabel)
227 @param sbEol reference to the eol indicator part of the statusbar (QLabel) 226 @param sbEol reference to the eol indicator part of the statusbar (QLabel)
228 """ 227 """
229 self.sbFile = sbFile
230 self.sbLine = sbLine 228 self.sbLine = sbLine
231 self.sbPos = sbPos 229 self.sbPos = sbPos
232 self.sbWritable = sbWritable 230 self.sbWritable = sbWritable
233 self.sbEnc = sbEncoding 231 self.sbEnc = sbEncoding
234 self.sbLang = sbLanguage 232 self.sbLang = sbLanguage
3960 if QFileInfo(fn).isWritable(): 3958 if QFileInfo(fn).isWritable():
3961 writ = 'rw' 3959 writ = 'rw'
3962 else: 3960 else:
3963 writ = 'ro' 3961 writ = 'ro'
3964 self.sbWritable.setText(writ) 3962 self.sbWritable.setText(writ)
3965 self.sbFile.setTextPath(QApplication.translate('ViewManager', 'File: {0}'), fn)
3966 3963
3967 if line is None: 3964 if line is None:
3968 line = '' 3965 line = ''
3969 self.sbLine.setText(QApplication.translate('ViewManager', 'Line: {0:5}') 3966 self.sbLine.setText(QApplication.translate('ViewManager', 'Line: {0:5}')
3970 .format(line)) 3967 .format(line))

eric ide

mercurial