mirror of
https://github.com/TermiT/Flycut.git
synced 2024-11-10 09:32:29 +08:00
Merge pull request #42 from denizt/dev
Add merge all, and fix the empty item bug
This commit is contained in:
commit
457b4541e0
7 changed files with 662 additions and 3496 deletions
|
@ -69,6 +69,7 @@
|
|||
-(void) stackUp;
|
||||
-(void) stackDown;
|
||||
-(IBAction)clearClippingList:(id)sender;
|
||||
-(IBAction)mergeClippingList:(id)sender;
|
||||
|
||||
// Stack related
|
||||
-(BOOL) isValidClippingNumber:(NSNumber *)number;
|
||||
|
|
|
@ -519,6 +519,11 @@
|
|||
}
|
||||
}
|
||||
|
||||
-(IBAction)mergeClippingList:(id)sender {
|
||||
[clippingStore mergeList];
|
||||
[self updateMenu];
|
||||
}
|
||||
|
||||
- (void)updateMenu {
|
||||
|
||||
NSArray *returnedDisplayStrings = [clippingStore previousDisplayStrings:[[DBUserDefaults standardUserDefaults] integerForKey:@"displayNum"]];
|
||||
|
|
4133
English.lproj/MainMenu.nib/designable.nib
generated
4133
English.lproj/MainMenu.nib/designable.nib
generated
File diff suppressed because it is too large
Load diff
BIN
English.lproj/MainMenu.nib/keyedobjects.nib
generated
BIN
English.lproj/MainMenu.nib/keyedobjects.nib
generated
Binary file not shown.
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Reference in a new issue