Skip to content
This repository has been archived by the owner on Jan 24, 2022. It is now read-only.

Commit

Permalink
[prefs] add a typestatus plus promotion cell
Browse files Browse the repository at this point in the history
  • Loading branch information
kirb committed Sep 5, 2016
1 parent 045bedd commit cd530f9
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 5 deletions.
11 changes: 6 additions & 5 deletions prefs/HBTSRootListController.m
Original file line number Diff line number Diff line change
Expand Up @@ -34,20 +34,21 @@ - (instancetype)init {

- (void)viewDidLoad {
[super viewDidLoad];
[self _removeTypeStatusPlusIfNeeded];
[self _configureTypeStatusPlusSpecifier];
}

- (void)reloadSpecifiers {
[super reloadSpecifiers];
[self _removeTypeStatusPlusIfNeeded];
[self _configureTypeStatusPlusSpecifier];
}

- (void)_removeTypeStatusPlusIfNeeded {
- (void)_configureTypeStatusPlusSpecifier {
NSBundle *plusBundle = [NSBundle bundleWithPath:@"/Library/PreferenceBundles/TypeStatusPlus.bundle"];

if (!plusBundle.executableURL) {
if (plusBundle.executableURL) {
[self removeSpecifierID:@"TypeStatusPlusPromo"];
} else {
[self removeSpecifierID:@"TypeStatusPlus"];
[self removeSpecifierID:@"TypeStatusPlusGroup"];
}
}

Expand Down
18 changes: 18 additions & 0 deletions prefs/Resources/Root.plist
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,24 @@
<key>label</key>
<string>TYPESTATUS_PLUS</string>
</dict>
<dict>
<key>big</key>
<true/>
<key>cellClass</key>
<string>HBLinkTableCell</string>
<key>height</key>
<integer>64</integer>
<key>icon</key>
<string>typestatusplus.png</string>
<key>id</key>
<string>TypeStatusPlusPromo</string>
<key>label</key>
<string>TYPESTATUS_PLUS</string>
<key>subtitle</key>
<string>TYPESTATUS_PLUS_SUBTITLE</string>
<key>url</key>
<string>https://typestatus.com/plus/</string>
</dict>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
Expand Down
4 changes: 4 additions & 0 deletions prefs/Resources/en.lproj/Root.strings
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,9 @@
<!-- TypeStatus Plus (Do not translate as it's a name) -->
<key>TYPESTATUS_PLUS</key>
<string>TypeStatus Plus</string>

<!-- Explanation of TypeStatus Plus features. -->
<key>TYPESTATUS_PLUS_SUBTITLE</key>
<string>Typing indicators for more apps, along with other goodies.</string>
</dict>
</plist>
4 changes: 4 additions & 0 deletions prefs/Resources/en_AU.lproj/Root.strings
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,9 @@
<!-- TypeStatus Plus (Do not translate as it's a name)-->
<key>TYPESTATUS_PLUS</key>
<string>TypeStatus Plus</string>

<!-- Explanation of TypeStatus Plus features. -->
<key>TYPESTATUS_PLUS_SUBTITLE</key>
<string>Typing indicators for more apps, along with other goodies.</string>
</dict>
</plist>
4 changes: 4 additions & 0 deletions prefs/Resources/en_GB.lproj/Root.strings
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,9 @@
<!-- TypeStatus Plus (Do not translate as it's a name)-->
<key>TYPESTATUS_PLUS</key>
<string>TypeStatus Plus</string>

<!-- Explanation of TypeStatus Plus features. -->
<key>TYPESTATUS_PLUS_SUBTITLE</key>
<string>Typing indicators for more apps, along with other goodies.</string>
</dict>
</plist>
Binary file added prefs/Resources/typestatusplus.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added prefs/Resources/[email protected]
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit cd530f9

Please sign in to comment.