Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/qyb/sohu
Browse files Browse the repository at this point in the history
  • Loading branch information
xuyongping committed Mar 6, 2012
2 parents 03aff42 + 806d6ce commit 38215b2
Show file tree
Hide file tree
Showing 120 changed files with 6,549 additions and 4,138 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

/src/StorageWorkspace/StorageAPI/bin
Binary file removed Thumbs.db
Binary file not shown.
76 changes: 38 additions & 38 deletions doc/web_api.mm

Large diffs are not rendered by default.

Binary file modified doc/web_api_html.zip
Binary file not shown.
Binary file modified src/Client/Iphone/sohukan/.DS_Store
Binary file not shown.
320 changes: 226 additions & 94 deletions src/Client/Iphone/sohukan/sohukan.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -23,28 +23,14 @@
continueAfterRunningActions = "No"
isPathRelative = "1"
filePath = "sohukan/DatabaseProcess.m"
timestampString = "351768664.246845"
timestampString = "352272363.318296"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "145"
endingLineNumber = "145"
startingLineNumber = "140"
endingLineNumber = "140"
landmarkName = "-getNotReadArticles"
landmarkType = "5">
</FileBreakpoint>
<FileBreakpoint
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
isPathRelative = "1"
filePath = "sohukan/ListItemCell.m"
timestampString = "351400550.983844"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "17"
endingLineNumber = "17"
landmarkName = "-handleSwipe:"
landmarkType = "5">
</FileBreakpoint>
<FileBreakpoint
shouldBeEnabled = "No"
ignoreCount = "0"
Expand All @@ -65,25 +51,25 @@
continueAfterRunningActions = "No"
isPathRelative = "1"
filePath = "sohukan/NSURLProtocolCustom.m"
timestampString = "351503988.830436"
timestampString = "352273622.423527"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "86"
endingLineNumber = "86">
startingLineNumber = "85"
endingLineNumber = "85">
</FileBreakpoint>
<FileBreakpoint
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
isPathRelative = "1"
filePath = "sohukan/sohukanAppDelegate.m"
timestampString = "351761454.626548"
timestampString = "352628199.968193"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "183"
endingLineNumber = "183"
landmarkName = "-application:didFinishLaunchingWithOptions:"
landmarkType = "5">
startingLineNumber = "230"
endingLineNumber = "230"
landmarkName = "@implementation sohukanAppDelegate"
landmarkType = "3">
</FileBreakpoint>
<FileBreakpoint
shouldBeEnabled = "No"
Expand All @@ -105,11 +91,11 @@
continueAfterRunningActions = "No"
isPathRelative = "1"
filePath = "sohukan/NotReadViewController.m"
timestampString = "351756486.642055"
timestampString = "352626658.293057"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "38"
endingLineNumber = "38"
startingLineNumber = "35"
endingLineNumber = "35"
landmarkName = "-initButton"
landmarkType = "5">
</FileBreakpoint>
Expand All @@ -119,13 +105,69 @@
continueAfterRunningActions = "No"
isPathRelative = "1"
filePath = "sohukan/ReadedViewController.m"
timestampString = "351756133.258789"
timestampString = "352630433.132658"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "153"
endingLineNumber = "153"
startingLineNumber = "210"
endingLineNumber = "210"
landmarkName = "-buildSearchResult:"
landmarkType = "5">
</FileBreakpoint>
<FileBreakpoint
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
isPathRelative = "1"
filePath = "sohukan/DetailViewController.m"
timestampString = "352630433.132658"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "238"
endingLineNumber = "238"
landmarkName = "-viewWillAppear:"
landmarkType = "5">
</FileBreakpoint>
<FileBreakpoint
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
isPathRelative = "1"
filePath = "sohukan/NotReadViewController.m"
timestampString = "352626658.293057"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "270"
endingLineNumber = "270"
landmarkName = "-readyToMark:"
landmarkType = "5">
</FileBreakpoint>
<FileBreakpoint
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
isPathRelative = "1"
filePath = "sohukan/SettingViewController.h"
timestampString = "352196902.705261"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "24"
endingLineNumber = "24"
landmarkName = "imageSwitch"
landmarkType = "19">
</FileBreakpoint>
<FileBreakpoint
shouldBeEnabled = "No"
ignoreCount = "0"
continueAfterRunningActions = "No"
isPathRelative = "1"
filePath = "sohukan/ReadedViewController.m"
timestampString = "352630433.132658"
startingColumnNumber = "9223372036854775807"
endingColumnNumber = "9223372036854775807"
startingLineNumber = "310"
endingLineNumber = "310"
landmarkName = "-handleLeftSwipe:"
landmarkType = "5">
</FileBreakpoint>
</FileBreakpoints>
</Bucket>
Binary file modified src/Client/Iphone/sohukan/sohukan/.DS_Store
Binary file not shown.
8 changes: 5 additions & 3 deletions src/Client/Iphone/sohukan/sohukan/AddCategory.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,17 @@
//

#import <UIKit/UIKit.h>

#import "Models.h"

@protocol FlipSideDelegate;

@interface AddCategory : UIViewController{
IBOutlet UITextField *category;
IBOutlet UITextField *textField;
id <FlipSideDelegate> delegate;
Category *category;
}
@property(nonatomic, retain)IBOutlet UITextField *category;
@property(nonatomic, retain)IBOutlet UITextField *textField;
@property(nonatomic, retain)Category *category;
@property(nonatomic, assign) id <FlipSideDelegate> delegate;
-(IBAction)cancelAction:(id)sender;
-(IBAction)saveAction:(id)sender;
Expand Down
27 changes: 21 additions & 6 deletions src/Client/Iphone/sohukan/sohukan/AddCategory.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
#import "DatabaseProcess.h"

