1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2024-10-31 22:05:58 +00:00
dupeguru/cocoa/inter/result_table.py
2011-09-22 15:59:11 -04:00

54 lines
1.4 KiB
Python

from hscommon.cocoa.inter import signature, PyTable
from core.gui.result_table import ResultTable
class PyResultTable(PyTable):
py_class = ResultTable
@signature('c@:')
def powerMarkerMode(self):
return self.py.power_marker
@signature('v@:c')
def setPowerMarkerMode_(self, value):
self.py.power_marker = value
@signature('c@:')
def deltaValuesMode(self):
return self.py.delta_values
@signature('v@:c')
def setDeltaValuesMode_(self, value):
self.py.delta_values = value
@signature('@@:ii')
def valueForRow_column_(self, row_index, column):
return self.py.get_row_value(row_index, column)
@signature('c@:@')
def renameSelected_(self, newname):
return self.py.rename_selected(newname)
@signature('v@:ic')
def sortBy_ascending_(self, key, asc):
self.py.sort(key, asc)
def markSelected(self):
self.py.app.toggle_selected_mark_state()
def removeSelected(self):
self.py.app.remove_selected()
@signature('i@:')
def selectedDupeCount(self):
return self.py.selected_dupe_count
@signature('@@:i')
def pathAtIndex_(self, index):
row = self.py[index]
return str(row._dupe.path)
# python --> cocoa
def invalidate_markings(self):
self.cocoa.invalidateMarkings()