Move to static pref

This commit is contained in:
Sharat M R
2019-04-23 20:54:47 +05:30
parent 7c57363522
commit 71f4114ce3
9 changed files with 44 additions and 111 deletions

View File

@@ -10,8 +10,12 @@ screendump_PRIVATE_FRAMEWORKS := IOMobileFramebuffer
include $(THEOS_MAKE_PATH)/tweak.mk
SUBPROJECTS += screendumpprefs
include $(THEOS_MAKE_PATH)/aggregate.mk
# SUBPROJECTS += screendumpprefs
# include $(THEOS_MAKE_PATH)/aggregate.mk
after-install::
install.exec "killall -9 backboardd"
internal-stage::
#PreferenceLoader plist
$(ECHO_NOTHING)if [ -f Preferences.plist ]; then mkdir -p $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences/screendump; cp Preferences.plist $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences/screendump/; fi$(ECHO_END)

38
Preferences.plist Normal file
View File

@@ -0,0 +1,38 @@
<?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>cell</key>
<string>PSLinkCell</string>
<key>label</key>
<string>screendump</string>
<key>icon</key>
<string>ScreenDump.png</string>
</dict>
<key>items</key>
<array>
<dict>
<key>cell</key>
<string>PSGroupCell</string>
<key>label</key>
<string>General</string>
</dict>
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>label</key>
<string>Enabled</string>
<key>default</key>
<true/>
<key>defaults</key>
<string>com.cosmosgenius.screendump</string>
<key>key</key>
<string>CCSisEnabled</string>
<key>PostNotification</key>
<string>com.cosmosgenius.screendump/preferences.changed</string>
</dict>
</array>
</dict>
</plist>

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -1,5 +0,0 @@
#import <Preferences/PSListController.h>
@interface CCSRootListController : PSListController
@end

View File

@@ -1,13 +0,0 @@
#include "CCSRootListController.h"
@implementation CCSRootListController
- (NSArray *)specifiers {
if (!_specifiers) {
_specifiers = [[self loadSpecifiersFromPlistName:@"Root" target:self] retain];
}
return _specifiers;
}
@end

View File

@@ -1,15 +0,0 @@
ARCHS := arm64
include $(THEOS)/makefiles/common.mk
BUNDLE_NAME = ScreenDumpprefs
ScreenDumpprefs_FILES = CCSRootListController.m
ScreenDumpprefs_INSTALL_PATH = /Library/PreferenceBundles
ScreenDumpprefs_FRAMEWORKS = UIKit
ScreenDumpprefs_PRIVATE_FRAMEWORKS = Preferences
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/ScreenDumpprefs.plist$(ECHO_END)

View File

@@ -1,24 +0,0 @@
<?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>ScreenDumpprefs</string>
<key>CFBundleIdentifier</key>
<string>com.cosmosgenius.screendumpprefs</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>CCSRootListController</string>
</dict>
</plist>

View File

@@ -1,31 +0,0 @@
<?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>PSGroupCell</string>
<key>label</key>
<string>General</string>
</dict>
<dict>
<key>cell</key>
<string>PSSwitchCell</string>
<key>default</key>
<true/>
<key>defaults</key>
<string>com.cosmosgenius.screendumpprefs</string>
<key>key</key>
<string>CCSisEnabled</string>
<key>label</key>
<string>Enabled</string>
<key>PostNotification</key>
<string>com.cosmosgenius.screendumpprefs/settingschanged<string>
</dict>
</array>
<key>title</key>
<string>ScreenDump</string>
</dict>
</plist>

View File

@@ -1,21 +0,0 @@
<?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>ScreenDumpprefs</string>
<key>cell</key>
<string>PSLinkCell</string>
<key>detail</key>
<string>CCSRootListController</string>
<key>icon</key>
<string>ScreenDump.png</string>
<key>isController</key>
<true/>
<key>label</key>
<string>ScreenDump</string>
</dict>
</dict>
</plist>