1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 22:51:39 +00:00

Comverted DirectoryOutline to objp. I converted HSColumns and I realized at the end that I didn't need to do it yet, but well, it will be done for ResultsTable.

--HG--
branch : objp
This commit is contained in:
Virgil Dupras
2012-01-12 15:19:40 -05:00
parent 45d4915d88
commit 0d78201548
8 changed files with 56 additions and 36 deletions

View File

@@ -1,17 +1,20 @@
from cocoa.inter import PyOutline
from objp.util import dontwrap
from cocoa.inter2 import PyOutline, GUIObjectView
from core.gui.directory_tree import DirectoryTree
class DirectoryOutlineView(GUIObjectView):
pass
class PyDirectoryOutline(PyOutline):
py_class = DirectoryTree
FOLLOW_PROTOCOLS = ['PyOutline2']
def addDirectory_(self, path):
self.py.add_directory(path)
def addDirectory_(self, path: str):
self.model.add_directory(path)
def removeSelectedDirectory(self):
self.py.remove_selected()
self.model.remove_selected()
# python --> cocoa
@dontwrap
def refresh_states(self):
# Under cocoa, both refresh() and refresh_states() do the same thing.
self.cocoa.refresh()
self.callback.refresh()