[52620] branches/gsoc09-gui/MPGUI
juanger at macports.org
juanger at macports.org
Fri Jun 19 17:20:50 PDT 2009
Revision: 52620
http://trac.macports.org/changeset/52620
Author: juanger at macports.org
Date: 2009-06-19 17:20:44 -0700 (Fri, 19 Jun 2009)
Log Message:
-----------
Adding some documentation comments and a Docs build target to generate the docs with headerdoc.
Modified Paths:
--------------
branches/gsoc09-gui/MPGUI/English.lproj/MainMenu.xib
branches/gsoc09-gui/MPGUI/MPActionLauncher.h
branches/gsoc09-gui/MPGUI/MPActionLauncher.m
branches/gsoc09-gui/MPGUI/MPGUI.xcodeproj/project.pbxproj
branches/gsoc09-gui/MPGUI/PortsTableController.h
branches/gsoc09-gui/MPGUI/PortsTableController.m
Modified: branches/gsoc09-gui/MPGUI/English.lproj/MainMenu.xib
===================================================================
--- branches/gsoc09-gui/MPGUI/English.lproj/MainMenu.xib 2009-06-19 23:53:17 UTC (rev 52619)
+++ branches/gsoc09-gui/MPGUI/English.lproj/MainMenu.xib 2009-06-20 00:20:44 UTC (rev 52620)
@@ -1883,7 +1883,7 @@
<reference ref="385089462"/>
</object>
</object>
- <object class="NSMutableDictionary" id="766845935">
+ <object class="NSMutableDictionary" id="445352329">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMutableArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -2009,7 +2009,7 @@
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="833924481"/>
<reference ref="328879136"/>
- <reference ref="766845935"/>
+ <reference ref="445352329"/>
</object>
<object class="NSMutableArray">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -2343,7 +2343,7 @@
<nil key="NSViewClass"/>
<string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
<object class="NSView" key="NSWindowView" id="187671130">
- <nil key="NSNextResponder"/>
+ <reference key="NSNextResponder"/>
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
@@ -2360,22 +2360,15 @@
<object class="NSTableView" id="238622922">
<reference key="NSNextResponder" ref="340647127"/>
<int key="NSvFlags">256</int>
- <string key="NSFrameSize">{246, 315}</string>
+ <string key="NSFrameSize">{246, 332}</string>
<reference key="NSSuperview" ref="340647127"/>
+ <reference key="NSWindow"/>
<bool key="NSEnabled">YES</bool>
- <object class="NSTableHeaderView" key="NSHeaderView" id="579984109">
- <reference key="NSNextResponder" ref="47203486"/>
+ <object class="_NSCornerView" key="NSCornerView">
+ <nil key="NSNextResponder"/>
<int key="NSvFlags">256</int>
- <string key="NSFrameSize">{246, 17}</string>
- <reference key="NSSuperview" ref="47203486"/>
- <reference key="NSTableView" ref="238622922"/>
+ <string key="NSFrame">{{247, 1}, {16, 17}}</string>
</object>
- <object class="_NSCornerView" key="NSCornerView" id="1056392554">
- <reference key="NSNextResponder" ref="199390391"/>
- <int key="NSvFlags">256</int>
- <string key="NSFrame">{{247, 0}, {16, 17}}</string>
- <reference key="NSSuperview" ref="199390391"/>
- </object>
<object class="NSMutableArray" key="NSTableColumns">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSTableColumn" id="53254606">
@@ -2464,7 +2457,7 @@
<double key="NSIntercellSpacingHeight">2.000000e+00</double>
<reference key="NSBackgroundColor" ref="415231890"/>
<reference key="NSGridColor" ref="391761051"/>
- <double key="NSRowHeight">1.700000e+01</double>
+ <double key="NSRowHeight">4.000000e+01</double>
<int key="NSTvFlags">-692060160</int>
<int key="NSColumnAutoresizingStyle">4</int>
<int key="NSDraggingSourceMaskForLocal">15</int>
@@ -2472,9 +2465,9 @@
<bool key="NSAllowsTypeSelect">YES</bool>
</object>
</object>
- <string key="NSFrame">{{1, 17}, {246, 315}}</string>
+ <string key="NSFrame">{{1, 0}, {246, 332}}</string>
<reference key="NSSuperview" ref="199390391"/>
- <reference key="NSNextKeyView" ref="238622922"/>
+ <reference key="NSWindow"/>
<reference key="NSDocView" ref="238622922"/>
<reference key="NSBGColor" ref="800202432"/>
<int key="NScvFlags">4</int>
@@ -2482,51 +2475,38 @@
<object class="NSScroller" id="482661369">
<reference key="NSNextResponder" ref="199390391"/>
<int key="NSvFlags">256</int>
- <string key="NSFrame">{{247, 17}, {15, 315}}</string>
+ <string key="NSFrame">{{247, 0}, {15, 332}}</string>
<reference key="NSSuperview" ref="199390391"/>
+ <reference key="NSWindow"/>
<reference key="NSTarget" ref="199390391"/>
<string key="NSAction">_doScroller:</string>
- <double key="NSPercent">9.969040e-01</double>
+ <double key="NSPercent">9.969970e-01</double>
</object>
<object class="NSScroller" id="400167025">
<reference key="NSNextResponder" ref="199390391"/>
<int key="NSvFlags">256</int>
<string key="NSFrame">{{1, 332}, {246, 15}}</string>
<reference key="NSSuperview" ref="199390391"/>
+ <reference key="NSWindow"/>
<int key="NSsFlags">1</int>
<reference key="NSTarget" ref="199390391"/>
<string key="NSAction">_doScroller:</string>
- <double key="NSPercent">9.959350e-01</double>
+ <double key="NSPercent">9.959514e-01</double>
</object>
- <object class="NSClipView" id="47203486">
- <reference key="NSNextResponder" ref="199390391"/>
- <int key="NSvFlags">2304</int>
- <object class="NSMutableArray" key="NSSubviews">
- <bool key="EncodedWithXMLCoder">YES</bool>
- <reference ref="579984109"/>
- </object>
- <string key="NSFrame">{{1, 0}, {246, 17}}</string>
- <reference key="NSSuperview" ref="199390391"/>
- <reference key="NSNextKeyView" ref="579984109"/>
- <reference key="NSDocView" ref="579984109"/>
- <reference key="NSBGColor" ref="800202432"/>
- <int key="NScvFlags">4</int>
- </object>
- <reference ref="1056392554"/>
</object>
<string key="NSFrame">{{6, 26}, {263, 348}}</string>
<reference key="NSSuperview" ref="187671130"/>
- <reference key="NSNextKeyView" ref="340647127"/>
+ <reference key="NSWindow"/>
<int key="NSsFlags">50</int>
<reference key="NSVScroller" ref="482661369"/>
<reference key="NSHScroller" ref="400167025"/>
<reference key="NSContentView" ref="340647127"/>
- <reference key="NSHeaderClipView" ref="47203486"/>
- <reference key="NSCornerView" ref="1056392554"/>
- <bytes key="NSScrollAmts">QSAAAEEgAABBmAAAQZgAAA</bytes>
+ <bytes key="NSScrollAmts">QSAAAEEgAABCKAAAQigAAA</bytes>
</object>
</object>
<string key="NSFrameSize">{276, 378}</string>
+ <reference key="NSSuperview"/>
+ <reference key="NSWindow"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1280, 778}}</string>
<string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
@@ -3749,7 +3729,6 @@
<reference ref="482661369"/>
<reference ref="400167025"/>
<reference ref="238622922"/>
- <reference ref="579984109"/>
</object>
<reference key="parent" ref="187671130"/>
</object>
@@ -3769,8 +3748,8 @@
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="53254606"/>
- <reference ref="174905645"/>
<reference ref="677207066"/>
+ <reference ref="174905645"/>
</object>
<reference key="parent" ref="199390391"/>
</object>
@@ -3807,11 +3786,6 @@
<reference key="parent" ref="238622922"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">448</int>
- <reference key="object" ref="579984109"/>
- <reference key="parent" ref="199390391"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">449</int>
<reference key="object" ref="149326055"/>
<reference key="parent" ref="53254606"/>
@@ -4380,7 +4354,6 @@
<string>443.IBPluginDependency</string>
<string>444.IBPluginDependency</string>
<string>446.IBPluginDependency</string>
- <string>448.IBPluginDependency</string>
<string>449.IBPluginDependency</string>
<string>450.IBPluginDependency</string>
<string>451.IBPluginDependency</string>
@@ -4620,9 +4593,9 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>{{493, 75}, {276, 378}}</string>
- <string>{{493, 75}, {276, 378}}</string>
- <boolean value="YES"/>
+ <string>{{650, 176}, {276, 378}}</string>
+ <string>{{650, 176}, {276, 378}}</string>
+ <reference ref="6"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -4644,7 +4617,6 @@
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<reference ref="9"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -4715,7 +4687,7 @@
</object>
</object>
<nil key="sourceID"/>
- <int key="maxID">625</int>
+ <int key="maxID">626</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
Modified: branches/gsoc09-gui/MPGUI/MPActionLauncher.h
===================================================================
--- branches/gsoc09-gui/MPGUI/MPActionLauncher.h 2009-06-19 23:53:17 UTC (rev 52619)
+++ branches/gsoc09-gui/MPGUI/MPActionLauncher.h 2009-06-20 00:20:44 UTC (rev 52620)
@@ -6,18 +6,51 @@
// Copyright 2009 UNAM. All rights reserved.
//
+/*!
+ @header MPActionLauncher
+ The MPActionLauncher allows acces to a shared per thread MacPorts Framework
+ wrapper to excecute MacPorts actions. It performs all the actions in another
+ thread in order to leave the GUI responsive.
+*/
+
#import <Cocoa/Cocoa.h>
#import <MacPorts/MacPorts.h>
+/*!
+ @class MPActionLauncher
+ @abstract Wrapper for MacPorts Framework actions
+ @discussion Contains a shared per thread MacPorts Framework wrapper
+*/
@interface MPActionLauncher : NSObject {
NSMutableArray *ports;
BOOL isLoading;
}
+/*!
+ @var ports
+ @abstract An array of available MPPorts
+*/
+ at property (copy) NSMutableArray *ports;
- at property (copy) NSMutableArray *ports;
+/*!
+ @var isLoading
+ @abstract Tells whether the instance is loading the ports array or not
+*/
@property BOOL isLoading;
+/*!
+ @brief Return singleton shared MPActionLauncher instance
+*/
++ (MPActionLauncher*)sharedInstance;
+
+/*!
+ @brief Loads the MPPorts array with the available ports current PKGPath in another thread
+*/
- (void)loadPortsInBackground;
+
+/*!
+ @brief Installs a single port in another thread
+ @param port MPPort that represents the port to install
+*/
- (void)installPortInBackground:(MPPort *)port;
@end
Modified: branches/gsoc09-gui/MPGUI/MPActionLauncher.m
===================================================================
--- branches/gsoc09-gui/MPGUI/MPActionLauncher.m 2009-06-19 23:53:17 UTC (rev 52619)
+++ branches/gsoc09-gui/MPGUI/MPActionLauncher.m 2009-06-20 00:20:44 UTC (rev 52620)
@@ -40,7 +40,6 @@
NSString *pkgPath = [bundlePath stringByAppendingPathComponent:@"../macports-1.8/Library/Tcl"];
pkgPath = [pkgPath stringByStandardizingPath];
[MPMacPorts setPKGPath:pkgPath];
- [self loadPortsInBackground];
ports = [NSMutableArray arrayWithCapacity:6000];
sharedActionLauncher = self;
}
Modified: branches/gsoc09-gui/MPGUI/MPGUI.xcodeproj/project.pbxproj
===================================================================
--- branches/gsoc09-gui/MPGUI/MPGUI.xcodeproj/project.pbxproj 2009-06-19 23:53:17 UTC (rev 52619)
+++ branches/gsoc09-gui/MPGUI/MPGUI.xcodeproj/project.pbxproj 2009-06-20 00:20:44 UTC (rev 52620)
@@ -6,6 +6,20 @@
objectVersion = 45;
objects = {
+/* Begin PBXAggregateTarget section */
+ 21351F530FEC59520074ACFE /* Docs */ = {
+ isa = PBXAggregateTarget;
+ buildConfigurationList = 21351F5D0FEC597F0074ACFE /* Build configuration list for PBXAggregateTarget "Docs" */;
+ buildPhases = (
+ 21351F520FEC59520074ACFE /* ShellScript */,
+ );
+ dependencies = (
+ );
+ name = Docs;
+ productName = Docs;
+ };
+/* End PBXAggregateTarget section */
+
/* Begin PBXBuildFile section */
1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; };
214BAFE40FE7164200BD1B46 /* MPActionLauncher.m in Sources */ = {isa = PBXBuildFile; fileRef = 214BAFE30FE7164200BD1B46 /* MPActionLauncher.m */; };
@@ -271,6 +285,7 @@
projectRoot = "";
targets = (
8D1107260486CEB800E47090 /* MPGUI */,
+ 21351F530FEC59520074ACFE /* Docs */,
);
};
/* End PBXProject section */
@@ -328,6 +343,19 @@
/* End PBXResourcesBuildPhase section */
/* Begin PBXShellScriptBuildPhase section */
+ 21351F520FEC59520074ACFE /* ShellScript */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "BASEDIR=`pwd`\nDOCDIR=build/Documentation\nif [ ! -d $DOCDIR ]; then\n\tmkdir $DOCDIR\nfi\ncd $DOCDIR\nheaderdoc2html -u -o HTML $BASEDIR/*.h* && gatherheaderdoc HTML index.html";
+ };
21FC212A0FE8546700B1E835 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
@@ -388,6 +416,34 @@
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
+ 21351F540FEC59520074ACFE /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ PRODUCT_NAME = Docs;
+ };
+ name = Debug;
+ };
+ 21351F550FEC59520074ACFE /* Debug-InstallMacPorts */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ PRODUCT_NAME = Docs;
+ };
+ name = "Debug-InstallMacPorts";
+ };
+ 21351F560FEC59520074ACFE /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_ENABLE_FIX_AND_CONTINUE = NO;
+ PRODUCT_NAME = Docs;
+ ZERO_LINK = NO;
+ };
+ name = Release;
+ };
21FC211D0FE84F7F00B1E835 /* Debug-InstallMacPorts */ = {
isa = XCBuildConfiguration;
buildSettings = {
@@ -493,6 +549,16 @@
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
+ 21351F5D0FEC597F0074ACFE /* Build configuration list for PBXAggregateTarget "Docs" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 21351F540FEC59520074ACFE /* Debug */,
+ 21351F550FEC59520074ACFE /* Debug-InstallMacPorts */,
+ 21351F560FEC59520074ACFE /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "MPGUI" */ = {
isa = XCConfigurationList;
buildConfigurations = (
Modified: branches/gsoc09-gui/MPGUI/PortsTableController.h
===================================================================
--- branches/gsoc09-gui/MPGUI/PortsTableController.h 2009-06-19 23:53:17 UTC (rev 52619)
+++ branches/gsoc09-gui/MPGUI/PortsTableController.h 2009-06-20 00:20:44 UTC (rev 52620)
@@ -6,9 +6,22 @@
// Copyright 2009 UNAM. All rights reserved.
//
+/*!
+ @header PortsTableController
+ This is the controller responsible of managing search operations in the
+ ports table. This uses a NSPredicateEditor to implement the advanced search
+ and a NSPredicate to filter the NSArrayController which contains all the
+ available ports.
+*/
+
#import <Cocoa/Cocoa.h>
+#import "MPActionLauncher.h"
-
+/*!
+ @class PortsTableController
+ @abstract Wrapper for MacPorts Framework actions
+ @discussion Contains a shared per thread MacPorts Framework wrapper
+ */
@interface PortsTableController : NSObject {
IBOutlet NSTableView *portsTableView;
IBOutlet NSPredicateEditor *predicateEditor;
@@ -19,9 +32,22 @@
NSInteger rowCount;
}
- at property (copy) NSPredicate *predicate;
+/*!
+ @var predicate
+ @abstract The NSPredicate which filters the ports table
+*/
+ at property (readonly, copy) NSPredicate *predicate;
+/*!
+ @brief Creates a NSPredicate based in the rows of the NSPredicateEditor
+ @param sender The object that sends the action
+*/
- (IBAction)advancedSearch:(id)sender;
+
+/*!
+ @brief Creates a NSPredicate based in the search text field
+ @param sender The object that sends the action
+*/
- (IBAction)basicSearch:(id)sender;
@end
Modified: branches/gsoc09-gui/MPGUI/PortsTableController.m
===================================================================
--- branches/gsoc09-gui/MPGUI/PortsTableController.m 2009-06-19 23:53:17 UTC (rev 52619)
+++ branches/gsoc09-gui/MPGUI/PortsTableController.m 2009-06-20 00:20:44 UTC (rev 52620)
@@ -27,6 +27,7 @@
}
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
+ [[MPActionLauncher sharedInstance] loadPortsInBackground];
[self changePredicateEditorSize:0];
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090619/ffb3fdd3/attachment-0001.html>
More information about the macports-changes
mailing list