-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More comments, optimization, preferences
- Loading branch information
Showing
14 changed files
with
295 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
include $(THEOS)/makefiles/common.mk | ||
|
||
BUNDLE_NAME = MobileGoose | ||
|
||
MobileGoose_FILES = PXMGPRootListController.m | ||
MobileGoose_INSTALL_PATH = /Library/PreferenceBundles | ||
MobileGoose_FRAMEWORKS = UIKit | ||
MobileGoose_PRIVATE_FRAMEWORKS = Preferences | ||
MobileGoose_CFLAGS = -fobjc-arc | ||
|
||
include $(THEOS_MAKE_PATH)/bundle.mk | ||
|
||
internal-stage:: | ||
$(ECHO_NOTHING)mkdir -p $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences$(ECHO_END) | ||
$(ECHO_NOTHING)cp entry.plist $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences/MobileGoose.plist$(ECHO_END) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#import <Preferences/PSListController.h> | ||
|
||
@interface PXMGPRootListController : PSListController | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#include "PXMGPRootListController.h" | ||
#import <Preferences/PSSpecifier.h> | ||
|
||
@implementation PXMGPRootListController | ||
|
||
- (NSArray *)specifiers { | ||
if (!_specifiers) { | ||
_specifiers = [self loadSpecifiersFromPlistName:@"Root" target:self]; | ||
} | ||
|
||
return _specifiers; | ||
} | ||
|
||
- (void)setPreferenceValue:(NSNumber *)value forNotifyingSwitch:(PSSpecifier *)specifier { | ||
[self setPreferenceValue:value specifier:specifier]; | ||
NSNotificationName notificationName; | ||
if ((value.boolValue && (notificationName = [specifier propertyForKey:@"trueNotification"])) || | ||
(!value.boolValue && (notificationName = [specifier propertyForKey:@"falseNotification"]))) | ||
{ | ||
CFNotificationCenterPostNotification( | ||
CFNotificationCenterGetDarwinNotifyCenter(), | ||
(__bridge CFNotificationName)notificationName, | ||
NULL, NULL, YES | ||
); | ||
} | ||
if ((notificationName = [specifier propertyForKey:@"anyNotification"])) { | ||
[NSUserDefaults.standardUserDefaults synchronize]; | ||
CFNotificationCenterPostNotification( | ||
CFNotificationCenterGetDarwinNotifyCenter(), | ||
(__bridge CFNotificationName)notificationName, | ||
NULL, NULL, YES | ||
); | ||
} | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>CFBundleDevelopmentRegion</key> | ||
<string>English</string> | ||
<key>CFBundleExecutable</key> | ||
<string>MobileGoose</string> | ||
<key>CFBundleIdentifier</key> | ||
<string>com.pixelomer.mobilegoose</string> | ||
<key>CFBundleInfoDictionaryVersion</key> | ||
<string>6.0</string> | ||
<key>CFBundlePackageType</key> | ||
<string>BNDL</string> | ||
<key>CFBundleShortVersionString</key> | ||
<string>1.0.0</string> | ||
<key>CFBundleSignature</key> | ||
<string>????</string> | ||
<key>CFBundleVersion</key> | ||
<string>1.0</string> | ||
<key>NSPrincipalClass</key> | ||
<string>PXMGPRootListController</string> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>items</key> | ||
<array> | ||
<dict> | ||
<key>cell</key> | ||
<string>PSSwitchCell</string> | ||
<key>default</key> | ||
<true/> | ||
<key>defaults</key> | ||
<string>com.pixelomer.mobilegoose</string> | ||
<key>key</key> | ||
<string>Enabled</string> | ||
<key>label</key> | ||
<string>Enabled</string> | ||
<key>set</key> | ||
<string>setPreferenceValue:forNotifyingSwitch:</string> | ||
<key>anyNotification</key> | ||
<string>com.pixelomer.mobilegoose/PreferenceChange</string> | ||
</dict> | ||
<dict> | ||
<key>cell</key> | ||
<string>PSGroupCell</string> | ||
<key>label</key> | ||
<string>Gifts</string> | ||
<key>footerText</key> | ||
<string>You can put images and notes inside "/Library/Application Support/MobileGoose" for the goose to bring.</string> | ||
</dict> | ||
<dict> | ||
<key>cell</key> | ||
<string>PSSwitchCell</string> | ||
<key>default</key> | ||
<true/> | ||
<key>defaults</key> | ||
<string>com.pixelomer.mobilegoose</string> | ||
<key>key</key> | ||
<string>BringImages</string> | ||
<key>label</key> | ||
<string>Bring Images</string> | ||
</dict> | ||
<dict> | ||
<key>cell</key> | ||
<string>PSSwitchCell</string> | ||
<key>default</key> | ||
<false/> | ||
<key>defaults</key> | ||
<string>com.pixelomer.mobilegoose</string> | ||
<key>key</key> | ||
<string>BringNotes</string> | ||
<key>label</key> | ||
<string>Bring Notes</string> | ||
</dict> | ||
<dict> | ||
<key>cell</key> | ||
<string>PSSwitchCell</string> | ||
<key>default</key> | ||
<false/> | ||
<key>defaults</key> | ||
<string>com.pixelomer.mobilegoose</string> | ||
<key>key</key> | ||
<string>DisableDefaultGifts</string> | ||
<key>label</key> | ||
<string>Disable Default Gifts</string> | ||
</dict> | ||
</array> | ||
<key>title</key> | ||
<string>MobileGoose</string> | ||
</dict> | ||
</plist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | ||
<plist version="1.0"> | ||
<dict> | ||
<key>entry</key> | ||
<dict> | ||
<key>bundle</key> | ||
<string>MobileGoose</string> | ||
<key>cell</key> | ||
<string>PSLinkCell</string> | ||
<key>detail</key> | ||
<string>PXMGPRootListController</string> | ||
<key>icon</key> | ||
<string>icon.png</string> | ||
<key>isController</key> | ||
<true/> | ||
<key>label</key> | ||
<string>MobileGoose</string> | ||
</dict> | ||
</dict> | ||
</plist> |
Oops, something went wrong.