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

Fixed the mess I had to introduce earlier to make selectable list work by using objp's new inheritance capabilities.

--HG--
branch : objp
This commit is contained in:
Virgil Dupras
2012-01-13 10:20:46 -05:00
parent 4c8ce4b52d
commit f9ced08e6d
13 changed files with 49 additions and 47 deletions

View File

@@ -1,9 +1,9 @@
from cocoa.inter2 import PyGUIObject, GUIObjectView
from cocoa.inter2 import PyGUIObject2, GUIObjectView
class DetailsPanelView(GUIObjectView):
pass
class PyDetailsPanel(PyGUIObject):
class PyDetailsPanel(PyGUIObject2):
def numberOfRows(self) -> int:
return self.model.row_count()

View File

@@ -1,12 +1,10 @@
from objp.util import dontwrap
from cocoa.inter2 import PyOutline, GUIObjectView
from cocoa.inter2 import PyOutline2, GUIObjectView
class DirectoryOutlineView(GUIObjectView):
pass
class PyDirectoryOutline(PyOutline):
FOLLOW_PROTOCOLS = ['PyOutline2']
class PyDirectoryOutline(PyOutline2):
def addDirectory_(self, path: str):
self.model.add_directory(path)

View File

@@ -1,5 +1,5 @@
from objp.util import dontwrap
from cocoa.inter2 import PyGUIObject
from cocoa.inter2 import PyGUIObject2
class ExtraFairwareReminderView:
def startTimer(self): pass
@@ -7,7 +7,7 @@ class ExtraFairwareReminderView:
def setButtonText_(self, text: str): pass;
def enableButton(self): pass
class PyExtraFairwareReminder(PyGUIObject):
class PyExtraFairwareReminder(PyGUIObject2):
def start(self):
self.model.start()

View File

@@ -1,10 +1,10 @@
from objp.util import pyref
from cocoa.inter2 import PyGUIObject, GUIObjectView
from cocoa.inter2 import PyGUIObject2, GUIObjectView
class PrioritizeDialogView(GUIObjectView):
pass
class PyPrioritizeDialog(PyGUIObject):
class PyPrioritizeDialog(PyGUIObject2):
def categoryList(self) -> pyref:
return self.model.category_list

View File

@@ -4,7 +4,5 @@ class PrioritizeListView(SelectableListView):
pass
class PyPrioritizeList(PySelectableList2):
FOLLOW_PROTOCOLS = ['PySelectableList2']
def moveIndexes_toIndex_(self, indexes: list, dest_index: int):
self.model.move_indexes(indexes, dest_index)

View File

@@ -1,9 +1,9 @@
from cocoa.inter2 import PyGUIObject, GUIObjectView
from cocoa.inter2 import PyGUIObject2, GUIObjectView
class StatsLabelView(GUIObjectView):
pass
class PyStatsLabel(PyGUIObject):
class PyStatsLabel(PyGUIObject2):
def display(self) -> str:
return self.model.display