Skip to content

Commit a2655cf

Browse files
committed
Merge branch 'release/2.4.0'
2 parents 9889e60 + 94bef1f commit a2655cf

File tree

6 files changed

+43
-12
lines changed

6 files changed

+43
-12
lines changed

TodoTxtMac.xcodeproj/project.pbxproj

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -513,7 +513,7 @@
513513
isa = PBXProject;
514514
attributes = {
515515
CLASSPREFIX = TTM;
516-
LastUpgradeCheck = 0720;
516+
LastUpgradeCheck = 0820;
517517
ORGANIZATIONNAME = "Michael Descy";
518518
TargetAttributes = {
519519
00B4CB9718B43E8400313DAA = {
@@ -714,15 +714,20 @@
714714
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
715715
CLANG_WARN_EMPTY_BODY = YES;
716716
CLANG_WARN_ENUM_CONVERSION = YES;
717+
CLANG_WARN_INFINITE_RECURSION = YES;
717718
CLANG_WARN_INT_CONVERSION = YES;
718719
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
720+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
721+
CLANG_WARN_UNREACHABLE_CODE = YES;
719722
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
720723
COPY_PHASE_STRIP = NO;
721724
DEBUG_INFORMATION_FORMAT = dwarf;
725+
ENABLE_STRICT_OBJC_MSGSEND = YES;
722726
ENABLE_TESTABILITY = YES;
723727
GCC_C_LANGUAGE_STANDARD = gnu99;
724728
GCC_DYNAMIC_NO_PIC = NO;
725729
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
730+
GCC_NO_COMMON_BLOCKS = YES;
726731
GCC_OPTIMIZATION_LEVEL = 0;
727732
GCC_PREPROCESSOR_DEFINITIONS = (
728733
"DEBUG=1",
@@ -754,14 +759,19 @@
754759
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
755760
CLANG_WARN_EMPTY_BODY = YES;
756761
CLANG_WARN_ENUM_CONVERSION = YES;
762+
CLANG_WARN_INFINITE_RECURSION = YES;
757763
CLANG_WARN_INT_CONVERSION = YES;
758764
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
765+
CLANG_WARN_SUSPICIOUS_MOVE = YES;
766+
CLANG_WARN_UNREACHABLE_CODE = YES;
759767
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
760768
COPY_PHASE_STRIP = YES;
761769
DEBUG_INFORMATION_FORMAT = dwarf;
762770
ENABLE_NS_ASSERTIONS = NO;
771+
ENABLE_STRICT_OBJC_MSGSEND = YES;
763772
GCC_C_LANGUAGE_STANDARD = gnu99;
764773
GCC_ENABLE_OBJC_EXCEPTIONS = YES;
774+
GCC_NO_COMMON_BLOCKS = YES;
765775
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
766776
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
767777
GCC_WARN_UNDECLARED_SELECTOR = YES;

TodoTxtMac/Base.lproj/TTMDocument.xib

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="10117" systemVersion="15G31" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="11762" systemVersion="16C67" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
33
<dependencies>
44
<deployment identifier="macosx"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="10117"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="11762"/>
6+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
67
<capability name="stacking Non-gravity area distributions on NSStackView" minToolsVersion="7.0" minSystemVersion="10.11"/>
78
</dependencies>
89
<objects>
@@ -41,7 +42,7 @@
4142
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
4243
<subviews>
4344
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" alternatingRowBackgroundColors="YES" columnReordering="NO" emptySelection="NO" autosaveColumns="NO" id="FD8-v3-r5U" customClass="TTMTableView">
44-
<rect key="frame" x="0.0" y="0.0" width="510" height="19"/>
45+
<rect key="frame" x="0.0" y="0.0" width="510" height="425"/>
4546
<autoresizingMask key="autoresizingMask"/>
4647
<size key="intercellSpacing" width="3" height="2"/>
4748
<color key="backgroundColor" name="_sourceListBackgroundColor" catalog="System" colorSpace="catalog"/>
@@ -55,8 +56,8 @@
5556
</tableHeaderCell>
5657
<textFieldCell key="dataCell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" alignment="left" title="Text Cell" id="B31-jc-X0I">
5758
<font key="font" metaFont="system"/>
58-
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
59-
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
59+
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>
60+
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
6061
</textFieldCell>
6162
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES"/>
6263
<connections>
@@ -71,7 +72,6 @@
7172
</connections>
7273
</tableView>
7374
</subviews>
74-
<color key="backgroundColor" name="controlBackgroundColor" catalog="System" colorSpace="catalog"/>
7575
</clipView>
7676
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="ciJ-RQ-uYU">
7777
<rect key="frame" x="1" y="411" width="509" height="16"/>

TodoTxtMac/TTMDocument.m

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,8 @@ - (id)windowWillReturnFieldEditor:(NSWindow *)sender toObject:(id)client {
171171
[self.customFieldEditor setFieldEditor:YES];
172172
self.customFieldEditor.projectsArray = self.tasklistMetadata.projectsArray;
173173
self.customFieldEditor.contextsArray = self.tasklistMetadata.contextsArray;
174+
self.customFieldEditor.drawsBackground = YES;
175+
self.customFieldEditor.backgroundColor = [NSColor whiteColor];
174176
return self.customFieldEditor;
175177
}
176178

@@ -295,7 +297,7 @@ - (void)presentedItemDidChange {
295297
NSError *error;
296298
NSDate *fileDate;
297299
[fileURL getResourceValue:&fileDate forKey:NSURLContentModificationDateKey error:&error];
298-
if (![self.lastInternalModificationDate isEqualToDate:fileDate]) {
300+
if (![self.lastInternalModificationDate isEqualToDate:fileDate] && !self.tableView.isEditing) {
299301
[self reloadFile:self];
300302
}
301303
}];
@@ -723,6 +725,7 @@ - (IBAction)appendText:(id)sender {
723725
};
724726

725727
[alert beginSheetModalForWindow:self.windowForSheet completionHandler: completionHandler];
728+
[[alert.accessoryView window] makeFirstResponder:alert.accessoryView];
726729
}
727730

728731
- (IBAction)prependText:(id)sender {
@@ -755,6 +758,7 @@ - (IBAction)prependText:(id)sender {
755758
};
756759

757760
[alert beginSheetModalForWindow:self.windowForSheet completionHandler: completionHandler];
761+
[[alert.accessoryView window] makeFirstResponder:alert.accessoryView];
758762
}
759763

760764
- (IBAction)replaceText:(id)sender {
@@ -787,6 +791,7 @@ - (IBAction)replaceText:(id)sender {
787791
};
788792

789793
[alert beginSheetModalForWindow:self.windowForSheet completionHandler: completionHandler];
794+
[[alert.accessoryView window] makeFirstResponder:alert.accessoryView];
790795
}
791796

792797
#pragma mark - Priority Methods
@@ -830,6 +835,7 @@ - (IBAction)setPriority:(id)sender {
830835
};
831836

832837
[alert beginSheetModalForWindow:self.windowForSheet completionHandler: completionHandler];
838+
[[alert.accessoryView window] makeFirstResponder:alert.accessoryView];
833839
}
834840

835841
- (IBAction)increasePriority:(id)sender {
@@ -913,6 +919,7 @@ - (IBAction)setDueDate:(id)sender {
913919
};
914920

915921
[alert beginSheetModalForWindow:self.windowForSheet completionHandler: completionHandler];
922+
[[alert.accessoryView window] makeFirstResponder:alert.accessoryView];
916923
}
917924

918925
- (IBAction)increaseDueDateByOneDay:(id)sender {
@@ -995,6 +1002,7 @@ - (IBAction)postpone:(id)sender {
9951002
};
9961003

9971004
[alert beginSheetModalForWindow:self.windowForSheet completionHandler: completionHandler];
1005+
[[alert.accessoryView window] makeFirstResponder:alert.accessoryView];
9981006
}
9991007

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

10321040
[alert beginSheetModalForWindow:self.windowForSheet completionHandler: completionHandler];
1041+
[[alert.accessoryView window] makeFirstResponder:alert.accessoryView];
10331042
}
10341043

10351044

TodoTxtMac/TTMTableView.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,12 @@
7575
*/
7676
- (CGFloat)defaultLineHeightForFont:(NSFont*)font;
7777

78+
#pragma mark - isEditing property
79+
80+
/*!
81+
* @method isEditing
82+
* @return Returns true if the table is being edited.
83+
*/
84+
- (bool)isEditing;
85+
7886
@end

TodoTxtMac/TTMTableView.m

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,6 @@ - (void)editColumn:(NSInteger)column row:(NSInteger)row withEvent:(NSEvent *)the
182182
[self.tableColumns.lastObject setMaxWidth:self.parentDocument.windowForSheet.frame.size.width];
183183
[self.tableColumns.lastObject setWidth:self.parentDocument.windowForSheet.frame.size.width];
184184

185-
186185
[super editColumn:column row:row withEvent:theEvent select:select];
187186
}
188187

@@ -244,5 +243,10 @@ - (CGFloat)defaultLineHeightForFont:(NSFont*)font {
244243
return [layoutManager defaultLineHeightForFont:font];
245244
}
246245

246+
#pragma mark - isEditing property
247+
248+
- (bool)isEditing {
249+
return (self.editedRow != -1);
250+
}
247251

248252
@end

TodoTxtMac/TodoTxtMac-Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@
3838
<key>CFBundlePackageType</key>
3939
<string>APPL</string>
4040
<key>CFBundleShortVersionString</key>
41-
<string>2.3.2</string>
41+
<string>2.4.0</string>
4242
<key>CFBundleSignature</key>
4343
<string>????</string>
4444
<key>CFBundleVersion</key>
45-
<string>2029</string>
45+
<string>2032</string>
4646
<key>LSApplicationCategoryType</key>
4747
<string>public.app-category.productivity</string>
4848
<key>LSMinimumSystemVersion</key>

0 commit comments

Comments
 (0)