aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPProcessListController.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPProcessListController.m')
-rw-r--r--Source/SPProcessListController.m25
1 files changed, 23 insertions, 2 deletions
diff --git a/Source/SPProcessListController.m b/Source/SPProcessListController.m
index b0242a35..4f0490cb 100644
--- a/Source/SPProcessListController.m
+++ b/Source/SPProcessListController.m
@@ -80,7 +80,7 @@ static NSString *SPTableViewIDColumnIdentifier = @"Id";
*/
- (void)awakeFromNib
{
- [[self window] setTitle:[NSString stringWithFormat:@"%@ %@", [[(SPAppController*)[NSApp delegate] frontDocument] name], NSLocalizedString(@"Server Processes", @"server processes window title")]];
+ [[self window] setTitle:[NSString stringWithFormat:NSLocalizedString(@"Server Processes on %@", @"server processes window title (var = hostname)"),[[(SPAppController*)[NSApp delegate] frontDocument] name]]];
[self setWindowFrameAutosaveName:@"ProcessList"];
@@ -700,8 +700,29 @@ static NSString *SPTableViewIDColumnIdentifier = @"Id";
for (i = 0; i < [processList numOfRows]; i++)
{
- [processes addObject:[processList fetchRowAsDictionary]];
+ //MCPKit currently returns numbers as NSString, which will break sorting of numbers in this case.
+ NSMutableDictionary *rowsFixed = [[processList fetchRowAsDictionary] mutableCopy];
+
+ id idColumn = [rowsFixed objectForKey:@"Id"];
+ //Id is a signed int(11) - this is a signed 32 bit int value
+ if(idColumn != nil && [idColumn isKindOfClass:[NSString class]]) {
+ int numRaw = [(NSString *)idColumn intValue];
+ NSNumber *num = [NSNumber numberWithInt:numRaw];
+ [rowsFixed setObject:num forKey:@"Id"];
+ }
+
+ id timeColumn = [rowsFixed objectForKey:@"Time"];
+ //Time is a signed int(7) - this is the same 32 bit int value
+ if(timeColumn != nil && [timeColumn isKindOfClass:[NSString class]]) {
+ int numRaw = [(NSString *)timeColumn intValue];
+ NSNumber *num = [NSNumber numberWithInt:numRaw];
+ [rowsFixed setObject:num forKey:@"Time"];
+ }
+
+ [processes addObject:[[rowsFixed copy] autorelease]];
+ [rowsFixed release];
}
+
}
// Update the UI on the main thread