コード例 #1
0
ファイル: core.py プロジェクト: scott91e1/pypad
 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)
コード例 #2
0
ファイル: core.py プロジェクト: Nazek42/pypad
 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)
コード例 #3
0
ファイル: core.py プロジェクト: scott91e1/pypad
 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))
コード例 #4
0
ファイル: core.py プロジェクト: Nazek42/pypad
 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))