Skip to content

Commit

Permalink
Calendar support
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Filetti committed Feb 10, 2016
1 parent a041d1f commit 5494dec
Show file tree
Hide file tree
Showing 16 changed files with 557 additions and 271 deletions.
40 changes: 34 additions & 6 deletions JustUsed.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
A92411EF1C69FB3F00DD6449 /* CalendarEvent.swift in Sources */ = {isa = PBXBuildFile; fileRef = A92411EE1C69FB3F00DD6449 /* CalendarEvent.swift */; };
A92411F11C69FD8F00DD6449 /* Person.swift in Sources */ = {isa = PBXBuildFile; fileRef = A92411F01C69FD8F00DD6449 /* Person.swift */; };
A92411F31C69FDCB00DD6449 /* SwiftyJSON.swift in Sources */ = {isa = PBXBuildFile; fileRef = A92411F21C69FDCB00DD6449 /* SwiftyJSON.swift */; };
A92574551BCF8F98004866B4 /* Utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = A92574541BCF8F98004866B4 /* Utils.swift */; };
A92574591BCF8FF9004866B4 /* XCGLogger.swift in Sources */ = {isa = PBXBuildFile; fileRef = A92574581BCF8FF9004866B4 /* XCGLogger.swift */; };
A925745B1BCF901D004866B4 /* JustUsedConstants.swift in Sources */ = {isa = PBXBuildFile; fileRef = A925745A1BCF901D004866B4 /* JustUsedConstants.swift */; };
A92574621BCF906A004866B4 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A925745D1BCF906A004866B4 /* AppDelegate.swift */; };
Expand All @@ -31,6 +30,12 @@
A9438DDC1B7A3F0400F1A54B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = A9438DDA1B7A3F0400F1A54B /* Main.storyboard */; };
A9438DE81B7A3F0400F1A54B /* JustUsedTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9438DE71B7A3F0400F1A54B /* JustUsedTests.swift */; };
A9647CDB1C03853D00485837 /* ChromeHistoryFetcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9647CDA1C03853D00485837 /* ChromeHistoryFetcher.swift */; };
A9BD83B81C6B505C00D62A61 /* PDFDocument+getText.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9BD83B71C6B505C00D62A61 /* PDFDocument+getText.swift */; };
A9BD83BA1C6B508600D62A61 /* NSURL+getMime.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9BD83B91C6B508600D62A61 /* NSURL+getMime.swift */; };
A9BD83BC1C6B50BA00D62A61 /* NSDate+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9BD83BB1C6B50BA00D62A61 /* NSDate+Extensions.swift */; };
A9BD83BE1C6B50F900D62A61 /* String+Extensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9BD83BD1C6B50F900D62A61 /* String+Extensions.swift */; };
A9BD83C01C6B512600D62A61 /* CLGeoCoder+getDescription.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9BD83BF1C6B512600D62A61 /* CLGeoCoder+getDescription.swift */; };
A9BD83C21C6B516100D62A61 /* EKCalendar+getCompositeName.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9BD83C11C6B516100D62A61 /* EKCalendar+getCompositeName.swift */; };
A9D4A2D51B7B9B3400EC1D68 /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = A9D4A2D41B7B9B3400EC1D68 /* libsqlite3.dylib */; };
A9D894201BD00EED00314475 /* Alamofire.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = A9F5077D1BC7B8DE00275C6C /* Alamofire.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
A9F3807B1C199E38009251AB /* GenericBrowserHistory.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9F3807A1C199E38009251AB /* GenericBrowserHistory.swift */; };
Expand Down Expand Up @@ -131,7 +136,6 @@
A92411EE1C69FB3F00DD6449 /* CalendarEvent.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = CalendarEvent.swift; sourceTree = "<group>"; };
A92411F01C69FD8F00DD6449 /* Person.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Person.swift; sourceTree = "<group>"; };
A92411F21C69FDCB00DD6449 /* SwiftyJSON.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SwiftyJSON.swift; sourceTree = "<group>"; };
A92574541BCF8F98004866B4 /* Utils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Utils.swift; sourceTree = "<group>"; };
A92574581BCF8FF9004866B4 /* XCGLogger.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = XCGLogger.swift; sourceTree = "<group>"; };
A925745A1BCF901D004866B4 /* JustUsedConstants.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = JustUsedConstants.swift; sourceTree = "<group>"; };
A925745C1BCF9047004866B4 /* JustUsed-Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "JustUsed-Bridging-Header.h"; sourceTree = "<group>"; };
Expand Down Expand Up @@ -160,6 +164,12 @@
A9438DE61B7A3F0400F1A54B /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
A9438DE71B7A3F0400F1A54B /* JustUsedTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = JustUsedTests.swift; sourceTree = "<group>"; };
A9647CDA1C03853D00485837 /* ChromeHistoryFetcher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ChromeHistoryFetcher.swift; sourceTree = "<group>"; };
A9BD83B71C6B505C00D62A61 /* PDFDocument+getText.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "PDFDocument+getText.swift"; sourceTree = "<group>"; };
A9BD83B91C6B508600D62A61 /* NSURL+getMime.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSURL+getMime.swift"; sourceTree = "<group>"; };
A9BD83BB1C6B50BA00D62A61 /* NSDate+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "NSDate+Extensions.swift"; sourceTree = "<group>"; };
A9BD83BD1C6B50F900D62A61 /* String+Extensions.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "String+Extensions.swift"; sourceTree = "<group>"; };
A9BD83BF1C6B512600D62A61 /* CLGeoCoder+getDescription.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "CLGeoCoder+getDescription.swift"; sourceTree = "<group>"; };
A9BD83C11C6B516100D62A61 /* EKCalendar+getCompositeName.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "EKCalendar+getCompositeName.swift"; sourceTree = "<group>"; };
A9D4A2D41B7B9B3400EC1D68 /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; };
A9F3807A1C199E38009251AB /* GenericBrowserHistory.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GenericBrowserHistory.swift; sourceTree = "<group>"; };
A9F507721BC7B8DE00275C6C /* Alamofire.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Alamofire.xcodeproj; path = Alamofire/Alamofire.xcodeproj; sourceTree = "<group>"; };
Expand Down Expand Up @@ -227,7 +237,6 @@
isa = PBXGroup;
children = (
A925745C1BCF9047004866B4 /* JustUsed-Bridging-Header.h */,
A92574541BCF8F98004866B4 /* Utils.swift */,
A925745A1BCF901D004866B4 /* JustUsedConstants.swift */,
);
name = Utils;
Expand Down Expand Up @@ -274,6 +283,7 @@
A9438DD11B7A3F0400F1A54B /* JustUsed */ = {
isa = PBXGroup;
children = (
A9BD83B01C6B500000D62A61 /* Extensions */,
A92574531BCF8F69004866B4 /* Utils */,
A92574521BCF8EC3004866B4 /* Libraries */,
A925744C1BCF8EAA004866B4 /* Model */,
Expand Down Expand Up @@ -310,6 +320,19 @@
name = "Supporting Files";
sourceTree = "<group>";
};
A9BD83B01C6B500000D62A61 /* Extensions */ = {
isa = PBXGroup;
children = (
A9BD83B71C6B505C00D62A61 /* PDFDocument+getText.swift */,
A9BD83B91C6B508600D62A61 /* NSURL+getMime.swift */,
A9BD83BB1C6B50BA00D62A61 /* NSDate+Extensions.swift */,
A9BD83BD1C6B50F900D62A61 /* String+Extensions.swift */,
A9BD83BF1C6B512600D62A61 /* CLGeoCoder+getDescription.swift */,
A9BD83C11C6B516100D62A61 /* EKCalendar+getCompositeName.swift */,
);
path = Extensions;
sourceTree = "<group>";
};
A9F5076C1BC7B6F000275C6C /* DiMe Data */ = {
isa = PBXGroup;
children = (
Expand Down Expand Up @@ -514,9 +537,11 @@
buildActionMask = 2147483647;
files = (
A92574621BCF906A004866B4 /* AppDelegate.swift in Sources */,
A9BD83BE1C6B50F900D62A61 /* String+Extensions.swift in Sources */,
A92574631BCF906A004866B4 /* AppSingleton.swift in Sources */,
A9F507921BC7BF5900275C6C /* DocumentInformationElement.swift in Sources */,
A92411F31C69FDCB00DD6449 /* SwiftyJSON.swift in Sources */,
A9BD83BC1C6B50BA00D62A61 /* NSDate+Extensions.swift in Sources */,
A92574761BCF9190004866B4 /* FMDatabaseAdditions.m in Sources */,
A9F507881BC7BA4B00275C6C /* DiMePreferencesViewController.swift in Sources */,
A9F507901BC7BF5900275C6C /* DesktopEvent.swift in Sources */,
Expand All @@ -532,12 +557,15 @@
A92574591BCF8FF9004866B4 /* XCGLogger.swift in Sources */,
A91406731C036D5500C3C2E0 /* FirefoxHistoryFetcher.swift in Sources */,
A92574641BCF906A004866B4 /* LocationSingleton.swift in Sources */,
A9BD83BA1C6B508600D62A61 /* NSURL+getMime.swift in Sources */,
A9F782071BCFCCE900516E55 /* Location.swift in Sources */,
A9F507931BC7BF5900275C6C /* Event.swift in Sources */,
A9BD83C01C6B512600D62A61 /* CLGeoCoder+getDescription.swift in Sources */,
A92574791BCF9190004866B4 /* FMResultSet.m in Sources */,
A92574771BCF9190004866B4 /* FMDatabasePool.m in Sources */,
A92574551BCF8F98004866B4 /* Utils.swift in Sources */,
A9BD83B81C6B505C00D62A61 /* PDFDocument+getText.swift in Sources */,
A92C0AD31BE40EF000F93915 /* RecentDocumentsTracker.swift in Sources */,
A9BD83C21C6B516100D62A61 /* EKCalendar+getCompositeName.swift in Sources */,
A9F507911BC7BF5900275C6C /* DiMeData.swift in Sources */,
A925745B1BCF901D004866B4 /* JustUsedConstants.swift in Sources */,
A9647CDB1C03853D00485837 /* ChromeHistoryFetcher.swift in Sources */,
Expand Down Expand Up @@ -674,7 +702,7 @@
INFOPLIST_FILE = JustUsed/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
PRODUCT_BUNDLE_IDENTIFIER = fi.hiit.JustUsed;
PRODUCT_BUNDLE_IDENTIFIER = fi.aalto.org.JustUsed;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SWIFT_OBJC_BRIDGING_HEADER = "JustUsed/Utils/JustUsed-Bridging-Header.h";
Expand All @@ -692,7 +720,7 @@
INFOPLIST_FILE = JustUsed/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MACOSX_DEPLOYMENT_TARGET = 10.10;
PRODUCT_BUNDLE_IDENTIFIER = fi.hiit.JustUsed;
PRODUCT_BUNDLE_IDENTIFIER = fi.aalto.org.JustUsed;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE = "";
SWIFT_OBJC_BRIDGING_HEADER = "JustUsed/Utils/JustUsed-Bridging-Header.h";
Expand Down
28 changes: 23 additions & 5 deletions JustUsed/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@
<constraints>
<constraint firstAttribute="width" constant="477" id="9XZ-K4-zob"/>
</constraints>
<scroller key="horizontalScroller" verticalHuggingPriority="750" doubleValue="0.00089126559714795004" horizontal="YES" id="w6A-F4-dVc">
<scroller key="horizontalScroller" verticalHuggingPriority="750" horizontal="YES" id="w6A-F4-dVc">
<rect key="frame" x="1" y="323" width="475" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
Expand Down Expand Up @@ -1135,7 +1135,7 @@
<scrollView autohidesScrollers="YES" horizontalLineScroll="19" horizontalPageScroll="10" verticalLineScroll="19" verticalPageScroll="10" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="muE-TE-h1g">
<rect key="frame" x="146" y="10" width="278" height="135"/>
<clipView key="contentView" id="hua-x6-cD7">
<rect key="frame" x="1" y="23" width="276" height="111"/>
<rect key="frame" x="1" y="0.0" width="276" height="134"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews>
<tableView verticalHuggingPriority="750" allowsExpansionToolTips="YES" columnAutoresizingStyle="lastColumnOnly" columnReordering="NO" columnSelection="YES" multipleSelection="NO" autosaveColumns="NO" headerView="5Cy-x5-Ex6" id="bLV-eX-WdG">
Expand All @@ -1157,7 +1157,7 @@
</buttonCell>
<tableColumnResizingMask key="resizingMask" resizeWithTable="YES" userResizable="YES"/>
</tableColumn>
<tableColumn identifier="calExclTableName" width="204" minWidth="40" maxWidth="1000" id="FSd-ek-T3g">
<tableColumn identifier="calExclTableName" editable="NO" width="204" minWidth="40" maxWidth="1000" id="FSd-ek-T3g">
<tableHeaderCell key="headerCell" lineBreakMode="truncatingTail" borderStyle="border" title="Calendar name">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="headerTextColor" catalog="System" colorSpace="catalog"/>
Expand All @@ -1177,13 +1177,12 @@
</clipView>
<constraints>
<constraint firstAttribute="height" constant="135" id="8gT-q8-lnO"/>
<constraint firstAttribute="width" constant="278" id="wJu-ZY-z2z"/>
</constraints>
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="YES" id="iEQ-wV-jPw">
<rect key="frame" x="1" y="118" width="276" height="16"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="MX6-gA-1le">
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" horizontal="NO" id="MX6-gA-1le">
<rect key="frame" x="261" y="23" width="16" height="0.0"/>
<autoresizingMask key="autoresizingMask"/>
</scroller>
Expand All @@ -1201,14 +1200,32 @@
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="calendarDataMine:" target="g6d-pz-jYa" id="Zvt-9a-0mp"/>
</connections>
</button>
<textField verticalHuggingPriority="750" horizontalCompressionResistancePriority="250" setsMaxLayoutWidthAtFirstLayout="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ZF8-1g-OYZ">
<rect key="frame" x="18" y="37" width="122" height="81"/>
<constraints>
<constraint firstAttribute="height" constant="81" id="UYD-bD-00f"/>
<constraint firstAttribute="width" constant="118" id="awh-oU-S9g"/>
</constraints>
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="center" title="Selected calendars will not be used neither in background nor data mine" id="nsy-W0-8EI">
<font key="font" metaFont="smallSystem"/>
<color key="textColor" name="secondaryLabelColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
</textFieldCell>
</textField>
</subviews>
<constraints>
<constraint firstItem="bLV-eX-WdG" firstAttribute="leading" secondItem="L6W-mq-zUe" secondAttribute="trailing" constant="9" id="EjU-68-UX3"/>
<constraint firstItem="ZF8-1g-OYZ" firstAttribute="centerX" secondItem="hbc-Bu-PjL" secondAttribute="centerX" id="JqE-4e-9yt"/>
<constraint firstItem="hbc-Bu-PjL" firstAttribute="top" secondItem="muE-TE-h1g" secondAttribute="top" id="KUp-m7-2Vo"/>
<constraint firstItem="hbc-Bu-PjL" firstAttribute="top" secondItem="DZ0-WD-80y" secondAttribute="top" constant="8" id="Nl9-oR-D22"/>
<constraint firstItem="muE-TE-h1g" firstAttribute="leading" secondItem="hbc-Bu-PjL" secondAttribute="trailing" constant="8" id="TPx-3c-IQB"/>
<constraint firstItem="hbc-Bu-PjL" firstAttribute="leading" secondItem="DZ0-WD-80y" secondAttribute="leading" constant="20" id="boB-ox-bgb"/>
<constraint firstAttribute="trailing" secondItem="muE-TE-h1g" secondAttribute="trailing" constant="20" id="ft1-LP-AX4"/>
<constraint firstItem="ZF8-1g-OYZ" firstAttribute="centerY" secondItem="muE-TE-h1g" secondAttribute="centerY" id="lNf-TE-qJu"/>
<constraint firstItem="muE-TE-h1g" firstAttribute="top" secondItem="DZ0-WD-80y" secondAttribute="top" constant="8" id="rsm-bV-Hhh"/>
<constraint firstAttribute="bottom" secondItem="L6W-mq-zUe" secondAttribute="bottom" constant="10" id="txX-1h-d1V"/>
</constraints>
Expand Down Expand Up @@ -1439,6 +1456,7 @@
<constraint firstAttribute="trailing" secondItem="icH-Jz-0QZ" secondAttribute="trailing" constant="20" id="uj8-Xc-tcw"/>
<constraint firstItem="icH-Jz-0QZ" firstAttribute="top" secondItem="PRl-yO-RbZ" secondAttribute="top" constant="20" id="yF2-zA-Gbc"/>
<constraint firstItem="JI2-4r-x6L" firstAttribute="top" secondItem="KpP-w5-qmb" secondAttribute="bottom" constant="27" id="yUf-Dm-TjD"/>
<constraint firstAttribute="trailing" secondItem="ihZ-QQ-J41" secondAttribute="trailing" constant="20" id="zFV-yz-7fq"/>
</constraints>
</view>
<connections>
Expand Down
2 changes: 1 addition & 1 deletion JustUsed/DiMe Data/CalendarEvent.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class CalendarEvent: Event {

self.id = event.eventIdentifier
self.name = event.title
self.calendar = event.calendar.title
self.calendar = event.calendar.compositeName
self.notes = event.notes
if #available(OSX 10.11, *) {
if let structLoc = event.structuredLocation, clloc = structLoc.geoLocation {
Expand Down
Loading

0 comments on commit 5494dec

Please sign in to comment.