def add(self, buf, **kw): """Add a buffer to the editor.""" self._buffers.append(buf) p, f = os.path.split(buf.path) kw['text'] = TAB.format(path=p, file=f) if 'image' in kw: kw.pop('image') super().add(buf, **kw)
def add(self, buf, **kw): """Add a buffer to the editor.""" self._buffers.append(buf) p, f = os.path.split(buf.path) kw["text"] = TAB.format(path=p, file=f) if "image" in kw: kw.pop("image") super().add(buf, **kw)
def update_tabs(self): """Change the tabs' text to reflect their buffers.""" for i in range(self.index('end')): buf = self.buffer(i) p, f = os.path.split(buf.path) self.tab(i, text=TAB.format(path=p, file=f))
def update_tabs(self): """Change the tabs' text to reflect their buffers.""" for i in range(self.index("end")): buf = self.buffer(i) p, f = os.path.split(buf.path) self.tab(i, text=TAB.format(path=p, file=f))