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