Skip to content

Commit

Permalink
Merge branch 'release/2.4.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
mjdescy committed Jan 20, 2017
2 parents 9889e60 + 94bef1f commit a2655cf
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 12 deletions.
12 changes: 11 additions & 1 deletion TodoTxtMac.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -513,7 +513,7 @@
isa = PBXProject;
attributes = {
CLASSPREFIX = TTM;
LastUpgradeCheck = 0720;
LastUpgradeCheck = 0820;
ORGANIZATIONNAME = "Michael Descy";
TargetAttributes = {
00B4CB9718B43E8400313DAA = {
Expand Down Expand Up @@ -714,15 +714,20 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
"DEBUG=1",
Expand Down Expand Up @@ -754,14 +759,19 @@
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
GCC_C_LANGUAGE_STANDARD = gnu99;
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
Expand Down
14 changes: 7 additions & 7 deletions TodoTxtMac/Base.lproj/TTMDocument.xib
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="15G31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11762" systemVersion="16C67" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10117"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11762"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
<capability name="stacking Non-gravity area distributions on NSStackView" minToolsVersion="7.0" minSystemVersion="10.11"/>
</dependencies>
<objects>
Expand Down Expand Up @@ -41,7 +42,7 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" alternatingRowBackgroundColors="YES" columnReordering="NO" emptySelection="NO" autosaveColumns="NO" id="FD8-v3-r5U" customClass="TTMTableView">
<rect key="frame" x="0.0" y="0.0" width="510" height="19"/>
<rect key="frame" x="0.0" y="0.0" width="510" height="425"/>
<autoresizingMask key="autoresizingMask"/>
<size key="intercellSpacing" width="3" height="2"/>
<color key="backgroundColor" name="_sourceListBackgroundColor" catalog="System" colorSpace="catalog"/>
Expand All @@ -55,8 +56,8 @@
</tableHeaderCell>
<textFieldCell key="dataCell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" alignment="left" title="Text Cell" id="B31-jc-X0I">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES"/>
<connections>
Expand All @@ -71,7 +72,6 @@
</connections>
</tableView>
</subviews>
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
</clipView>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="ciJ-RQ-uYU">
<rect key="frame" x="1" y="411" width="509" height="16"/>
Expand Down
11 changes: 10 additions & 1 deletion TodoTxtMac/TTMDocument.m
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,8 @@ - (id)windowWillReturnFieldEditor:(NSWindow *)sender toObject:(id)client {
[self.customFieldEditor setFieldEditor:YES];
self.customFieldEditor.projectsArray = self.tasklistMetadata.projectsArray;
self.customFieldEditor.contextsArray = self.tasklistMetadata.contextsArray;
self.customFieldEditor.drawsBackground = YES;
self.customFieldEditor.backgroundColor = [NSColor whiteColor];
return self.customFieldEditor;
}

Expand Down Expand Up @@ -295,7 +297,7 @@ - (void)presentedItemDidChange {
NSError *error;
NSDate *fileDate;
[fileURL getResourceValue:&fileDate forKey:NSURLContentModificationDateKey error:&error];
if (![self.lastInternalModificationDate isEqualToDate:fileDate]) {
if (![self.lastInternalModificationDate isEqualToDate:fileDate] && !self.tableView.isEditing) {
[self reloadFile:self];
}
}];
Expand Down Expand Up @@ -723,6 +725,7 @@ - (IBAction)appendText:(id)sender {
};

[alert beginSheetModalForWindow:self.windowForSheet completionHandler: completionHandler];
[[alert.accessoryView window] makeFirstResponder:alert.accessoryView];
}

- (IBAction)prependText:(id)sender {
Expand Down Expand Up @@ -755,6 +758,7 @@ - (IBAction)prependText:(id)sender {
};

[alert beginSheetModalForWindow:self.windowForSheet completionHandler: completionHandler];
[[alert.accessoryView window] makeFirstResponder:alert.accessoryView];
}

- (IBAction)replaceText:(id)sender {
Expand Down Expand Up @@ -787,6 +791,7 @@ - (IBAction)replaceText:(id)sender {
};

[alert beginSheetModalForWindow:self.windowForSheet completionHandler: completionHandler];
[[alert.accessoryView window] makeFirstResponder:alert.accessoryView];
}

#pragma mark - Priority Methods
Expand Down Expand Up @@ -830,6 +835,7 @@ - (IBAction)setPriority:(id)sender {
};

[alert beginSheetModalForWindow:self.windowForSheet completionHandler: completionHandler];
[[alert.accessoryView window] makeFirstResponder:alert.accessoryView];
}

- (IBAction)increasePriority:(id)sender {
Expand Down Expand Up @@ -913,6 +919,7 @@ - (IBAction)setDueDate:(id)sender {
};

[alert beginSheetModalForWindow:self.windowForSheet completionHandler: completionHandler];
[[alert.accessoryView window] makeFirstResponder:alert.accessoryView];
}

- (IBAction)increaseDueDateByOneDay:(id)sender {
Expand Down Expand Up @@ -995,6 +1002,7 @@ - (IBAction)postpone:(id)sender {
};

[alert beginSheetModalForWindow:self.windowForSheet completionHandler: completionHandler];
[[alert.accessoryView window] makeFirstResponder:alert.accessoryView];
}

#pragma mark - Threshold Date Methods
Expand Down Expand Up @@ -1030,6 +1038,7 @@ - (IBAction)setThresholdDate:(id)sender {
};

[alert beginSheetModalForWindow:self.windowForSheet completionHandler: completionHandler];
[[alert.accessoryView window] makeFirstResponder:alert.accessoryView];
}


Expand Down
8 changes: 8 additions & 0 deletions TodoTxtMac/TTMTableView.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,4 +75,12 @@
*/
- (CGFloat)defaultLineHeightForFont:(NSFont*)font;

#pragma mark - isEditing property

/*!
* @method isEditing
* @return Returns true if the table is being edited.
*/
- (bool)isEditing;

@end
6 changes: 5 additions & 1 deletion TodoTxtMac/TTMTableView.m
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ - (void)editColumn:(NSInteger)column row:(NSInteger)row withEvent:(NSEvent *)the
[self.tableColumns.lastObject setMaxWidth:self.parentDocument.windowForSheet.frame.size.width];
[self.tableColumns.lastObject setWidth:self.parentDocument.windowForSheet.frame.size.width];


[super editColumn:column row:row withEvent:theEvent select:select];
}

Expand Down Expand Up @@ -244,5 +243,10 @@ - (CGFloat)defaultLineHeightForFont:(NSFont*)font {
return [layoutManager defaultLineHeightForFont:font];
}

#pragma mark - isEditing property

- (bool)isEditing {
return (self.editedRow != -1);
}

@end
4 changes: 2 additions & 2 deletions TodoTxtMac/TodoTxtMac-Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>2.3.2</string>
<string>2.4.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>2029</string>
<string>2032</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.productivity</string>
<key>LSMinimumSystemVersion</key>
Expand Down

0 comments on commit a2655cf

Please sign in to comment.