From d8f9a3f0545cd361d9fac9a90be44108af2ac01c Mon Sep 17 00:00:00 2001 From: hsoft Date: Tue, 1 Sep 2009 14:18:09 +0000 Subject: [PATCH] [#14] Adjusted PE-specific code to recent export changes. --HG-- extra : convert_revision : svn%3Ac306627e-7827-47d3-bdf0-9a457c9553a1/trunk%40108 --- pe/cocoa/ResultWindow.h | 3 - pe/cocoa/ResultWindow.m | 39 ----------- pe/cocoa/dupeguru.xcodeproj/project.pbxproj | 23 +------ pe/cocoa/py/dg_cocoa.py | 4 +- pe/cocoa/w3/dg.xsl | 75 --------------------- pe/cocoa/w3/hardcoded.css | 71 ------------------- 6 files changed, 5 insertions(+), 210 deletions(-) delete mode 100644 pe/cocoa/w3/dg.xsl delete mode 100644 pe/cocoa/w3/hardcoded.css diff --git a/pe/cocoa/ResultWindow.h b/pe/cocoa/ResultWindow.h index a4add0c9..80cd2a28 100644 --- a/pe/cocoa/ResultWindow.h +++ b/pe/cocoa/ResultWindow.h @@ -23,7 +23,6 @@ http://www.hardcoded.net/licenses/hs_license } - (IBAction)clearIgnoreList:(id)sender; - (IBAction)clearPictureCache:(id)sender; -- (IBAction)exportToXHTML:(id)sender; - (IBAction)filter:(id)sender; - (IBAction)ignoreSelected:(id)sender; - (IBAction)markAll:(id)sender; @@ -46,8 +45,6 @@ http://www.hardcoded.net/licenses/hs_license - (IBAction)toggleDirectories:(id)sender; - (NSTableColumn *)getColumnForIdentifier:(int)aIdentifier title:(NSString *)aTitle width:(int)aWidth refCol:(NSTableColumn *)aColumn; -- (NSArray *)getColumnsOrder; -- (NSDictionary *)getColumnsWidth; - (void)initResultColumns; - (void)restoreColumnsPosition:(NSArray *)aColumnsOrder widths:(NSDictionary *)aColumnsWidth; @end diff --git a/pe/cocoa/ResultWindow.m b/pe/cocoa/ResultWindow.m index cab5701f..f5d6153a 100644 --- a/pe/cocoa/ResultWindow.m +++ b/pe/cocoa/ResultWindow.m @@ -66,14 +66,6 @@ http://www.hardcoded.net/licenses/hs_license [(PyDupeGuru *)py clearPictureCache]; } -- (IBAction)exportToXHTML:(id)sender -{ - NSString *xsltPath = [[NSBundle mainBundle] pathForResource:@"dg" ofType:@"xsl"]; - NSString *cssPath = [[NSBundle mainBundle] pathForResource:@"hardcoded" ofType:@"css"]; - NSString *exported = [py exportToXHTMLwithColumns:[self getColumnsOrder] xslt:xsltPath css:cssPath]; - [[NSWorkspace sharedWorkspace] openFile:exported]; -} - - (IBAction)filter:(id)sender { NSUserDefaults *ud = [NSUserDefaults standardUserDefaults]; @@ -277,37 +269,6 @@ http://www.hardcoded.net/licenses/hs_license return col; } -//Returns an array of identifiers, in order. -- (NSArray *)getColumnsOrder -{ - NSTableColumn *col; - NSString *colId; - NSMutableArray *result = [NSMutableArray array]; - NSEnumerator *e = [[matches tableColumns] objectEnumerator]; - while (col = [e nextObject]) - { - colId = [col identifier]; - [result addObject:colId]; - } - return result; -} - -- (NSDictionary *)getColumnsWidth -{ - NSMutableDictionary *result = [NSMutableDictionary dictionary]; - NSTableColumn *col; - NSString *colId; - NSNumber *width; - NSEnumerator *e = [[matches tableColumns] objectEnumerator]; - while (col = [e nextObject]) - { - colId = [col identifier]; - width = [NSNumber numberWithFloat:[col width]]; - [result setObject:width forKey:colId]; - } - return result; -} - - (void)initResultColumns { NSTableColumn *refCol = [matches tableColumnWithIdentifier:@"0"]; diff --git a/pe/cocoa/dupeguru.xcodeproj/project.pbxproj b/pe/cocoa/dupeguru.xcodeproj/project.pbxproj index 703c7c9d..808d08ad 100644 --- a/pe/cocoa/dupeguru.xcodeproj/project.pbxproj +++ b/pe/cocoa/dupeguru.xcodeproj/project.pbxproj @@ -44,8 +44,6 @@ CECA899909DB12CA00A3D774 /* Details.nib in Resources */ = {isa = PBXBuildFile; fileRef = CECA899709DB12CA00A3D774 /* Details.nib */; }; CECA899C09DB132E00A3D774 /* DetailsPanel.h in CopyFiles */ = {isa = PBXBuildFile; fileRef = CECA899A09DB132E00A3D774 /* DetailsPanel.h */; }; CECA899D09DB132E00A3D774 /* DetailsPanel.m in Sources */ = {isa = PBXBuildFile; fileRef = CECA899B09DB132E00A3D774 /* DetailsPanel.m */; }; - CEDA432E0B07C6E600B3091A /* dg.xsl in Resources */ = {isa = PBXBuildFile; fileRef = CEDA432C0B07C6E600B3091A /* dg.xsl */; }; - CEDA432F0B07C6E600B3091A /* hardcoded.css in Resources */ = {isa = PBXBuildFile; fileRef = CEDA432D0B07C6E600B3091A /* hardcoded.css */; }; CEEB135209C837A2004D2330 /* dupeguru.icns in Resources */ = {isa = PBXBuildFile; fileRef = CEEB135109C837A2004D2330 /* dupeguru.icns */; }; CEF7823809C8AA0200EF38FF /* gear.png in Resources */ = {isa = PBXBuildFile; fileRef = CEF7823709C8AA0200EF38FF /* gear.png */; }; CEFC294609C89E3D00D9F998 /* folder32.png in Resources */ = {isa = PBXBuildFile; fileRef = CEFC294509C89E3D00D9F998 /* folder32.png */; }; @@ -135,8 +133,6 @@ CECA899809DB12CA00A3D774 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/Details.nib; sourceTree = ""; }; CECA899A09DB132E00A3D774 /* DetailsPanel.h */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.h; path = DetailsPanel.h; sourceTree = ""; }; CECA899B09DB132E00A3D774 /* DetailsPanel.m */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = sourcecode.c.objc; path = DetailsPanel.m; sourceTree = ""; }; - CEDA432C0B07C6E600B3091A /* dg.xsl */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text.xml; name = dg.xsl; path = w3/dg.xsl; sourceTree = SOURCE_ROOT; }; - CEDA432D0B07C6E600B3091A /* hardcoded.css */ = {isa = PBXFileReference; fileEncoding = 5; lastKnownFileType = text; name = hardcoded.css; path = w3/hardcoded.css; sourceTree = SOURCE_ROOT; }; CEEB135109C837A2004D2330 /* dupeguru.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = dupeguru.icns; sourceTree = ""; }; CEF7823709C8AA0200EF38FF /* gear.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = gear.png; path = images/gear.png; sourceTree = ""; }; CEFC294509C89E3D00D9F998 /* folder32.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = folder32.png; path = images/folder32.png; sourceTree = SOURCE_ROOT; }; @@ -233,7 +229,6 @@ CE073F5409CAE1A3005C1D2F /* dupeguru_pe_help */, CE381CF509915304003581CE /* dg_cocoa.plugin */, CEFC294309C89E0000D9F998 /* images */, - CEDA432B0B07C6E600B3091A /* w3 */, CEEB135109C837A2004D2330 /* dupeguru.icns */, 8D1107310486CEB800E47090 /* Info.plist */, 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, @@ -316,15 +311,6 @@ path = cocoalib/brsinglelineformatter; sourceTree = SOURCE_ROOT; }; - CEDA432B0B07C6E600B3091A /* w3 */ = { - isa = PBXGroup; - children = ( - CEDA432C0B07C6E600B3091A /* dg.xsl */, - CEDA432D0B07C6E600B3091A /* hardcoded.css */, - ); - path = w3; - sourceTree = SOURCE_ROOT; - }; CEFC294309C89E0000D9F998 /* images */ = { isa = PBXGroup; children = ( @@ -393,8 +379,6 @@ CECA899909DB12CA00A3D774 /* Details.nib in Resources */, CE3AA46709DB207900DB3A21 /* Directories.nib in Resources */, CEFCDE2D0AB0418600C33A93 /* dgpe_logo_32.png in Resources */, - CEDA432E0B07C6E600B3091A /* dg.xsl in Resources */, - CEDA432F0B07C6E600B3091A /* hardcoded.css in Resources */, CE80DB760FC194760086DCA6 /* ErrorReportWindow.xib in Resources */, CE80DB770FC194760086DCA6 /* progress.nib in Resources */, CE80DB780FC194760086DCA6 /* registration.nib in Resources */, @@ -553,12 +537,11 @@ C01FCF5008A954540054247B /* Release */ = { isa = XCBuildConfiguration; buildSettings = { - ARCHS = ( - ppc, - i386, - ); + ARCHS = "$(ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1)"; + ARCHS_STANDARD_32_BIT_PRE_XCODE_3_1 = "ppc i386"; FRAMEWORK_SEARCH_PATHS = ""; GCC_C_LANGUAGE_STANDARD = c99; + GCC_VERSION = 4.0; GCC_WARN_ABOUT_RETURN_TYPE = YES; GCC_WARN_UNUSED_VARIABLE = YES; MACOSX_DEPLOYMENT_TARGET = 10.4; diff --git a/pe/cocoa/py/dg_cocoa.py b/pe/cocoa/py/dg_cocoa.py index 2c0accfa..aa2131d1 100644 --- a/pe/cocoa/py/dg_cocoa.py +++ b/pe/cocoa/py/dg_cocoa.py @@ -43,8 +43,8 @@ class PyDupeGuru(PyApp): def doScan(self): return self.app.start_scanning() - def exportToXHTMLwithColumns_xslt_css_(self,column_ids,xslt_path,css_path): - return self.app.ExportToXHTML(column_ids,xslt_path,css_path) + def exportToXHTMLwithColumns_(self, column_ids): + return self.app.export_to_xhtml(column_ids) def loadIgnoreList(self): self.app.load_ignore_list() diff --git a/pe/cocoa/w3/dg.xsl b/pe/cocoa/w3/dg.xsl deleted file mode 100644 index 4f982fce..00000000 --- a/pe/cocoa/w3/dg.xsl +++ /dev/null @@ -1,75 +0,0 @@ - - - - - - - - - - - - - - - - - - indented - - - - - - - - - - - - - - - - - - - - - - - - - - - - dupeGuru Results - - - -

dupeGuru Results

- - - - - -
- - -
- -
\ No newline at end of file diff --git a/pe/cocoa/w3/hardcoded.css b/pe/cocoa/w3/hardcoded.css deleted file mode 100644 index ed243bcc..00000000 --- a/pe/cocoa/w3/hardcoded.css +++ /dev/null @@ -1,71 +0,0 @@ -BODY -{ - background-color:white; -} - -BODY,A,P,UL,TABLE,TR,TD -{ - font-family:Tahoma,Arial,sans-serif; - font-size:10pt; - color: #4477AA; -} - -TABLE -{ - background-color: #225588; - margin-left: auto; - margin-right: auto; - width: 90%; -} - -TR -{ - background-color: white; -} - -TH -{ - font-weight: bold; - color: black; - background-color: #C8D6E5; -} - -TH TD -{ - color:black; -} - -TD -{ - padding-left: 2pt; -} - -TD.rightelem -{ - text-align:right; - /*padding-left:0pt;*/ - padding-right: 2pt; - width: 17%; -} - -TD.indented -{ - padding-left: 12pt; -} - -H1 -{ - font-family:"Courier New",monospace; - color:#6699CC; - font-size:18pt; - color:#6da500; - border-color: #70A0CF; - border-width: 1pt; - border-style: solid; - margin-top: 16pt; - margin-left: 5%; - margin-right: 5%; - padding-top: 2pt; - padding-bottom:2pt; - text-align: center; -} \ No newline at end of file