Beispiel #1
0
 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)
Beispiel #2
0
 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)
Beispiel #3
0
 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))
Beispiel #4
0
 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))