completed filtering

both top/bottom panes
	customization of filter box placeholder text

bottom pane:
	made correct item selected even when filtering

added icon
This commit is contained in:
Patrick Wardle
2015-06-25 20:58:45 -10:00
parent ff77a49ed5
commit 4552b1c55a
17 changed files with 469 additions and 153 deletions
+3
View File
@@ -31,6 +31,9 @@
}
//Filter obj
//@property (nonatomic, retain) Filter* filter;
//'filter task' search box
// ->top pane
@property (weak) IBOutlet NSSearchField *filterTasksBox;
+128 -18
View File
@@ -16,6 +16,13 @@
#import "Task.h"
//TODO: bottom pane's progress indicator: center via autolayout
//TODO: fix bottom icons
//TODO: dylib info view, don't show args
//TODO: SHA1 is NULL
//TODO: Time is NULL
//TODO: Software signing is too long (goes into 'close' buttom
//TODO: only update task row(s) on Task VT result! not full table
//TODO: full VT queue!!
@implementation AppDelegate
@@ -37,11 +44,10 @@
@synthesize scannerThread;
@synthesize versionString;
@synthesize progressIndicator;
//@synthesize filterObj;
@synthesize topPane;
@synthesize taskEnumerator;
//@synthesize treeViewController;
//@synthesize currentViewController;
@synthesize viewSelector;
@@ -92,8 +98,8 @@
//init virus total object
virusTotalObj = [[VirusTotal alloc] init];
//init array for virus total threads
//vtThreads = [NSMutableArray array];
//init filter obj
filterObj = [[Filter alloc] init];
//check that OS is supported
if(YES != isSupportedOS())
@@ -342,12 +348,6 @@
}
}
//always unset filter flag
self.taskTableController.isFiltered = NO;
//always reset filter text
[self.filterTasksBox setStringValue:@""];
//set bottom view?
self.bottomPaneBtn.selectedSegment = DYLIBS_VIEW;
@@ -1418,7 +1418,7 @@ bail:
{
//save selected view
self.taskViewFormat = [[sender selectedCell] tag];
//flat view
// ->enable 'filter tasks' search field
if(FLAT_VIEW == self.taskViewFormat)
@@ -1437,12 +1437,28 @@ bail:
//switch (top) view/pane
[self changeViewController];
//always unset filter flag
self.taskTableController.isFiltered = NO;
//always reset filter text
[self.filterTasksBox setStringValue:@""];
//remove all filtered tasks
[self.taskTableController.filteredItems removeAllObjects];
//reset current task
self.currentTask = nil;
//reload top pane
[self reloadTaskTable];
//select top row
[self.taskTableController.itemView selectRowIndexes:[NSIndexSet indexSetWithIndex:0] byExtendingSelection:NO];
//reload bottom pane
// ->ensures correct info is shown for selected (top) task
[((AppDelegate*)[[NSApplication sharedApplication] delegate]) selectBottomPaneContent:nil];
return;
}
@@ -1453,6 +1469,26 @@ bail:
{
//tag
NSUInteger segmentTag = 0;
//filter box placeholder text
NSString* filterPlaceholder = nil;
//always reset filter flag
self.bottomViewController.isFiltered = NO;
//always reset filter box's text
self.filterItemsBox.stringValue = @"";
//remove all filtered items
[self.bottomViewController.filteredItems removeAllObjects];
//when no current task
// ->set to first task in sorted tasks
if(nil == self.currentTask)
{
//set to first
self.currentTask = self.taskEnumerator.tasks[[self.taskEnumerator.tasks keyAtIndex:0]];
}
//get segment tag
segmentTag = [[self.bottomPaneBtn selectedCell] tagForSegment:[self.bottomPaneBtn selectedSegment]];
@@ -1490,6 +1526,9 @@ bail:
//dylibs
case DYLIBS_VIEW:
//init placeholder text for dylibs
filterPlaceholder = @"Filter Dylibs";
//(re)enumerate dylibs via XPC
// ->triggers table reload when done
[self.currentTask enumerateDylibs:self.taskEnumerator.xpcConnection allDylibs:self.taskEnumerator.dylibs];
@@ -1499,6 +1538,9 @@ bail:
//files
case FILES_VIEW:
//init placeholder text for files
filterPlaceholder = @"Filter Files";
//(re)enumerate files via XPC
// ->triggers table reload when done
[self.currentTask enumerateFiles:self.taskEnumerator.xpcConnection];
@@ -1508,6 +1550,9 @@ bail:
//networking
case NETWORKING_VIEW:
//init placeholder text for network
filterPlaceholder = @"Filter Connections";
//(re)enumerate network connections via XPC
// ->triggers table reload when done
[self.currentTask enumerateNetworking:self.taskEnumerator.xpcConnection];
@@ -1518,6 +1563,15 @@ bail:
break;
}
//set filter box's placeholder text
// ->UI change, so do on main thread
dispatch_async(dispatch_get_main_queue(), ^{
//set placeholder
[self.filterItemsBox setPlaceholderString:filterPlaceholder];
});
//bail
bail:
@@ -1527,11 +1581,14 @@ bail:
//automatically invoked when user enters text in filter search boxes
// ->filter tasks and/or items
- (void)controlTextDidChange:(NSNotification *)aNotification
-(void)controlTextDidChange:(NSNotification *)aNotification
{
//search text
NSTextView* search = nil;
//tag for bottom pane selector
NSUInteger segmentTag = 0;
//extract search (text) view
search = aNotification.userInfo[@"NSFieldEditor"];
@@ -1541,7 +1598,7 @@ bail:
//bail
goto bail;
}
//top pane
if(YES == [aNotification.object isEqualTo:self.filterTasksBox])
{
@@ -1556,24 +1613,77 @@ bail:
else
{
//filter
//TODO: move into Filter obj
[self filterTasks:search.string];
//set flag
self.taskTableController.isFiltered = YES;
}
//always reload task table
//always reload task (top) pane
[self.taskTableController.itemView reloadData];
}
//bottom pane
else if(YES == [aNotification.object isEqualTo:self.filterItemsBox])
{
//when text is reset
// ->just reset flag
if(0 == search.string.length)
{
//set flag
self.bottomViewController.isFiltered = NO;
}
}
//filter items
else
{
//get segment tag
segmentTag = [[self.bottomPaneBtn selectedCell] tagForSegment:[self.bottomPaneBtn selectedSegment]];
//get item
// ->will bail if item isn't in (current) view, etc
switch(segmentTag)
{
//dylibs
case DYLIBS_VIEW:
{
//filter
[self.filterObj filterFiles:search.string items:self.currentTask.dylibs results:self.bottomViewController.filteredItems];
//NSLog(@"changed!");
break;
}
//files
case FILES_VIEW:
{
//filter
[self.filterObj filterFiles:search.string items:self.currentTask.files results:self.bottomViewController.filteredItems];
break;
}
//network connections
case NETWORKING_VIEW:
{
//filter
[self.filterObj filterConnections:search.string items:self.currentTask.connections results:self.bottomViewController.filteredItems];
break;
}
default:
break;
}//switch
//set flag
self.bottomViewController.isFiltered = YES;
}
//always reload task (top) pane
[self.bottomViewController.itemView reloadData];
}
//bail
bail:
+6
View File
@@ -27,6 +27,12 @@
/* METHODS */
//filter dylibs and files
-(void)filterFiles:(NSString*)filterText items:(NSMutableArray*)items results:(NSMutableArray*)results;
//filter network connections
-(void)filterConnections:(NSString*)filterText items:(NSMutableArray*)items results:(NSMutableArray*)results;
//load a (JSON) white list
// ->file hashes, known commands, etc
-(NSDictionary*)loadWhitelist:(NSString*)fileName;
+79 -3
View File
@@ -8,6 +8,9 @@
#import "Consts.h"
#import "Filter.h"
#import "Utilities.h"
#import "Task.h"
#import "ItemBase.h"
#import "Connection.h"
@implementation Filter
@@ -27,18 +30,91 @@
if(self)
{
//load known file hashes
self.trustedFiles = [self loadWhitelist:WHITE_LISTED_FILES];
//self.trustedFiles = [self loadWhitelist:WHITE_LISTED_FILES];
//load known commands
self.knownCommands = [self loadWhitelist:WHITE_LISTED_COMMANDS];
//self.knownCommands = [self loadWhitelist:WHITE_LISTED_COMMANDS];
//load known extensions
self.trustedExtensions = [self loadWhitelist:WHITE_LISTED_EXTENSIONS];
//self.trustedExtensions = [self loadWhitelist:WHITE_LISTED_EXTENSIONS];
}
return self;
}
//TODO: add filter tasks
//filter dylibs and files
// ->name and path
-(void)filterFiles:(NSString*)filterText items:(NSMutableArray*)items results:(NSMutableArray*)results
{
//name range
NSRange nameRange = {0};
//path range
NSRange pathRange = {0};
//first reset filter'd items
[results removeAllObjects];
//iterate over all tasks
for(ItemBase* item in items)
{
//init name range
nameRange = [item.name rangeOfString:filterText options:NSCaseInsensitiveSearch];
//init path range
pathRange = [item.path rangeOfString:filterText options:NSCaseInsensitiveSearch];
//check for match
if( (NSNotFound != nameRange.location) ||
(NSNotFound != pathRange.location) )
{
//save match
[results addObject:item];
}
}//all items
return;
}
//filter network connections
-(void)filterConnections:(NSString*)filterText items:(NSMutableArray*)items results:(NSMutableArray*)results
{
//local IP addr range
NSRange localIPRange = {0};
//local port range
NSRange localPortRange = {0};
//TODO: add remote ip/port, state, proto, family?
//first reset filter'd items
[results removeAllObjects];
//iterate over all tasks
for(Connection* item in items)
{
//init name range
localIPRange = [item.localIPAddr rangeOfString:filterText options:NSCaseInsensitiveSearch];
//init path range
localPortRange = [[NSString stringWithFormat:@"%d", [item.localPort unsignedShortValue]] rangeOfString:filterText options:NSCaseInsensitiveSearch];
//check for match
if( (NSNotFound != localIPRange.location) ||
(NSNotFound != localPortRange.location) )
{
//save match
[results addObject:item];
}
}//all items
return;
}
//load a (JSON) white list
// ->file hashes, known commands, etc
+4
View File
@@ -143,6 +143,10 @@
//reload task table
[((AppDelegate*)[[NSApplication sharedApplication] delegate]) reloadTaskTable];
//TODO: only do if current task is nil?
//reload bottom pane
[((AppDelegate*)[[NSApplication sharedApplication] delegate]) selectBottomPaneContent:nil];
//now generate signing info
// ->for (new) tasks & their dylibs
for(NSNumber* key in newTasks)
@@ -20,11 +20,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "TaskEnumerator.m"
timestampString = "456607885.071145"
timestampString = "456903878.108936"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "344"
endingLineNumber = "344"
startingLineNumber = "348"
endingLineNumber = "348"
landmarkName = "-removeTask:"
landmarkType = "5">
</BreakpointContent>
@@ -36,11 +36,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "AppDelegate.m"
timestampString = "456648442.982284"
timestampString = "456993845.79535"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "775"
endingLineNumber = "775"
startingLineNumber = "771"
endingLineNumber = "771"
landmarkName = "-reloadTaskTable"
landmarkType = "5">
</BreakpointContent>
@@ -52,11 +52,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "TaskTableController.m"
timestampString = "456648442.982284"
timestampString = "456993845.79535"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1174"
endingLineNumber = "1174"
startingLineNumber = "1221"
endingLineNumber = "1221"
landmarkName = "-outlineView:rowViewForItem:"
landmarkType = "5">
</BreakpointContent>
@@ -68,11 +68,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "TaskTableController.m"
timestampString = "456648442.982284"
timestampString = "456993845.79535"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1167"
endingLineNumber = "1167"
startingLineNumber = "1214"
endingLineNumber = "1214"
landmarkName = "-outlineView:viewForTableColumn:item:"
landmarkType = "5">
</BreakpointContent>
@@ -84,11 +84,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "TaskTableController.m"
timestampString = "456648442.982284"
timestampString = "456993845.79535"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1157"
endingLineNumber = "1157"
startingLineNumber = "1204"
endingLineNumber = "1204"
landmarkName = "-outlineViewSelectionDidChange:"
landmarkType = "5">
</BreakpointContent>
@@ -109,22 +109,6 @@
landmarkType = "7">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "TaskTableController.m"
timestampString = "456648442.982284"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1000"
endingLineNumber = "1000"
landmarkName = "-showInfo:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
@@ -132,11 +116,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "AppDelegate.m"
timestampString = "456621956.395811"
timestampString = "456992198.722928"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "318"
endingLineNumber = "318"
startingLineNumber = "320"
endingLineNumber = "320"
landmarkName = "-changeViewController"
landmarkType = "5">
</BreakpointContent>
@@ -206,11 +190,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "AppDelegate.m"
timestampString = "456648442.982284"
timestampString = "456993845.79535"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "545"
endingLineNumber = "545"
startingLineNumber = "541"
endingLineNumber = "541"
landmarkName = "-reloadBottomPane:itemView:"
landmarkType = "5">
</BreakpointContent>
@@ -222,11 +206,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "AppDelegate.m"
timestampString = "456648442.982284"
timestampString = "456993845.79535"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "563"
endingLineNumber = "563"
startingLineNumber = "559"
endingLineNumber = "559"
landmarkName = "-reloadBottomPane:itemView:"
landmarkType = "5">
</BreakpointContent>
@@ -270,11 +254,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "TaskTableController.m"
timestampString = "456648442.982284"
timestampString = "456993845.79535"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1203"
endingLineNumber = "1203"
startingLineNumber = "1250"
endingLineNumber = "1250"
landmarkName = "-handleRowSelection"
landmarkType = "5">
</BreakpointContent>
@@ -286,11 +270,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "TaskTableController.m"
timestampString = "456648442.982284"
timestampString = "456908382.278798"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "731"
endingLineNumber = "731"
startingLineNumber = "765"
endingLineNumber = "765"
landmarkName = "-refresh"
landmarkType = "5">
</BreakpointContent>
@@ -302,27 +286,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "TaskTableController.m"
timestampString = "456648442.982284"
timestampString = "456993845.79535"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "86"
endingLineNumber = "86"
landmarkName = "-numberOfRowsInTableView:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "TaskTableController.m"
timestampString = "456648442.982284"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1003"
endingLineNumber = "1003"
startingLineNumber = "1050"
endingLineNumber = "1050"
landmarkName = "-showInfo:"
landmarkType = "5">
</BreakpointContent>
@@ -334,11 +302,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "TaskTableController.m"
timestampString = "456648442.982284"
timestampString = "456908382.278798"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "783"
endingLineNumber = "783"
startingLineNumber = "817"
endingLineNumber = "817"
landmarkName = "-refresh"
landmarkType = "5">
</BreakpointContent>
@@ -366,11 +334,11 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "AppDelegate.m"
timestampString = "456648442.982284"
timestampString = "456994072.431204"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1589"
endingLineNumber = "1589"
startingLineNumber = "1695"
endingLineNumber = "1695"
landmarkName = "-filterTasks:"
landmarkType = "5">
</BreakpointContent>
@@ -382,14 +350,126 @@
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "TaskTableController.m"
timestampString = "456648442.982284"
timestampString = "456908382.278798"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "130"
endingLineNumber = "130"
startingLineNumber = "141"
endingLineNumber = "141"
landmarkName = "-tableViewSelectionDidChange:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "AppDelegate.m"
timestampString = "456993845.79535"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1464"
endingLineNumber = "1464"
landmarkName = "-selectBottomPaneContent:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "AppDelegate.m"
timestampString = "456993845.79535"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1456"
endingLineNumber = "1456"
landmarkName = "-switchView:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "AppDelegate.m"
timestampString = "456993845.79535"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1452"
endingLineNumber = "1452"
landmarkName = "-switchView:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "AppDelegate.m"
timestampString = "456994072.431204"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1580"
endingLineNumber = "1580"
landmarkName = "-controlTextDidChange:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Filter.m"
timestampString = "456909793.016924"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "50"
endingLineNumber = "50"
landmarkName = "-filterFiles:items:results:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "AppDelegate.m"
timestampString = "456994072.431204"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "1647"
endingLineNumber = "1647"
landmarkName = "-controlTextDidChange:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
<BreakpointProxy
BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
<BreakpointContent
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
filePath = "Filter.m"
timestampString = "456909837.519019"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "84"
endingLineNumber = "84"
landmarkName = "-filterConnections:items:results:"
landmarkType = "5">
</BreakpointContent>
</BreakpointProxy>
</Breakpoints>
</Bucket>
+63 -16
View File
@@ -96,7 +96,7 @@
if(YES != self.isBottomPane)
{
//when not filtered
// ->use tasks
// ->use all tasks
if(YES != isFiltered)
{
//get tasks
@@ -114,11 +114,22 @@
}
}
//bottom pane uses 'tableItems' iVar
//TODO: filter support
else
{
//set row count
rows = self.tableItems.count;
//when not filtered
// ->use all items
if(YES != isFiltered)
{
//set row count
rows = self.tableItems.count;
}
//when filtered
// ->use filtered items
else
{
//set count
rows = self.filteredItems.count;
}
}
return rows;
@@ -199,17 +210,40 @@
//for BOTTOM PANE
else
{
//sanity check
// ->make sure there is table item for row
if(self.tableItems.count <= row)
//when not filtered
// ->use all items
if(YES != isFiltered)
{
//bail
goto bail;
//sanity check
// ->make sure there is table item for row
if(self.tableItems.count <= row)
{
//bail
goto bail;
}
//grab item
// ->dylib/file/network item
item = [self.tableItems objectAtIndex:row];
}
//when filtered
// ->use filtered items
else
{
//sanity check
// ->make sure there is table item for row
if(self.filteredItems.count <= row)
{
//bail
goto bail;
}
//set count
item = [self.filteredItems objectAtIndex:row];
}
//grab item
// ->dylib/file/network item
item = [self.tableItems objectAtIndex:row];
}
//create custom item view
@@ -846,7 +880,6 @@ bail:
taskRow = [self.itemView selectedRow];
}
//TODO: add check for filterItems.count
//sanity check(s)
// ->make sure row is decent
if( (-1 == taskRow) ||
@@ -860,6 +893,7 @@ bail:
//get row that's about to be selected
rowView = [self.itemView viewAtColumn:0 row:taskRow makeIfNecessary:YES];
//TODO: need this?
//when not filtered, use all tasks
//if(YES != isFiltered)
//{
@@ -895,14 +929,27 @@ bail:
//sanity check(s)
// ->make sure row has item
if( (-1 == itemRow) ||
(self.tableItems.count < itemRow) )
((YES != self.isFiltered) && (self.tableItems.count < itemRow)) ||
((YES == self.isFiltered) && (self.filteredItems.count < itemRow)) )
{
//bail
goto bail;
}
//get item object
item = self.tableItems[itemRow];
//when not filtered
// ->just grab item
if(YES != self.isFiltered)
{
//get item
item = self.tableItems[itemRow];
}
//when filtered
// ->grab from filtered item
else
{
//get item
item = self.filteredItems[itemRow];
}
//bail
bail:
+32 -42
View File
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="7706" systemVersion="14D136" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<development version="5000" identifier="xcode"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="7706"/>
</dependencies>
@@ -44,19 +45,19 @@
</menu>
<window allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" showsToolbarButton="NO" animationBehavior="default" id="371">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES" unifiedTitleAndToolbar="YES"/>
<rect key="contentRect" x="0.0" y="0.0" width="1353" height="650"/>
<rect key="contentRect" x="0.0" y="0.0" width="1353" height="675"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="877"/>
<value key="minSize" type="size" width="1000" height="650"/>
<value key="maxSize" type="size" width="2000" height="650"/>
<view key="contentView" id="372">
<rect key="frame" x="0.0" y="0.0" width="1353" height="650"/>
<rect key="frame" x="0.0" y="-2" width="1353" height="675"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>
<progressIndicator hidden="YES" horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" maxValue="100" bezeled="NO" indeterminate="YES" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="839">
<rect key="frame" x="1157" y="-146" width="32" height="32"/>
<rect key="frame" x="1157" y="-121" width="32" height="32"/>
</progressIndicator>
<textField hidden="YES" horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="745">
<rect key="frame" x="869" y="-137" width="268" height="18"/>
<rect key="frame" x="869" y="-112" width="268" height="18"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" alignment="right" title="status..." id="748">
<font key="font" size="13" name="Menlo-Regular"/>
<color key="textColor" red="0.20000000000000001" green="0.67450980392156867" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
@@ -64,7 +65,7 @@
</textFieldCell>
</textField>
<button ambiguous="YES" misplaced="YES" tag="1002" translatesAutoresizingMaskIntoConstraints="NO" id="HoI-FQ-vTI">
<rect key="frame" x="640" y="4" width="29" height="32"/>
<rect key="frame" x="640" y="22" width="29" height="32"/>
<buttonCell key="cell" type="bevel" bezelStyle="rounded" image="logoApple" imagePosition="only" alignment="center" alternateImage="logoAppleBG" imageScaling="proportionallyDown" inset="2" id="3g8-vm-R7Z">
<behavior key="behavior" lightByContents="YES"/>
<font key="font" metaFont="system"/>
@@ -74,7 +75,7 @@
</connections>
</button>
<segmentedControl verticalHuggingPriority="750" ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="gtq-gn-VPL">
<rect key="frame" x="465" y="329" width="223" height="24"/>
<rect key="frame" x="465" y="354" width="223" height="24"/>
<segmentedCell key="cell" borderStyle="border" alignment="left" style="rounded" trackingMode="selectOne" id="DHY-0u-YD7">
<font key="font" metaFont="system"/>
<segments>
@@ -87,23 +88,12 @@
<action selector="selectBottomPaneContent:" target="494" id="CQa-nn-jVf"/>
</connections>
</segmentedControl>
<searchField wantsLayer="YES" verticalHuggingPriority="750" ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bNA-gy-9Ta">
<rect key="frame" x="1161" y="330" width="148" height="22"/>
<button ambiguous="YES" misplaced="YES" tag="1001" translatesAutoresizingMaskIntoConstraints="NO" id="gSG-Nq-plb">
<rect key="frame" x="9" y="20" width="35" height="32"/>
<constraints>
<constraint firstAttribute="height" constant="22" id="1yR-lY-9om"/>
<constraint firstAttribute="width" constant="148" id="XYi-Db-Iyc"/>
<constraint firstAttribute="width" constant="35" id="XGt-s5-weq"/>
<constraint firstAttribute="height" constant="32" id="wlR-bC-Msz"/>
</constraints>
<searchFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" borderStyle="bezel" placeholderString="Filter" usesSingleLineMode="YES" bezelStyle="round" id="bct-8m-iWd">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</searchFieldCell>
<connections>
<outlet property="delegate" destination="494" id="4ig-0K-Oup"/>
</connections>
</searchField>
<button fixedFrame="YES" tag="1001" translatesAutoresizingMaskIntoConstraints="NO" id="gSG-Nq-plb">
<rect key="frame" x="9" y="4" width="35" height="32"/>
<buttonCell key="cell" type="bevel" bezelStyle="regularSquare" image="settings" imagePosition="overlaps" alignment="center" alternateImage="settingsBG" imageScaling="proportionallyDown" inset="2" id="1TF-i7-mBn">
<behavior key="behavior" lightByContents="YES"/>
<font key="font" metaFont="system"/>
@@ -113,10 +103,10 @@
</connections>
</button>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="TNF-7q-Loy" userLabel="Top Pane">
<rect key="frame" x="0.0" y="369" width="1353" height="281"/>
<rect key="frame" x="0.0" y="394" width="1353" height="281"/>
</customView>
<customView fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="E4M-PF-VD0" userLabel="Bottom Pane">
<rect key="frame" x="0.0" y="35" width="1353" height="281"/>
<rect key="frame" x="0.0" y="60" width="1353" height="281"/>
<subviews>
<progressIndicator horizontalHuggingPriority="750" verticalHuggingPriority="750" fixedFrame="YES" maxValue="100" bezeled="NO" indeterminate="YES" style="spinning" translatesAutoresizingMaskIntoConstraints="NO" id="LMT-Bu-FAk">
<rect key="frame" x="660" y="124" width="32" height="32"/>
@@ -131,6 +121,20 @@
</textField>
</subviews>
</customView>
<searchField wantsLayer="YES" verticalHuggingPriority="750" ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bNA-gy-9Ta">
<rect key="frame" x="1133" y="355" width="175" height="22"/>
<constraints>
<constraint firstAttribute="height" constant="22" id="1yR-lY-9om"/>
</constraints>
<searchFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" borderStyle="bezel" placeholderString="Filter Dylibs" usesSingleLineMode="YES" bezelStyle="round" id="bct-8m-iWd">
<font key="font" size="11" name="Menlo-Regular"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</searchFieldCell>
<connections>
<outlet property="delegate" destination="494" id="4ig-0K-Oup"/>
</connections>
</searchField>
</subviews>
<constraints>
<constraint firstAttribute="centerX" secondItem="gtq-gn-VPL" secondAttribute="centerX" id="2Nh-NZ-P5p"/>
@@ -172,13 +176,13 @@
</toolbarItem>
<toolbarItem implicitItemIdentifier="CF826839-BC2B-4FEF-898A-77DC4D2486F1" label="" paletteLabel="" id="y4u-t8-Acq">
<nil key="toolTip"/>
<size key="minSize" width="96" height="22"/>
<size key="maxSize" width="119" height="22"/>
<size key="minSize" width="96" height="19"/>
<size key="maxSize" width="175" height="22"/>
<searchField key="view" wantsLayer="YES" verticalHuggingPriority="750" id="4Kr-b9-X6j">
<rect key="frame" x="11" y="14" width="117" height="22"/>
<rect key="frame" x="0.0" y="14" width="175" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<searchFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" borderStyle="bezel" placeholderString="Filter Tasks" usesSingleLineMode="YES" bezelStyle="round" id="WXx-nE-N2S">
<font key="font" metaFont="system"/>
<font key="font" size="11" name="Menlo-Regular"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</searchFieldCell>
@@ -187,20 +191,6 @@
</connections>
</searchField>
</toolbarItem>
<toolbarItem implicitItemIdentifier="A5784C30-D7FC-4958-875B-487768A4E610" label="" paletteLabel="" id="O1y-1z-g0u">
<nil key="toolTip"/>
<size key="minSize" width="38" height="17"/>
<size key="maxSize" width="38" height="17"/>
<textField key="view" horizontalHuggingPriority="251" verticalHuggingPriority="750" id="Pc9-qO-K4R">
<rect key="frame" x="6" y="15" width="38" height="17"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="Tasks" id="jaa-xq-WqA">
<font key="font" metaFont="system"/>
<color key="textColor" name="labelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</toolbarItem>
<toolbarItem implicitItemIdentifier="F54A1AEB-291E-4556-8B7E-D1C677012ABF" label="" paletteLabel="" image="kkText" id="UwA-pW-Mg8">
<nil key="toolTip"/>
<size key="minSize" width="48" height="48"/>
@@ -221,7 +211,7 @@
<toolbarItem reference="y4u-t8-Acq"/>
</defaultToolbarItems>
</toolbar>
<point key="canvasLocation" x="662.5" y="335"/>
<point key="canvasLocation" x="662.5" y="347.5"/>
</window>
<customObject id="494" customClass="AppDelegate">
<connections>
Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 34 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 269 KiB

After

Width:  |  Height:  |  Size: 154 KiB