From 4c8ce4b52d8db3361037ac5072224cdb6d3e4995 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Thu, 12 Jan 2012 17:40:23 -0500 Subject: [PATCH] Converted the prioritize dialog to objp. A bit hackish though. Refactorings required before going further. --HG-- branch : objp --- build.py | 10 ++++- cocoa/base/PrioritizeDialog.h | 15 +++---- cocoa/base/PrioritizeDialog.m | 19 +++++---- cocoa/base/PrioritizeList.h | 5 ++- cocoa/base/PrioritizeList.m | 9 +++++ cocoa/base/PyPrioritizeDialog.h | 20 ---------- cocoa/base/PyPrioritizeList.h | 14 ------- cocoa/base/ResultWindow.m | 2 +- cocoa/inter/prioritize_dialog.py | 33 ++++++---------- cocoa/inter/prioritize_list.py | 15 ++++--- cocoa/se/dg_cocoa.py | 1 + cocoa/se/dupeguru.xcodeproj/project.pbxproj | 44 ++++++++++++--------- core/app.py | 2 + 13 files changed, 92 insertions(+), 97 deletions(-) delete mode 100644 cocoa/base/PyPrioritizeDialog.h delete mode 100644 cocoa/base/PyPrioritizeList.h diff --git a/build.py b/build.py index 3cc606f2..c79e704a 100644 --- a/build.py +++ b/build.py @@ -183,10 +183,16 @@ def build_cocoa_bridging_interfaces(): from inter.details_panel import PyDetailsPanel, DetailsPanelView from inter.directory_outline import PyDirectoryOutline, DirectoryOutlineView from inter.extra_fairware_reminder import PyExtraFairwareReminder, ExtraFairwareReminderView + from inter.prioritize_dialog import PyPrioritizeDialog, PrioritizeDialogView + from inter.prioritize_list import PyPrioritizeList, PrioritizeListView from inter.stats_label import PyStatsLabel, StatsLabelView - for class_ in [PyColumns2, PyDetailsPanel, PyDirectoryOutline, PyExtraFairwareReminder, PyStatsLabel]: + allclasses = [PyColumns2, PyDetailsPanel, PyDirectoryOutline, PyExtraFairwareReminder, + PyPrioritizeDialog, PyPrioritizeList, PyStatsLabel] + for class_ in allclasses: objp.o2p.generate_objc_code(class_, 'cocoa/autogen') - for class_ in [ColumnsView, DetailsPanelView, DirectoryOutlineView, ExtraFairwareReminderView, StatsLabelView]: + allclasses = [ColumnsView, DetailsPanelView, DirectoryOutlineView, ExtraFairwareReminderView, + PrioritizeDialogView, PrioritizeListView, StatsLabelView] + for class_ in allclasses: clsspec = objp.o2p.spec_from_python_class(class_) clsname = class_.__name__ extmodule_path = op.join('build', clsname + '.m') diff --git a/cocoa/base/PrioritizeDialog.h b/cocoa/base/PrioritizeDialog.h index 369c2a29..0e85b827 100644 --- a/cocoa/base/PrioritizeDialog.h +++ b/cocoa/base/PrioritizeDialog.h @@ -7,24 +7,25 @@ http://www.hardcoded.net/licenses/bsd_license */ #import -#import "HSWindowController.h" #import "PyApp.h" #import "PyPrioritizeDialog.h" -#import "HSPopUpList.h" -#import "HSSelectableList.h" +#import "HSPopUpList2.h" +#import "HSSelectableList2.h" #import "PrioritizeList.h" -@interface PrioritizeDialog : HSWindowController +@interface PrioritizeDialog : NSWindowController { IBOutlet NSPopUpButton *categoryPopUpView; IBOutlet NSTableView *criteriaTableView; IBOutlet NSTableView *prioritizationTableView; - HSPopUpList *categoryPopUp; - HSSelectableList *criteriaList; + PyPrioritizeDialog *py; + HSPopUpList2 *categoryPopUp; + // XXX Just to make it work temporarily, fix this asap (support to be HSSelectableList) + PrioritizeList *criteriaList; PrioritizeList *prioritizationList; } -- (id)initWithPy:(PyApp *)aPy; +- (id)init; - (PyPrioritizeDialog *)py; - (IBAction)addSelected:(id)sender; diff --git a/cocoa/base/PrioritizeDialog.m b/cocoa/base/PrioritizeDialog.m index 1419ffd7..6f2c8668 100644 --- a/cocoa/base/PrioritizeDialog.m +++ b/cocoa/base/PrioritizeDialog.m @@ -7,22 +7,25 @@ http://www.hardcoded.net/licenses/bsd_license */ #import "PrioritizeDialog.h" +#import "Utils.h" @implementation PrioritizeDialog -- (id)initWithPy:(PyApp *)aPy +- (id)init { - self = [super initWithNibName:@"PrioritizeDialog" pyClassName:@"PyPrioritizeDialog" pyParent:aPy]; + self = [super initWithWindowNibName:@"PrioritizeDialog"]; [self window]; - categoryPopUp = [[HSPopUpList alloc] initWithPy:[[self py] categoryList] view:categoryPopUpView]; - criteriaList = [[HSSelectableList alloc] initWithPy:[[self py] criteriaList] view:criteriaTableView]; - prioritizationList = [[PrioritizeList alloc] initWithPy:[[self py] prioritizationList] view:prioritizationTableView]; - [self connect]; + py = [[PyPrioritizeDialog alloc] initWithModel:findHackishModel(@"prioritize_dialog")]; + [py bindCallback:createCallback(@"PrioritizeDialogView", self)]; + categoryPopUp = [[HSPopUpList2 alloc] initWithPyRef:[[self py] categoryList] popupView:categoryPopUpView]; + criteriaList = [[PrioritizeList alloc] initWithPyRef:[[self py] criteriaList] tableView:criteriaTableView]; + prioritizationList = [[PrioritizeList alloc] initWithPyRef:[[self py] prioritizationList] tableView:prioritizationTableView]; + [py connect]; return self; } - (void)dealloc { - [self disconnect]; + [py disconnect]; [categoryPopUp release]; [criteriaList release]; [prioritizationList release]; @@ -47,10 +50,12 @@ http://www.hardcoded.net/licenses/bsd_license - (IBAction)ok:(id)sender { [NSApp stopModal]; + [self close]; } - (IBAction)cancel:(id)sender { [NSApp abortModal]; + [self close]; } @end \ No newline at end of file diff --git a/cocoa/base/PrioritizeList.h b/cocoa/base/PrioritizeList.h index 52014dd3..c1571376 100644 --- a/cocoa/base/PrioritizeList.h +++ b/cocoa/base/PrioritizeList.h @@ -7,9 +7,10 @@ http://www.hardcoded.net/licenses/bsd_license */ #import -#import "HSSelectableList.h" +#import "HSSelectableList2.h" #import "PyPrioritizeList.h" -@interface PrioritizeList : HSSelectableList {} +@interface PrioritizeList : HSSelectableList2 {} +- (id)initWithPyRef:(PyObject *)aPyRef tableView:(NSTableView *)aTableView; - (PyPrioritizeList *)py; @end \ No newline at end of file diff --git a/cocoa/base/PrioritizeList.m b/cocoa/base/PrioritizeList.m index bd13a327..f1c902b1 100644 --- a/cocoa/base/PrioritizeList.m +++ b/cocoa/base/PrioritizeList.m @@ -11,6 +11,15 @@ http://www.hardcoded.net/licenses/bsd_license #import "Consts.h" @implementation PrioritizeList +- (id)initWithPyRef:(PyObject *)aPyRef tableView:(NSTableView *)aTableView +{ + PyPrioritizeList *model = [[PyPrioritizeList alloc] initWithModel:aPyRef]; + self = [super initWithPy:model tableView:aTableView]; + [model bindCallback:createCallback(@"PrioritizeListView", self)]; + [model release]; + return self; +} + - (PyPrioritizeList *)py { return (PyPrioritizeList *)py; diff --git a/cocoa/base/PyPrioritizeDialog.h b/cocoa/base/PyPrioritizeDialog.h deleted file mode 100644 index d461018a..00000000 --- a/cocoa/base/PyPrioritizeDialog.h +++ /dev/null @@ -1,20 +0,0 @@ -/* -Copyright 2011 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 -*/ - -#import -#import "PyGUI.h" -#import "PySelectableList.h" - -@interface PyPrioritizeDialog : PyGUI -- (PySelectableList *)categoryList; -- (PySelectableList *)criteriaList; -- (PySelectableList *)prioritizationList; -- (void)addSelected; -- (void)removeSelected; -- (void)performReprioritization; -@end \ No newline at end of file diff --git a/cocoa/base/PyPrioritizeList.h b/cocoa/base/PyPrioritizeList.h deleted file mode 100644 index 7e5c70bb..00000000 --- a/cocoa/base/PyPrioritizeList.h +++ /dev/null @@ -1,14 +0,0 @@ -/* -Copyright 2011 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 -*/ - -#import -#import "PySelectableList.h" - -@interface PyPrioritizeList : PySelectableList -- (void)moveIndexes:(NSArray *)indexes toIndex:(NSInteger)destIndex; -@end \ No newline at end of file diff --git a/cocoa/base/ResultWindow.m b/cocoa/base/ResultWindow.m index 3a4e53ec..5d44e71b 100644 --- a/cocoa/base/ResultWindow.m +++ b/cocoa/base/ResultWindow.m @@ -272,7 +272,7 @@ http://www.hardcoded.net/licenses/bsd_license - (IBAction)reprioritizeResults:(id)sender { - PrioritizeDialog *dlg = [[PrioritizeDialog alloc] initWithPy:py]; + PrioritizeDialog *dlg = [[PrioritizeDialog alloc] init]; NSInteger result = [NSApp runModalForWindow:[dlg window]]; if (result == NSRunStoppedResponse) { [[dlg py] performReprioritization]; diff --git a/cocoa/inter/prioritize_dialog.py b/cocoa/inter/prioritize_dialog.py index 76d140a5..63da1de2 100644 --- a/cocoa/inter/prioritize_dialog.py +++ b/cocoa/inter/prioritize_dialog.py @@ -1,31 +1,24 @@ -from cocoa.inter import PyGUIObject, PySelectableList +from objp.util import pyref +from cocoa.inter2 import PyGUIObject, GUIObjectView -from core.gui.prioritize_dialog import PrioritizeDialog -from .prioritize_list import PyPrioritizeList +class PrioritizeDialogView(GUIObjectView): + pass class PyPrioritizeDialog(PyGUIObject): - py_class = PrioritizeDialog + def categoryList(self) -> pyref: + return self.model.category_list - def categoryList(self): - if not hasattr(self, '_categoryList'): - self._categoryList = PySelectableList.alloc().initWithPy_(self.py.category_list) - return self._categoryList + def criteriaList(self) -> pyref: + return self.model.criteria_list - def criteriaList(self): - if not hasattr(self, '_criteriaList'): - self._criteriaList = PySelectableList.alloc().initWithPy_(self.py.criteria_list) - return self._criteriaList - - def prioritizationList(self): - if not hasattr(self, '_prioritizationList'): - self._prioritizationList = PyPrioritizeList.alloc().initWithPy_(self.py.prioritization_list) - return self._prioritizationList + def prioritizationList(self) -> pyref: + return self.model.prioritization_list def addSelected(self): - self.py.add_selected() + self.model.add_selected() def removeSelected(self): - self.py.remove_selected() + self.model.remove_selected() def performReprioritization(self): - self.py.perform_reprioritization() \ No newline at end of file + self.model.perform_reprioritization() diff --git a/cocoa/inter/prioritize_list.py b/cocoa/inter/prioritize_list.py index fd728ad0..47ff752e 100644 --- a/cocoa/inter/prioritize_list.py +++ b/cocoa/inter/prioritize_list.py @@ -1,7 +1,10 @@ -from cocoa.inter import signature, PySelectableList +from cocoa.inter2 import PySelectableList2, SelectableListView -class PyPrioritizeList(PySelectableList): - @signature('v@:@i') - def moveIndexes_toIndex_(self, indexes, dest_index): - self.py.move_indexes(indexes, dest_index) - \ No newline at end of file +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) diff --git a/cocoa/se/dg_cocoa.py b/cocoa/se/dg_cocoa.py index 7ff792cd..42329cbb 100644 --- a/cocoa/se/dg_cocoa.py +++ b/cocoa/se/dg_cocoa.py @@ -16,6 +16,7 @@ from inter.details_panel import PyDetailsPanel from inter.directory_outline import PyDirectoryOutline from inter.extra_fairware_reminder import PyExtraFairwareReminder from inter.prioritize_dialog import PyPrioritizeDialog +from inter.prioritize_list import PyPrioritizeList from inter.problem_dialog import PyProblemDialog from inter.problem_table import PyProblemTable from inter.result_table import PyResultTable diff --git a/cocoa/se/dupeguru.xcodeproj/project.pbxproj b/cocoa/se/dupeguru.xcodeproj/project.pbxproj index a2cbaea0..3c7e220e 100644 --- a/cocoa/se/dupeguru.xcodeproj/project.pbxproj +++ b/cocoa/se/dupeguru.xcodeproj/project.pbxproj @@ -26,11 +26,14 @@ CE381C9609914ACE003581CE /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = CE381C9409914ACE003581CE /* AppDelegate.m */; }; CE381C9C09914ADF003581CE /* ResultWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = CE381C9A09914ADF003581CE /* ResultWindow.m */; }; CE3A3B4914BF19B8007898AB /* PyDetailsPanel.m in Sources */ = {isa = PBXBuildFile; fileRef = CE3A3B4814BF19B8007898AB /* PyDetailsPanel.m */; }; - CE41672D141FE1E5004F3F0B /* HSSelectableList.m in Sources */ = {isa = PBXBuildFile; fileRef = CE41672B141FE1E5004F3F0B /* HSSelectableList.m */; }; CE45579B0AE3BC2B005A9546 /* Sparkle.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE45579A0AE3BC2B005A9546 /* Sparkle.framework */; }; CE4557B40AE3BC50005A9546 /* Sparkle.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = CE45579A0AE3BC2B005A9546 /* Sparkle.framework */; }; CE5335FC142BBFAF008E5374 /* HSQuicklook.m in Sources */ = {isa = PBXBuildFile; fileRef = CE5335FB142BBFAF008E5374 /* HSQuicklook.m */; }; CE533603142BC034008E5374 /* Quartz.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CE533602142BC034008E5374 /* Quartz.framework */; }; + CE548CC014BF902000D180CB /* HSPopUpList2.m in Sources */ = {isa = PBXBuildFile; fileRef = CE548CBD14BF902000D180CB /* HSPopUpList2.m */; }; + CE548CC114BF902000D180CB /* HSSelectableList2.m in Sources */ = {isa = PBXBuildFile; fileRef = CE548CBF14BF902000D180CB /* HSSelectableList2.m */; }; + CE548CC614BF903D00D180CB /* PyPrioritizeDialog.m in Sources */ = {isa = PBXBuildFile; fileRef = CE548CC314BF903D00D180CB /* PyPrioritizeDialog.m */; }; + CE548CC714BF903D00D180CB /* PyPrioritizeList.m in Sources */ = {isa = PBXBuildFile; fileRef = CE548CC514BF903D00D180CB /* PyPrioritizeList.m */; }; CE54A87E148046F9008EEA77 /* HSColumns.m in Sources */ = {isa = PBXBuildFile; fileRef = CE54A87D148046F9008EEA77 /* HSColumns.m */; }; CE647E571173024A006D28BA /* ProblemDialog.m in Sources */ = {isa = PBXBuildFile; fileRef = CE647E551173024A006D28BA /* ProblemDialog.m */; }; CE665B3013225ADD003F5CFB /* ExtraFairwareReminder.m in Sources */ = {isa = PBXBuildFile; fileRef = CE665B2E13225ADD003F5CFB /* ExtraFairwareReminder.m */; }; @@ -59,7 +62,6 @@ CE91F216113BC22D0010360B /* StatsLabel.m in Sources */ = {isa = PBXBuildFile; fileRef = CE91F214113BC22D0010360B /* StatsLabel.m */; }; CE9777CD141F8C2500C13FB5 /* PrioritizeDialog.m in Sources */ = {isa = PBXBuildFile; fileRef = CE9777CC141F8C2500C13FB5 /* PrioritizeDialog.m */; }; CE9777D1141F8CB400C13FB5 /* PrioritizeDialog.xib in Resources */ = {isa = PBXBuildFile; fileRef = CE9777CF141F8CB400C13FB5 /* PrioritizeDialog.xib */; }; - CE9777D5141F9D7600C13FB5 /* HSPopUpList.m in Sources */ = {isa = PBXBuildFile; fileRef = CE9777D4141F9D7600C13FB5 /* HSPopUpList.m */; }; CE9D842A14BE2AE900184165 /* PyExtraFairwareReminder.m in Sources */ = {isa = PBXBuildFile; fileRef = CE9D842914BE2AE900184165 /* PyExtraFairwareReminder.m */; }; CEA175CA1461E8E600776591 /* locale in Resources */ = {isa = PBXBuildFile; fileRef = CEA175C91461E8E600776591 /* locale */; }; CEA450B814BDDFD7002DAAF2 /* dg_cocoa.py in Resources */ = {isa = PBXBuildFile; fileRef = CEA450B714BDDFD7002DAAF2 /* dg_cocoa.py */; }; @@ -160,13 +162,20 @@ CE381C9B09914ADF003581CE /* ResultWindow.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = ResultWindow.h; sourceTree = SOURCE_ROOT; }; CE3A3B4714BF19B8007898AB /* PyDetailsPanel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PyDetailsPanel.h; sourceTree = ""; }; CE3A3B4814BF19B8007898AB /* PyDetailsPanel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PyDetailsPanel.m; sourceTree = ""; }; - CE41672A141FE1E5004F3F0B /* HSSelectableList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HSSelectableList.h; sourceTree = ""; }; - CE41672B141FE1E5004F3F0B /* HSSelectableList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HSSelectableList.m; sourceTree = ""; }; CE41672C141FE1E5004F3F0B /* HSTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HSTable.h; sourceTree = ""; }; CE45579A0AE3BC2B005A9546 /* Sparkle.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Sparkle.framework; path = /Library/Frameworks/Sparkle.framework; sourceTree = ""; }; CE5335FA142BBFAF008E5374 /* HSQuicklook.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = HSQuicklook.h; path = ../../cocoalib/HSQuicklook.h; sourceTree = ""; }; CE5335FB142BBFAF008E5374 /* HSQuicklook.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = HSQuicklook.m; path = ../../cocoalib/HSQuicklook.m; sourceTree = ""; }; CE533602142BC034008E5374 /* Quartz.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Quartz.framework; path = System/Library/Frameworks/Quartz.framework; sourceTree = SDKROOT; }; + CE548CBB14BF8FFE00D180CB /* PySelectableList2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PySelectableList2.h; sourceTree = ""; }; + CE548CBC14BF902000D180CB /* HSPopUpList2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HSPopUpList2.h; sourceTree = ""; }; + CE548CBD14BF902000D180CB /* HSPopUpList2.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HSPopUpList2.m; sourceTree = ""; }; + CE548CBE14BF902000D180CB /* HSSelectableList2.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HSSelectableList2.h; sourceTree = ""; }; + CE548CBF14BF902000D180CB /* HSSelectableList2.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HSSelectableList2.m; sourceTree = ""; }; + CE548CC214BF903D00D180CB /* PyPrioritizeDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PyPrioritizeDialog.h; sourceTree = ""; }; + CE548CC314BF903D00D180CB /* PyPrioritizeDialog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PyPrioritizeDialog.m; sourceTree = ""; }; + CE548CC414BF903D00D180CB /* PyPrioritizeList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PyPrioritizeList.h; sourceTree = ""; }; + CE548CC514BF903D00D180CB /* PyPrioritizeList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PyPrioritizeList.m; sourceTree = ""; }; CE54A87C148046F9008EEA77 /* HSColumns.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HSColumns.h; sourceTree = ""; }; CE54A87D148046F9008EEA77 /* HSColumns.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HSColumns.m; sourceTree = ""; }; CE647E541173024A006D28BA /* ProblemDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ProblemDialog.h; path = ../base/ProblemDialog.h; sourceTree = SOURCE_ROOT; }; @@ -230,8 +239,6 @@ CE8113EC12E5CEA800A36C80 /* fr */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = fr; path = ../base/fr.lproj/Localizable.strings; sourceTree = SOURCE_ROOT; }; CE89240614239CC30024CE4E /* PrioritizeList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PrioritizeList.h; path = ../base/PrioritizeList.h; sourceTree = ""; }; CE89240714239CC30024CE4E /* PrioritizeList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PrioritizeList.m; path = ../base/PrioritizeList.m; sourceTree = ""; }; - CE89240814239CC30024CE4E /* PyPrioritizeDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PyPrioritizeDialog.h; path = ../base/PyPrioritizeDialog.h; sourceTree = ""; }; - CE89240914239CC30024CE4E /* PyPrioritizeList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PyPrioritizeList.h; path = ../base/PyPrioritizeList.h; sourceTree = ""; }; CE8C53B61173248F0011B41F /* PyTable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PyTable.h; sourceTree = ""; }; CE8C53BB117324CE0011B41F /* HSTable.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HSTable.m; sourceTree = ""; }; CE91F213113BC22D0010360B /* StatsLabel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StatsLabel.h; path = ../base/StatsLabel.h; sourceTree = SOURCE_ROOT; }; @@ -239,9 +246,6 @@ CE9777CB141F8C2500C13FB5 /* PrioritizeDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PrioritizeDialog.h; path = ../base/PrioritizeDialog.h; sourceTree = ""; }; CE9777CC141F8C2500C13FB5 /* PrioritizeDialog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PrioritizeDialog.m; path = ../base/PrioritizeDialog.m; sourceTree = ""; }; CE9777D0141F8CB400C13FB5 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = ../base/en.lproj/PrioritizeDialog.xib; sourceTree = ""; }; - CE9777D2141F9D6500C13FB5 /* PySelectableList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PySelectableList.h; sourceTree = ""; }; - CE9777D3141F9D7600C13FB5 /* HSPopUpList.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HSPopUpList.h; sourceTree = ""; }; - CE9777D4141F9D7600C13FB5 /* HSPopUpList.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HSPopUpList.m; sourceTree = ""; }; CE9D842814BE2AE900184165 /* PyExtraFairwareReminder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PyExtraFairwareReminder.h; sourceTree = ""; }; CE9D842914BE2AE900184165 /* PyExtraFairwareReminder.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PyExtraFairwareReminder.m; sourceTree = ""; }; CEA175C91461E8E600776591 /* locale */ = {isa = PBXFileReference; lastKnownFileType = folder; name = locale; path = ../../build/locale; sourceTree = ""; }; @@ -421,6 +425,10 @@ CE275C5914BF71DF00265960 /* PyColumns2.m */, CE275C5414BF712B00265960 /* PyDirectoryOutline.h */, CE275C5514BF712B00265960 /* PyDirectoryOutline.m */, + CE548CC214BF903D00D180CB /* PyPrioritizeDialog.h */, + CE548CC314BF903D00D180CB /* PyPrioritizeDialog.m */, + CE548CC414BF903D00D180CB /* PyPrioritizeList.h */, + CE548CC514BF903D00D180CB /* PyPrioritizeList.m */, ); name = autogen; path = ../autogen; @@ -459,10 +467,10 @@ CE76FDC9111EE38E006618EA /* HSGUIController.m */, CE41672C141FE1E5004F3F0B /* HSTable.h */, CE8C53BB117324CE0011B41F /* HSTable.m */, - CE9777D3141F9D7600C13FB5 /* HSPopUpList.h */, - CE9777D4141F9D7600C13FB5 /* HSPopUpList.m */, - CE41672A141FE1E5004F3F0B /* HSSelectableList.h */, - CE41672B141FE1E5004F3F0B /* HSSelectableList.m */, + CE548CBC14BF902000D180CB /* HSPopUpList2.h */, + CE548CBD14BF902000D180CB /* HSPopUpList2.m */, + CE548CBE14BF902000D180CB /* HSSelectableList2.h */, + CE548CBF14BF902000D180CB /* HSSelectableList2.m */, ); name = controllers; path = ../../cocoalib/controllers; @@ -476,8 +484,8 @@ CED569C614BF312900C6AC25 /* PyGUI2.h */, CE76FDCE111EE38E006618EA /* PyOutline.h */, CE275C4A14BF6C3700265960 /* PyOutline2.h */, + CE548CBB14BF8FFE00D180CB /* PySelectableList2.h */, CE8C53B61173248F0011B41F /* PyTable.h */, - CE9777D2141F9D6500C13FB5 /* PySelectableList.h */, ); name = proxies; path = ../../cocoalib/proxies; @@ -568,10 +576,8 @@ CE647E561173024A006D28BA /* PyProblemDialog.h */, CE9777CB141F8C2500C13FB5 /* PrioritizeDialog.h */, CE9777CC141F8C2500C13FB5 /* PrioritizeDialog.m */, - CE89240814239CC30024CE4E /* PyPrioritizeDialog.h */, CE89240614239CC30024CE4E /* PrioritizeList.h */, CE89240714239CC30024CE4E /* PrioritizeList.m */, - CE89240914239CC30024CE4E /* PyPrioritizeList.h */, ); name = dgbase; sourceTree = ""; @@ -698,8 +704,6 @@ CEF0ACCE12DF3C2000B32F7E /* HSRecentFiles.m in Sources */, CE665B3013225ADD003F5CFB /* ExtraFairwareReminder.m in Sources */, CE9777CD141F8C2500C13FB5 /* PrioritizeDialog.m in Sources */, - CE9777D5141F9D7600C13FB5 /* HSPopUpList.m in Sources */, - CE41672D141FE1E5004F3F0B /* HSSelectableList.m in Sources */, CE89240A14239CC30024CE4E /* PrioritizeList.m in Sources */, CE5335FC142BBFAF008E5374 /* HSQuicklook.m in Sources */, CE54A87E148046F9008EEA77 /* HSColumns.m in Sources */, @@ -711,6 +715,10 @@ CE275C5114BF6C5600265960 /* HSOutline2.m in Sources */, CE275C5714BF712B00265960 /* PyDirectoryOutline.m in Sources */, CE275C5A14BF71DF00265960 /* PyColumns2.m in Sources */, + CE548CC014BF902000D180CB /* HSPopUpList2.m in Sources */, + CE548CC114BF902000D180CB /* HSSelectableList2.m in Sources */, + CE548CC614BF903D00D180CB /* PyPrioritizeDialog.m in Sources */, + CE548CC714BF903D00D180CB /* PyPrioritizeList.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/core/app.py b/core/app.py index f8560c1f..c3439d68 100644 --- a/core/app.py +++ b/core/app.py @@ -27,6 +27,7 @@ from . import directories, results, scanner, export, fs from .gui.details_panel import DetailsPanel from .gui.directory_tree import DirectoryTree from .gui.extra_fairware_reminder import ExtraFairwareReminder +from .gui.prioritize_dialog import PrioritizeDialog from .gui.stats_label import StatsLabel HAD_FIRST_LAUNCH_PREFERENCE = 'HadFirstLaunch' @@ -107,6 +108,7 @@ class DupeGuru(RegistrableApplication, Broadcaster): self.details_panel = DetailsPanel(None, self) self.directory_tree = DirectoryTree(None, self) self.extra_fairware_reminder = ExtraFairwareReminder(None, self) + self.prioritize_dialog = PrioritizeDialog(None, self) self.stats_label = StatsLabel(None, self) # subclasses must create self.result_table