mirror of
https://github.com/arsenetar/dupeguru.git
synced 2026-01-22 22:51:39 +00:00
Added a Deletion Options dialog that pops up when Send to Trash is triggered.
It offers hardlink and direct deletion options. This new feature supersedes the old "Send to Trash and Hardlink" menu item, which was removed.
This commit is contained in:
9
cocoa/inter/all.py
Normal file
9
cocoa/inter/all.py
Normal file
@@ -0,0 +1,9 @@
|
||||
from .deletion_options import PyDeletionOptions
|
||||
from .details_panel import PyDetailsPanel
|
||||
from .directory_outline import PyDirectoryOutline
|
||||
from .prioritize_dialog import PyPrioritizeDialog
|
||||
from .prioritize_list import PyPrioritizeList
|
||||
from .problem_dialog import PyProblemDialog
|
||||
from .ignore_list_dialog import PyIgnoreListDialog
|
||||
from .result_table import PyResultTable
|
||||
from .stats_label import PyStatsLabel
|
||||
@@ -54,6 +54,9 @@ class PyDupeGuruBase(PyFairware):
|
||||
def ignoreListDialog(self) -> pyref:
|
||||
return self.model.ignore_list_dialog
|
||||
|
||||
def deletionOptions(self) -> pyref:
|
||||
return self.model.deletion_options
|
||||
|
||||
#---Directories
|
||||
def addDirectory_(self, directory: str) -> int:
|
||||
return self.model.add_directory(directory)
|
||||
@@ -99,9 +102,6 @@ class PyDupeGuruBase(PyFairware):
|
||||
def deleteMarked(self):
|
||||
self.model.delete_marked()
|
||||
|
||||
def hardlinkMarked(self):
|
||||
self.model.delete_marked(replace_with_hardlinks=True)
|
||||
|
||||
def applyFilter_(self, filter: str):
|
||||
self.model.apply_filter(filter)
|
||||
|
||||
|
||||
27
cocoa/inter/deletion_options.py
Normal file
27
cocoa/inter/deletion_options.py
Normal file
@@ -0,0 +1,27 @@
|
||||
# Created On: 2012-05-30
|
||||
# Copyright 2012 Hardcoded Software (http://www.hardcoded.net)
|
||||
#
|
||||
# This software is licensed under the "BSD" License as described in the "LICENSE" file,
|
||||
# which should be included with this package. The terms are also available at
|
||||
# http://www.hardcoded.net/licenses/bsd_license
|
||||
|
||||
from cocoa.inter import PyGUIObject, GUIObjectView
|
||||
|
||||
class DeletionOptionsView(GUIObjectView):
|
||||
def updateMsg_(self, msg: str): pass
|
||||
def show(self) -> bool: pass
|
||||
|
||||
class PyDeletionOptions(PyGUIObject):
|
||||
def setHardlink_(self, hardlink: bool):
|
||||
self.model.hardlink = hardlink
|
||||
|
||||
def setDirect_(self, direct: bool):
|
||||
self.model.direct = direct
|
||||
|
||||
#--- model --> view
|
||||
def update_msg(self, msg):
|
||||
self.callback.updateMsg_(msg)
|
||||
|
||||
def show(self):
|
||||
return self.callback.show()
|
||||
|
||||
Reference in New Issue
Block a user