Example #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)
Example #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)
Example #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))
Example #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))