1
0
mirror of https://github.com/arsenetar/dupeguru.git synced 2026-01-22 22:51:39 +00:00

[#189 state:fixed] Added "Export to CSV" feature.

This commit is contained in:
Virgil Dupras
2012-07-31 16:46:51 -04:00
parent deb5260c6a
commit fcdc692b61
9 changed files with 71 additions and 29 deletions

View File

@@ -291,4 +291,18 @@ http://www.hardcoded.net/licenses/bsd_license
}
}
- (NSString *)selectDestFileWithPrompt:(NSString *)prompt extension:(NSString *)extension
{
NSSavePanel *sp = [NSSavePanel savePanel];
[sp setCanCreateDirectories:YES];
[sp setAllowedFileTypes:[NSArray arrayWithObject:extension]];
[sp setTitle:prompt];
if ([sp runModal] == NSOKButton) {
return [sp filename];
}
else {
return nil;
}
}
@end

View File

@@ -57,7 +57,6 @@ http://www.hardcoded.net/licenses/bsd_license
- (void)changeOptions;
- (void)copyMarked;
- (void)trashMarked;
- (void)exportToXHTML;
- (void)filter;
- (void)focusOnFilterField;
- (void)ignoreSelected;

View File

@@ -151,12 +151,6 @@ http://www.hardcoded.net/licenses/bsd_license
[model deleteMarked];
}
- (void)exportToXHTML
{
NSString *exported = [model exportToXHTML];
[[NSWorkspace sharedWorkspace] openFile:exported];
}
- (void)filter
{
NSUserDefaults *ud = [NSUserDefaults standardUserDefaults];

View File

@@ -28,7 +28,8 @@ appMenu.addItem("Quit dupeGuru", Action(NSApp, 'terminate:'), 'cmd+q')
fileMenu.addItem("Load Results...", Action(None, 'loadResults'), 'cmd+o')
owner.recentResultsMenu = fileMenu.addMenu("Load Recent Results")
fileMenu.addItem("Save Results...", Action(None, 'saveResults'), 'cmd+s')
fileMenu.addItem("Export Results to XHTML", Action(None, 'exportToXHTML'), 'cmd+shift+e')
fileMenu.addItem("Export Results to XHTML", Action(owner.model, 'exportToXHTML'), 'cmd+shift+e')
fileMenu.addItem("Export Results to CSV", Action(owner.model, 'exportToCSV'))
if edition == 'pe':
fileMenu.addItem("Clear Picture Cache", Action(owner, 'clearPictureCache'), 'cmd+shift+p')
elif edition == 'me':