Merge pull request #42 from denizt/dev

Add merge all, and fix the empty item bug
This commit is contained in:
Gennadiy Potapov 2013-11-05 22:00:25 -08:00
commit 457b4541e0
7 changed files with 662 additions and 3496 deletions

View file

@ -69,6 +69,7 @@
-(void) stackUp;
-(void) stackDown;
-(IBAction)clearClippingList:(id)sender;
-(IBAction)mergeClippingList:(id)sender;
// Stack related
-(BOOL) isValidClippingNumber:(NSNumber *)number;

View file

@ -519,6 +519,11 @@
}
}
-(IBAction)mergeClippingList:(id)sender {
[clippingStore mergeList];
[self updateMenu];
}
- (void)updateMenu {
NSArray *returnedDisplayStrings = [clippingStore previousDisplayStrings:[[DBUserDefaults standardUserDefaults] integerForKey:@"displayNum"]];

File diff suppressed because it is too large Load diff

Binary file not shown.

View file

@ -439,7 +439,7 @@
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0410;
LastUpgradeCheck = 0500;
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Flycut" */;
compatibilityVersion = "Xcode 3.2";
@ -531,6 +531,7 @@
C01FCF4B08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(FRAMEWORK_SEARCH_PATHS)",
@ -551,7 +552,7 @@
C01FCF4C08A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
COMBINE_HIDPI_IMAGES = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(FRAMEWORK_SEARCH_PATHS)",
"$(SRCROOT)",
@ -570,11 +571,11 @@
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CODE_SIGN_IDENTITY = "";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
PRODUCT_NAME = Flycut;
SDKROOT = macosx;
};
@ -583,7 +584,6 @@
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_64_BIT)";
CODE_SIGN_IDENTITY = "";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;

View file

@ -78,6 +78,9 @@
// Delete all list clippings
-(void) clearList;
// Merge all list clippings
-(void) mergeList;
// Move the clipping at index to the top
-(void) clippingMoveToTop:(int)index;

View file

@ -51,6 +51,9 @@
// Add a clipping
-(void) addClipping:(NSString *)clipping ofType:(NSString *)type{
if ([clipping length] == 0) {
return;
}
// Clipping object
JumpcutClipping * newClipping;
// Create clipping
@ -84,6 +87,11 @@
jcList = emptyJCList;
}
-(void) mergeList {
NSString *merge = [[[[jcList reverseObjectEnumerator] allObjects] valueForKey:@"clipContents"] componentsJoinedByString:@"\n"];
[self addClipping:merge ofType:NSStringFromClass([merge class])];
}
-(void) clearItem:(int)index
{
[jcList removeObjectAtIndex:index];