Skip to content

Commit

Permalink
Version 4.1.4
Browse files Browse the repository at this point in the history
  • Loading branch information
daizhirui committed Jul 12, 2019
1 parent 396fe73 commit f75ed80
Show file tree
Hide file tree
Showing 7 changed files with 50 additions and 58 deletions.
29 changes: 25 additions & 4 deletions macOS/CSXWelcome/CSXWelcome/WelcomeWindowController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ public class WelcomeWindowController: NSWindowController {
@IBOutlet public weak var openExampleButton: NSButton!
@IBOutlet weak var leftView: NSView!
@IBOutlet weak var recentProjectTable: NSTableView!
var selectedProjectNameTextField: NSTextField!
var selectedProjectURLTextField: NSTextField!
var selectedProjectNameTextField: NSTextField?
var selectedProjectURLTextField: NSTextField?
@IBOutlet weak var versionLabel: NSTextField!
var recentProjectURLs: [URL] = {
var urls = [URL]()
Expand Down Expand Up @@ -69,6 +69,11 @@ public class WelcomeWindowController: NSWindowController {
self.window?.contentView?.addTrackingArea(area)
}

public override func showWindow(_ sender: Any?) {
super.showWindow(sender)
self.updateRecentProjectTable()
}

/// show close button when the mouse enters left view
override public func mouseEntered(with event: NSEvent) {
super.mouseEntered(with: event)
Expand All @@ -81,6 +86,17 @@ public class WelcomeWindowController: NSWindowController {
self.closeButton.isHidden = true
}

public func updateRecentProjectTable() {
var urls = [URL]()
for url in NSDocumentController.shared.recentDocumentURLs {
if FileManager.default.fileExists(atPath: url.relativePath) {
urls.append(url)
}
}
self.recentProjectURLs = urls
self.recentProjectTable.reloadData()
}

// MARK: action
@IBAction func closeWelcomeWindow(_ sender: Any) {
self.window?.close()
Expand Down Expand Up @@ -176,13 +192,18 @@ extension WelcomeWindowController: NSTableViewDelegate {
public func tableViewSelectionDidChange(_ notification: Notification) {
// old selection
if #available(macOS 10.13, *) {
print(1)
self.selectedProjectNameTextField?.textColor = NSColor(named: NSColor.Name("UnselectionColor"),
bundle: Bundle(for: WelcomeWindowController.self))
print(2)
self.selectedProjectURLTextField?.textColor = NSColor(named: NSColor.Name("UnselectionColor"),
bundle: Bundle(for: WelcomeWindowController.self))
} else {
self.selectedProjectNameTextField.textColor = NSColor.systemGray
self.selectedProjectURLTextField.textColor = NSColor.systemGray
print(3)
self.selectedProjectNameTextField?.textColor = NSColor.systemGray

print(4)
self.selectedProjectURLTextField?.textColor = NSColor.systemGray
}
// new selection
if let stackView = self.getSelectedCellView()?.subviews[0] as? NSStackView {
Expand Down
Binary file not shown.
22 changes: 2 additions & 20 deletions macOS/CamelStudioX/CamelStudioX.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,6 @@
2353EA2A21652454004A9545 /* Frameworks */,
2353EA2B21652454004A9545 /* Resources */,
23DF1AE42167292F00D69F1F /* Embed Frameworks */,
230BED182167AC1900B129C0 /* ShellScript */,
2388D3FF2178330C004FC995 /* ShellScript */,
);
buildRules = (
Expand Down Expand Up @@ -363,23 +362,6 @@
/* End PBXResourcesBuildPhase section */

/* Begin PBXShellScriptBuildPhase section */
230BED182167AC1900B129C0 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
);
inputPaths = (
);
outputFileListPaths = (
);
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "FILE=\"${SRCROOT}/HockeySDK-Mac/BuildAgent\"\nif [ -f \"$FILE\" ]; then\n\"$FILE\"\nfi\n";
};
2388D3FF2178330C004FC995 /* ShellScript */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
Expand Down Expand Up @@ -585,7 +567,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = daizhirui.CamelStudioX;
PRODUCT_BUNDLE_IDENTIFIER = com.daizhirui.CamelStudioX;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "$(PROJECT_DIR)/CamelStudioX/Bridging.h";
Expand All @@ -609,7 +591,7 @@
"$(inherited)",
"@executable_path/../Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = daizhirui.CamelStudioX;
PRODUCT_BUNDLE_IDENTIFIER = com.daizhirui.CamelStudioX;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
SWIFT_OBJC_BRIDGING_HEADER = "$(PROJECT_DIR)/CamelStudioX/Bridging.h";
Expand Down
26 changes: 13 additions & 13 deletions macOS/CamelStudioX/CamelStudioX/Base.lproj/Main.storyboard
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@
<toolbar key="toolbar" implicitIdentifier="1A091CBE-0A8E-47BC-9DC2-ED708F1D67B2" autosavesConfiguration="NO" displayMode="iconAndLabel" sizeMode="regular" id="EI7-4H-Yy2">
<allowedToolbarItems>
<toolbarItem implicitItemIdentifier="9565D0E8-04DC-4EB6-B48E-12910B007D18" label="Project Files" paletteLabel="Project Files" toolTip="Project Files: show project files" image="csx_filetree" sizingBehavior="auto" id="6Vr-Ci-8S4" userLabel="ProjectFilesButton">
<button key="view" verticalHuggingPriority="750" misplaced="YES" id="1fH-3n-mTw">
<button key="view" verticalHuggingPriority="750" id="1fH-3n-mTw">
<rect key="frame" x="0.0" y="14" width="82" height="24"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="csx_filetree" imagePosition="only" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="0JL-he-vqg">
Expand All @@ -343,7 +343,7 @@
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="A81DDE07-50CD-432D-B265-263A780808BD" label="Serial Monitor" paletteLabel="Serial Monitor" toolTip="Serial Monitor: show project serial monitor, choose memu &quot;Tools&gt;Serial Monitor&quot; to open extra serial monitors" tag="1" image="csx_usb" sizingBehavior="auto" id="hD8-vP-UvP" userLabel="SerialMonitorButton">
<button key="view" verticalHuggingPriority="750" misplaced="YES" tag="1" id="pj9-ki-NUB">
<button key="view" verticalHuggingPriority="750" tag="1" id="pj9-ki-NUB">
<rect key="frame" x="0.0" y="14" width="82" height="24"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="csx_usb" imagePosition="only" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="fWP-Wd-R5T">
Expand All @@ -356,7 +356,7 @@
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="8A9DF191-531B-471B-A3EF-085898E13F79" label="Left Panel" paletteLabel="Left Panel" toolTip="Left Panel: switch left panel" tag="2" image="csx_sidepanel" sizingBehavior="auto" id="8bn-tp-wSj" userLabel="LeftPanelButton">
<button key="view" verticalHuggingPriority="750" misplaced="YES" tag="2" id="cVN-b3-m3t">
<button key="view" verticalHuggingPriority="750" tag="2" id="cVN-b3-m3t">
<rect key="frame" x="0.0" y="14" width="82" height="24"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="csx_sidepanel" imagePosition="only" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="pQJ-OM-G9e">
Expand All @@ -369,7 +369,7 @@
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="C944B4AA-BE95-4ABD-8027-1F7AAF1F6449" label="New Project" paletteLabel="New Project" toolTip="New Project: create a new project" tag="3" image="csx_newproj" sizingBehavior="auto" id="mnc-Sg-Gzn" userLabel="NewProjectButton">
<button key="view" verticalHuggingPriority="750" misplaced="YES" tag="3" id="gmr-lZ-uep">
<button key="view" verticalHuggingPriority="750" tag="3" id="gmr-lZ-uep">
<rect key="frame" x="0.0" y="14" width="82" height="24"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="csx_newproj" imagePosition="only" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="4zn-ii-jg0">
Expand All @@ -382,7 +382,7 @@
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="44868C3E-4E28-490D-9ABF-49881B5AE7C4" label="Open Project" paletteLabel="Open Project" toolTip="Open Project: open an existing project" tag="4" image="csx_openproj" sizingBehavior="auto" id="Ev8-tc-IBU" userLabel="OpenProjectButton">
<button key="view" verticalHuggingPriority="750" misplaced="YES" tag="4" id="JsN-Pt-NfP">
<button key="view" verticalHuggingPriority="750" tag="4" id="JsN-Pt-NfP">
<rect key="frame" x="0.0" y="14" width="82" height="24"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="csx_openproj" imagePosition="only" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="vmH-e3-jM5">
Expand All @@ -395,7 +395,7 @@
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="75C3C625-E232-455D-81E4-67B59F7249C1" label="Examples" paletteLabel="Examples" toolTip="Examples: open an example provided by Camel Micro Inc." tag="5" image="csx_list" sizingBehavior="auto" id="lEw-JR-yl0" userLabel="ExamplesButton">
<button key="view" verticalHuggingPriority="750" misplaced="YES" tag="5" id="0p0-Z3-xli">
<button key="view" verticalHuggingPriority="750" tag="5" id="0p0-Z3-xli">
<rect key="frame" x="0.0" y="14" width="82" height="24"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="csx_list" imagePosition="only" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="5cE-fC-QWC">
Expand All @@ -408,7 +408,7 @@
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="BB50D49C-C647-4905-A800-63558693F417" label="Project Settings" paletteLabel="Project Settings" toolTip="Project Settings: manage project targets" tag="6" image="csx_setting" sizingBehavior="auto" id="eQw-Kx-53h" userLabel="ProjectSettingsButton">
<button key="view" verticalHuggingPriority="750" misplaced="YES" tag="6" id="EYT-fA-vYR">
<button key="view" verticalHuggingPriority="750" tag="6" id="EYT-fA-vYR">
<rect key="frame" x="5" y="14" width="82" height="24"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="csx_setting" imagePosition="only" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="Htd-hc-p2U">
Expand All @@ -421,7 +421,7 @@
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="D1C36E20-4A32-43D1-83C1-30C6ABAD17FC" label="Save" paletteLabel="Save" toolTip="Save: save all project files" tag="7" image="csx_save" sizingBehavior="auto" id="KBY-fn-LYJ" userLabel="SaveButton">
<button key="view" verticalHuggingPriority="750" misplaced="YES" tag="7" id="7nP-V4-buW">
<button key="view" verticalHuggingPriority="750" tag="7" id="7nP-V4-buW">
<rect key="frame" x="0.0" y="14" width="82" height="24"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="csx_save" imagePosition="only" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="iz1-0X-yuX">
Expand All @@ -434,7 +434,7 @@
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="BD16C512-66C5-43DA-9AB7-8BBBDC8AD6E6" label="Build" paletteLabel="Build" toolTip="Build: build the current target" tag="8" image="csx_build" sizingBehavior="auto" id="0AI-2R-6U4" userLabel="BuildButton">
<button key="view" verticalHuggingPriority="750" misplaced="YES" tag="8" id="K6Y-FL-0BB">
<button key="view" verticalHuggingPriority="750" tag="8" id="K6Y-FL-0BB">
<rect key="frame" x="0.0" y="14" width="82" height="24"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="csx_build" imagePosition="only" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="F2m-3r-5vi">
Expand All @@ -447,7 +447,7 @@
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="A084B6DD-6381-47DC-B583-3C4C9A86D78B" label="Download to Chip" paletteLabel="Download to Chip" toolTip="Download to Chip: download the binary to your chip" tag="9" image="csx_download" sizingBehavior="auto" id="GWg-yH-O73" userLabel="DownloadToChipButton">
<button key="view" verticalHuggingPriority="750" misplaced="YES" tag="9" id="TTr-Lk-EaZ">
<button key="view" verticalHuggingPriority="750" tag="9" id="TTr-Lk-EaZ">
<rect key="frame" x="9" y="14" width="82" height="24"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="csx_download" imagePosition="only" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="K0J-cg-KwG">
Expand All @@ -460,7 +460,7 @@
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="2B533BF6-61F0-4A81-B2F1-314A13763C69" label="Documentations" paletteLabel="Documentations" toolTip="Documentations: open documentation browser" tag="10" image="csx_library" sizingBehavior="auto" id="2bT-ZU-1fr" userLabel="DocumentationsButton">
<button key="view" verticalHuggingPriority="750" misplaced="YES" tag="10" id="f3K-xR-6Rb">
<button key="view" verticalHuggingPriority="750" tag="10" id="f3K-xR-6Rb">
<rect key="frame" x="6" y="14" width="82" height="24"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="csx_library" imagePosition="only" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="YAn-PL-vdI">
Expand All @@ -473,7 +473,7 @@
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="7E6C6F73-3333-41EF-8671-18C28E11C096" label="Help" paletteLabel="Help" toolTip="Help: open help " tag="11" image="csx_info" sizingBehavior="auto" id="plT-An-slk" userLabel="HelpButton">
<button key="view" verticalHuggingPriority="750" misplaced="YES" tag="11" id="gYZ-LN-2Ae">
<button key="view" verticalHuggingPriority="750" tag="11" id="gYZ-LN-2Ae">
<rect key="frame" x="0.0" y="14" width="82" height="24"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="csx_info" imagePosition="only" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="INc-bf-wY2">
Expand All @@ -486,7 +486,7 @@
</connections>
</toolbarItem>
<toolbarItem implicitItemIdentifier="84D7D75A-2F9B-41B9-B113-F9ABAA5498DE" label="Install Driver" paletteLabel="Install Driver" toolTip="Install Serial Driver: install a serial driver, PL2303 or CH340" tag="12" image="csx_driver" sizingBehavior="auto" id="F1U-zn-Wu5" userLabel="InstallDriverButton">
<button key="view" verticalHuggingPriority="750" misplaced="YES" tag="12" id="mvT-QI-6h2">
<button key="view" verticalHuggingPriority="750" tag="12" id="mvT-QI-6h2">
<rect key="frame" x="0.0" y="14" width="82" height="24"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<buttonCell key="cell" type="roundTextured" bezelStyle="texturedRounded" image="csx_driver" imagePosition="only" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="k5e-8Z-M3e">
Expand Down
4 changes: 2 additions & 2 deletions macOS/CamelStudioX/CamelStudioX/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>4.1.3</string>
<string>4.1.4</string>
<key>CFBundleVersion</key>
<string>58</string>
<string>59</string>
<key>LSApplicationCategoryType</key>
<string>public.app-category.developer-tools</string>
<key>LSMinimumSystemVersion</key>
Expand Down
5 changes: 5 additions & 0 deletions macOS/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,11 @@ main():

## History

### 4.1.4 Build 59

- Fix a crash on macOS 10.12.*
- Auto update recent project table in Welcome Window

### 4.1.3 Build 58

- Fix UI of Welcome Window in old systems
Expand Down
Loading

0 comments on commit f75ed80

Please sign in to comment.