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:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -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':
|
||||
|
||||
Reference in New Issue
Block a user