@implementation AddCategory
@synthesize category;
@synthesize textField;
@synthesize delegate;
@synthesize category;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
Expand All @@ -26,33 +28,46 @@ - (void)didReceiveMemoryWarning
[super didReceiveMemoryWarning];
}

- (void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
textField.text = self.category.name;

}

- (void)viewDidLoad
{
[super viewDidLoad];
}

- (void)viewDidUnload
{
[category release];
category = nil;
[textField release];
textField = nil;
self.category = nil;
[super viewDidUnload];
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
// Return YES for supported orientations
return (interfaceOrientation == UIInterfaceOrientationPortrait);
}

-(IBAction)cancelAction:(id)sender
{
[self.delegate flipsideDidFinish:self];
}

-(IBAction)saveAction:(id)sender
{
if ([category.text length] >= 1){
if ([textField.text length] >= 1){
DatabaseProcess *dp = [[DatabaseProcess alloc] init];
[dp executeUpdate:[NSString stringWithFormat:@"INSERT INTO Category (name) VALUES ('%@')", category.text]];
FMResultSet *rs = [dp getCategoryEntity:self.category.name];
if ([rs next]) {
[dp executeUpdate:[NSString stringWithFormat:@"UPDATE Category SET name='%@' WHERE name='%@'", textField.text, self.category.name]];
}else{
[dp executeUpdate:[NSString stringWithFormat:@"INSERT INTO Category (name) VALUES ('%@')", textField.text]];
}
[dp release];
}
[self.delegate flipsideDidFinish:self];
Expand Down
100 changes: 94 additions & 6 deletions src/Client/Iphone/sohukan/sohukan/AddCategory.xib
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
<int key="NSvFlags">292</int>
<string key="NSFrame">{{10, 79}, {301, 31}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="912888619"/>
<bool key="IBUIOpaque">NO</bool>
<bool key="IBUIClipsSubviews">YES</bool>
Expand Down Expand Up @@ -83,6 +84,7 @@
<int key="NSvFlags">290</int>
<string key="NSFrameSize">{320, 44}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="248288576"/>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSColor" key="IBUITintColor">
Expand All @@ -107,8 +109,9 @@
<object class="IBUIButton" id="912888619">
<reference key="NSNextResponder" ref="191373211"/>
<int key="NSvFlags">292</int>
<string key="NSFrame">{{10, 134}, {301, 31}}</string>
<string key="NSFrame">{{10, 134}, {300, 30}}</string>
<reference key="NSSuperview" ref="191373211"/>
<reference key="NSWindow"/>
<bool key="IBUIOpaque">NO</bool>
<string key="targetRuntimeIdentifier">IBCocoaTouchFramework</string>
<int key="IBUIContentHorizontalAlignment">0</int>
Expand Down Expand Up @@ -143,6 +146,7 @@
</object>
<string key="NSFrame">{{0, 20}, {320, 460}}</string>
<reference key="NSSuperview"/>
<reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="991967511"/>
<reference key="IBUIBackgroundColor" ref="274316834"/>
<object class="IBUISimulatedStatusBarMetrics" key="IBUISimulatedStatusBarMetrics"/>
Expand All @@ -162,11 +166,19 @@
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">category</string>
<string key="label">textField</string>
<reference key="source" ref="372490531"/>
<reference key="destination" ref="248288576"/>
</object>
<int key="connectionID">7</int>
<int key="connectionID">23</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="248288576"/>
<reference key="destination" ref="372490531"/>
</object>
<int key="connectionID">24</int>
</object>
<object class="IBConnectionRecord">
<object class="IBCocoaTouchEventConnection" key="connection">
Expand Down Expand Up @@ -297,9 +309,85 @@
<reference key="dict.values" ref="0"/>
</object>
<nil key="sourceID"/>
<int key="maxID">22</int>
<int key="maxID">24</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">AddCategory</string>
<string key="superclassName">UIViewController</string>
<object class="NSMutableDictionary" key="actions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>cancelAction:</string>
<string>saveAction:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>id</string>
<string>id</string>
</object>
</object>
<object class="NSMutableDictionary" key="actionInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>cancelAction:</string>
<string>saveAction:</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBActionInfo">
<string key="name">cancelAction:</string>
<string key="candidateClassName">id</string>
</object>
<object class="IBActionInfo">
<string key="name">saveAction:</string>
<string key="candidateClassName">id</string>
</object>
</object>
</object>
<object class="NSMutableDictionary" key="outlets">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>category</string>
<string>textField</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>UITextField</string>
<string>UITextField</string>
</object>
</object>
<object class="NSMutableDictionary" key="toOneOutletInfosByName">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSArray" key="dict.sortedKeys">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>category</string>
<string>textField</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBToOneOutletInfo">
<string key="name">category</string>
<string key="candidateClassName">UITextField</string>
</object>
<object class="IBToOneOutletInfo">
<string key="name">textField</string>
<string key="candidateClassName">UITextField</string>
</object>
</object>
</object>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">./Classes/AddCategory.h</string>
</object>
</object>
</object>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes"/>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaTouchFramework</string>
<object class="NSMutableDictionary" key="IBDocument.PluginDeclaredDevelopmentDependencies">
Expand All @@ -310,7 +398,7 @@
<int key="IBDocument.defaultPropertyAccessControl">3</int>
<object class="NSMutableDictionary" key="IBDocument.LastKnownImageSizes">
<string key="NS.key.0">add_category.png</string>
<string key="NS.object.0">{602, 62}</string>
<string key="NS.object.0">{300, 30}</string>
</object>
<string key="IBCocoaTouchPluginVersion">919</string>
</data>
Expand Down
Loading

0 comments on commit 38215b2

Please sign in to comment.