From 96bc6d783f72032d5b04b4748f915239c56b9bd3 Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Sat, 7 May 2011 23:51:13 +0000 Subject: Re-add the ability the show the full process list in the server processes panel. Fixes issue #1036. --- Interfaces/English.lproj/DatabaseProcessList.xib | 90 ++++++++++++++++++++---- Resources/Plists/PreferenceDefaults.plist | 4 +- Source/SPConstants.h | 1 + Source/SPConstants.m | 1 + Source/SPProcessListController.h | 1 + Source/SPProcessListController.m | 16 ++++- 6 files changed, 95 insertions(+), 18 deletions(-) diff --git a/Interfaces/English.lproj/DatabaseProcessList.xib b/Interfaces/English.lproj/DatabaseProcessList.xib index 95a80875..fd761e49 100644 --- a/Interfaces/English.lproj/DatabaseProcessList.xib +++ b/Interfaces/English.lproj/DatabaseProcessList.xib @@ -2,17 +2,17 @@ 1050 - 10J567 - 804 + 10J869 + 851 1038.35 - 462.00 + 461.00 com.apple.InterfaceBuilder.CocoaPlugin - 804 + 851 YES - + @@ -44,7 +44,7 @@ View - {1.79769e+308, 1.79769e+308} + {3.40282e+38, 3.40282e+38} {640, 200} @@ -197,7 +197,7 @@ controlBackgroundColor 3 - MC42NjY2NjY2NjY3AA + MC42NjY2NjY2ODY1AA @@ -655,6 +655,16 @@ _popUpItemAction: + + + Show FULL Process List + + 2147483647 + + + _popUpItemAction: + + YES @@ -761,7 +771,7 @@ - 1 + 2 YES 1 YES @@ -822,7 +832,7 @@ {{0, 0}, {1680, 1028}} {640, 222} - {1.79769e+308, 1.79769e+308} + {3.40282e+38, 3.40282e+38} @@ -865,6 +875,10 @@ + + YES + ProcessListShowFullProcessList + YES @@ -1376,6 +1390,30 @@ 185 + + + toggeleShowFullProcessList: + + + + 187 + + + + value: values.ProcessListShowFullProcessList + + + + + + value: values.ProcessListShowFullProcessList + value + values.ProcessListShowFullProcessList + 2 + + + 188 + @@ -1683,6 +1721,7 @@ + @@ -1919,6 +1958,11 @@ + + 186 + + + @@ -1982,6 +2026,7 @@ 178.IBPluginDependency 18.IBPluginDependency 18.ImportedFromIB2 + 186.IBPluginDependency 19.IBPluginDependency 19.ImportedFromIB2 20.IBPluginDependency @@ -2064,9 +2109,9 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{852, 726}, {229, 93}} + {{470, 726}, {229, 93}} com.apple.InterfaceBuilder.CocoaPlugin - {{852, 726}, {229, 93}} + {{470, 726}, {229, 93}} @@ -2122,6 +2167,7 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -2130,9 +2176,9 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{394, 380}, {640, 203}} + {{626, 333}, {640, 203}} com.apple.InterfaceBuilder.CocoaPlugin - {{394, 380}, {640, 203}} + {{626, 333}, {640, 203}} {{321, 508}, {411, 341}} @@ -2173,7 +2219,7 @@ com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin - {{365, 386}, {209, 78}} + {{605, 260}, {223, 98}} com.apple.InterfaceBuilder.CocoaPlugin com.apple.InterfaceBuilder.CocoaPlugin @@ -2210,7 +2256,7 @@ - 185 + 188 @@ -2250,6 +2296,13 @@ Frameworks/PSMTabBar/PSMTabBarControl.h + + NSObject + + IBProjectSource + Frameworks/PSMTabBar/PSMTabBarController.h + + NSObject @@ -2332,6 +2385,7 @@ saveServerProcesses: setAutoRefreshInterval: setCustomAutoRefreshInterval: + toggeleShowFullProcessList: toggleProcessListAutoRefresh: toggleShowProcessID: @@ -2347,6 +2401,7 @@ id id id + id @@ -2361,6 +2416,7 @@ saveServerProcesses: setAutoRefreshInterval: setCustomAutoRefreshInterval: + toggeleShowFullProcessList: toggleProcessListAutoRefresh: toggleShowProcessID: @@ -2398,6 +2454,10 @@ setCustomAutoRefreshInterval: id + + toggeleShowFullProcessList: + id + toggleProcessListAutoRefresh: id diff --git a/Resources/Plists/PreferenceDefaults.plist b/Resources/Plists/PreferenceDefaults.plist index 0c34ab58..07eb71ae 100644 --- a/Resources/Plists/PreferenceDefaults.plist +++ b/Resources/Plists/PreferenceDefaults.plist @@ -161,6 +161,8 @@ 1000 ProcessListShowProcessID + ProcessListShowFullProcessList + ProcessListEnableAutoRefresh ProcessListAutoRrefreshInterval @@ -172,7 +174,7 @@ ResetAutoIncrementAfterDeletionOfAllRows FilterTableDefaultOperator - LIKE '%@%' + LIKE '%@%' WebKitDeveloperExtras deletedDefaultBundles diff --git a/Source/SPConstants.h b/Source/SPConstants.h index df66951a..ef1fc0c4 100644 --- a/Source/SPConstants.h +++ b/Source/SPConstants.h @@ -349,6 +349,7 @@ extern NSString *SPTableInformationPanelCollapsed; extern NSString *SPTableColumnWidths; extern NSString *SPProcessListTableColumnWidths; extern NSString *SPProcessListShowProcessID; +extern NSString *SPProcessListShowFullProcessList; extern NSString *SPProcessListEnableAutoRefresh; extern NSString *SPProcessListAutoRrefreshInterval; extern NSString *SPFavoritesSortedBy; diff --git a/Source/SPConstants.m b/Source/SPConstants.m index abb27c1c..ef263d98 100644 --- a/Source/SPConstants.m +++ b/Source/SPConstants.m @@ -155,6 +155,7 @@ NSString *SPTableInformationPanelCollapsed = @"TableInformationPanelCollap NSString *SPTableColumnWidths = @"tableColumnWidths"; NSString *SPProcessListTableColumnWidths = @"ProcessListTableColumnWidths"; NSString *SPProcessListShowProcessID = @"ProcessListShowProcessID"; +NSString *SPProcessListShowFullProcessList = @"ProcessListShowFullProcessList"; NSString *SPProcessListEnableAutoRefresh = @"ProcessListEnableAutoRefresh"; NSString *SPProcessListAutoRrefreshInterval = @"ProcessListAutoRrefreshInterval"; NSString *SPFavoritesSortedBy = @"FavoritesSortedBy"; diff --git a/Source/SPProcessListController.h b/Source/SPProcessListController.h index 3fc66c78..df5f48a6 100644 --- a/Source/SPProcessListController.h +++ b/Source/SPProcessListController.h @@ -58,6 +58,7 @@ - (IBAction)killProcessQuery:(id)sender; - (IBAction)killProcessConnection:(id)sender; - (IBAction)toggleShowProcessID:(id)sender; +- (IBAction)toggeleShowFullProcessList:(id)sender; - (IBAction)toggleProcessListAutoRefresh:(id)sender; - (IBAction)setAutoRefreshInterval:(id)sender; - (IBAction)setCustomAutoRefreshInterval:(id)sender; diff --git a/Source/SPProcessListController.m b/Source/SPProcessListController.m index 8062fd93..4caa6a59 100644 --- a/Source/SPProcessListController.m +++ b/Source/SPProcessListController.m @@ -62,6 +62,8 @@ static const NSString *SPTableViewIDColumnIdentifier = @"Id"; autoRefreshTimer = nil; processListThreadRunning = NO; + showFullProcessList = [prefs boolForKey:SPProcessListShowFullProcessList]; + processes = [[NSMutableArray alloc] init]; prefs = [NSUserDefaults standardUserDefaults]; @@ -287,6 +289,16 @@ static const NSString *SPTableViewIDColumnIdentifier = @"Id"; [[processListTableView tableColumnWithIdentifier:SPTableViewIDColumnIdentifier] setHidden:([sender state])]; } +/** + * Toggles the display of the FULL process list. + */ +- (IBAction)toggeleShowFullProcessList:(id)sender +{ + showFullProcessList = (!showFullProcessList); + + [self refreshProcessList:self]; +} + /** * Toggles whether or not auto refresh is enabled. */ @@ -309,7 +321,7 @@ static const NSString *SPTableViewIDColumnIdentifier = @"Id"; } /** - * + * Displays the set custom auto-refresh interval sheet. */ - (IBAction)setCustomAutoRefreshInterval:(id)sender { @@ -675,7 +687,7 @@ static const NSString *SPTableViewIDColumnIdentifier = @"Id"; // Get processes if ([connection isConnected]) { - MCPResult *processList = [connection listProcesses]; + MCPResult *processList = (showFullProcessList) ? [connection queryString:@"SHOW FULL PROCESSLIST"] : [connection listProcesses]; [processList setReturnDataAsStrings:YES]; -- cgit v1.2.3