2012-01-12 15:19:40 -05:00
|
|
|
from objp.util import dontwrap
|
2012-01-13 15:25:34 -05:00
|
|
|
from cocoa.inter import PyOutline, GUIObjectView
|
2011-09-21 16:02:13 -04:00
|
|
|
|
2012-01-12 15:19:40 -05:00
|
|
|
class DirectoryOutlineView(GUIObjectView):
|
|
|
|
pass
|
2011-09-21 16:02:13 -04:00
|
|
|
|
2012-01-13 14:43:43 -05:00
|
|
|
class PyDirectoryOutline(PyOutline):
|
2012-01-12 15:19:40 -05:00
|
|
|
def addDirectory_(self, path: str):
|
|
|
|
self.model.add_directory(path)
|
2011-09-21 16:02:13 -04:00
|
|
|
|
2011-11-28 14:21:10 -05:00
|
|
|
def removeSelectedDirectory(self):
|
2012-01-12 15:19:40 -05:00
|
|
|
self.model.remove_selected()
|
2011-11-28 14:21:10 -05:00
|
|
|
|
2011-09-21 16:02:13 -04:00
|
|
|
# python --> cocoa
|
2012-01-12 15:19:40 -05:00
|
|
|
@dontwrap
|
2011-09-21 16:02:13 -04:00
|
|
|
def refresh_states(self):
|
|
|
|
# Under cocoa, both refresh() and refresh_states() do the same thing.
|
2012-01-12 15:19:40 -05:00
|
|
|
self.callback.refresh()
|