2012-05-30 16:10:56 +00:00
|
|
|
# Created On: 2012-05-30
|
2015-01-03 21:30:57 +00:00
|
|
|
# Copyright 2015 Hardcoded Software (http://www.hardcoded.net)
|
2012-05-30 16:10:56 +00:00
|
|
|
#
|
2015-01-03 21:33:16 +00:00
|
|
|
# This software is licensed under the "GPLv3" License as described in the "LICENSE" file,
|
2012-05-30 16:10:56 +00:00
|
|
|
# which should be included with this package. The terms are also available at
|
2015-01-03 21:33:16 +00:00
|
|
|
# http://www.gnu.org/licenses/gpl-3.0.html
|
2012-05-30 16:10:56 +00:00
|
|
|
|
2012-06-06 19:09:38 +00:00
|
|
|
from objp.util import dontwrap
|
2012-05-30 16:10:56 +00:00
|
|
|
from cocoa.inter import PyGUIObject, GUIObjectView
|
|
|
|
|
|
|
|
class DeletionOptionsView(GUIObjectView):
|
|
|
|
def updateMsg_(self, msg: str): pass
|
|
|
|
def show(self) -> bool: pass
|
2013-12-06 21:17:04 +00:00
|
|
|
def setHardlinkOptionEnabled_(self, enabled: bool): pass
|
2012-05-30 16:10:56 +00:00
|
|
|
|
|
|
|
class PyDeletionOptions(PyGUIObject):
|
2012-08-01 16:36:23 +00:00
|
|
|
def setLinkDeleted_(self, link_deleted: bool):
|
|
|
|
self.model.link_deleted = link_deleted
|
|
|
|
|
|
|
|
def setUseHardlinks_(self, use_hardlinks: bool):
|
|
|
|
self.model.use_hardlinks = use_hardlinks
|
2012-05-30 16:10:56 +00:00
|
|
|
|
|
|
|
def setDirect_(self, direct: bool):
|
|
|
|
self.model.direct = direct
|
|
|
|
|
|
|
|
#--- model --> view
|
2012-06-06 19:09:38 +00:00
|
|
|
@dontwrap
|
2012-05-30 16:10:56 +00:00
|
|
|
def update_msg(self, msg):
|
|
|
|
self.callback.updateMsg_(msg)
|
|
|
|
|
2012-06-06 19:09:38 +00:00
|
|
|
@dontwrap
|
2012-05-30 16:10:56 +00:00
|
|
|
def show(self):
|
|
|
|
return self.callback.show()
|
|
|
|
|
2013-12-06 21:17:04 +00:00
|
|
|
@dontwrap
|
|
|
|
def set_hardlink_option_enabled(self, enabled):
|
|
|
|
self.callback.setHardlinkOptionEnabled_(enabled)
|