From 615b0aefe92fb5d7b1fae821f91eb98e3f403bfe Mon Sep 17 00:00:00 2001 From: Cameron Katri Date: Mon, 16 Aug 2021 16:09:37 -0400 Subject: QuickActions: Add new tweak --- QuickActions/QuickActionsPrefs/Makefile | 16 +++ .../QuickActionsPrefs/QASRootListController.h | 4 + .../QuickActionsPrefs/QASRootListController.m | 20 ++++ .../QuickActionsPrefs/Resources/Icon@2x.png | Bin 0 -> 4436 bytes .../QuickActionsPrefs/Resources/Icon@3x.png | Bin 0 -> 8221 bytes .../QuickActionsPrefs/Resources/Info.plist | 24 ++++ .../QuickActionsPrefs/Resources/Root.plist | 123 +++++++++++++++++++++ .../Preferences/QuickActionsPrefs.plist | 21 ++++ 8 files changed, 208 insertions(+) create mode 100644 QuickActions/QuickActionsPrefs/Makefile create mode 100644 QuickActions/QuickActionsPrefs/QASRootListController.h create mode 100644 QuickActions/QuickActionsPrefs/QASRootListController.m create mode 100644 QuickActions/QuickActionsPrefs/Resources/Icon@2x.png create mode 100644 QuickActions/QuickActionsPrefs/Resources/Icon@3x.png create mode 100644 QuickActions/QuickActionsPrefs/Resources/Info.plist create mode 100644 QuickActions/QuickActionsPrefs/Resources/Root.plist create mode 100644 QuickActions/QuickActionsPrefs/layout/Library/PreferenceLoader/Preferences/QuickActionsPrefs.plist (limited to 'QuickActions/QuickActionsPrefs') diff --git a/QuickActions/QuickActionsPrefs/Makefile b/QuickActions/QuickActionsPrefs/Makefile new file mode 100644 index 0000000..df9918b --- /dev/null +++ b/QuickActions/QuickActionsPrefs/Makefile @@ -0,0 +1,16 @@ +TARGET := iphone:clang:14.4:13.0 + +include $(THEOS)/makefiles/common.mk + +ARCHS := arm64 arm64e + +BUNDLE_NAME = QuickActionsPrefs + +QuickActionsPrefs_FILES = QASRootListController.m +QuickActionsPrefs_FRAMEWORKS = UIKit +QuickActionsPrefs_PRIVATE_FRAMEWORKS = Preferences +QuickActionsPrefs_EXTRA_FRAMEWORKS = AltList +QuickActionsPrefs_INSTALL_PATH = /Library/PreferenceBundles +QuickActionsPrefs_CFLAGS = -fobjc-arc + +include $(THEOS_MAKE_PATH)/bundle.mk diff --git a/QuickActions/QuickActionsPrefs/QASRootListController.h b/QuickActions/QuickActionsPrefs/QASRootListController.h new file mode 100644 index 0000000..6b45016 --- /dev/null +++ b/QuickActions/QuickActionsPrefs/QASRootListController.h @@ -0,0 +1,4 @@ +#import + +@interface QASRootListController : PSListController +@end diff --git a/QuickActions/QuickActionsPrefs/QASRootListController.m b/QuickActions/QuickActionsPrefs/QASRootListController.m new file mode 100644 index 0000000..e781ab6 --- /dev/null +++ b/QuickActions/QuickActionsPrefs/QASRootListController.m @@ -0,0 +1,20 @@ +#import +#import "QASRootListController.h" + +@implementation QASRootListController + +-(NSArray *)specifiers +{ + if (!_specifiers) { + _specifiers = [self loadSpecifiersFromPlistName:@"Root" target:self]; + } + + return _specifiers; +} + +-(void)openSource +{ + [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://git.cameronkatri.com/tweaks/tree/QuickActions"] options:@{} completionHandler:nil]; +} + +@end diff --git a/QuickActions/QuickActionsPrefs/Resources/Icon@2x.png b/QuickActions/QuickActionsPrefs/Resources/Icon@2x.png new file mode 100644 index 0000000..307e3e3 Binary files /dev/null and b/QuickActions/QuickActionsPrefs/Resources/Icon@2x.png differ diff --git a/QuickActions/QuickActionsPrefs/Resources/Icon@3x.png b/QuickActions/QuickActionsPrefs/Resources/Icon@3x.png new file mode 100644 index 0000000..6c9a06b Binary files /dev/null and b/QuickActions/QuickActionsPrefs/Resources/Icon@3x.png differ diff --git a/QuickActions/QuickActionsPrefs/Resources/Info.plist b/QuickActions/QuickActionsPrefs/Resources/Info.plist new file mode 100644 index 0000000..afd9d3f --- /dev/null +++ b/QuickActions/QuickActionsPrefs/Resources/Info.plist @@ -0,0 +1,24 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + QuickActionsPrefs + CFBundleIdentifier + com.cameronkatri.quickactions + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + BNDL + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + 1.0 + NSPrincipalClass + QASRootListController + + diff --git a/QuickActions/QuickActionsPrefs/Resources/Root.plist b/QuickActions/QuickActionsPrefs/Resources/Root.plist new file mode 100644 index 0000000..5b0c436 --- /dev/null +++ b/QuickActions/QuickActionsPrefs/Resources/Root.plist @@ -0,0 +1,123 @@ + + + + + items + + + cell + PSGroupCell + label + QuickActions + + + cell + PSSwitchCell + defaults + com.cameronkatri.quickactions + key + leftOn + label + Custom Left Button + default + + PostNotification + com.cameronkatri.quickactions/ReloadPrefs + + + cell + PSLinkListCell + defaults + com.cameronkatri.quickactions + label + Left App + detail + ATLApplicationListSelectionController + key + leftApp + cellClass + ATLApplicationSelectionCell + sections + + + sectionType + System + + + sectionType + User + + + useSearchBar + + hideSearchBarWhileScrolling + + showIdentifiersAsSubtitle + + includeIdentifiersInSearch + + PostNotification + com.cameronkatri.quickactions/ReloadPrefs + + + cell + PSSwitchCell + defaults + com.cameronkatri.quickactions + key + rightOn + label + Custom Right Button + default + + PostNotification + com.cameronkatri.quickactions/ReloadPrefs + + + cell + PSLinkListCell + defaults + com.cameronkatri.quickactions + label + Right App + detail + ATLApplicationListSelectionController + key + rightApp + cellClass + ATLApplicationSelectionCell + sections + + + sectionType + System + + + sectionType + User + + + useSearchBar + + hideSearchBarWhileScrolling + + showIdentifiersAsSubtitle + + includeIdentifiersInSearch + + PostNotification + com.cameronkatri.quickactions/ReloadPrefs + + + cell + PSButtonCell + label + Source Code + action + openSource + + + title + QuickActions + + diff --git a/QuickActions/QuickActionsPrefs/layout/Library/PreferenceLoader/Preferences/QuickActionsPrefs.plist b/QuickActions/QuickActionsPrefs/layout/Library/PreferenceLoader/Preferences/QuickActionsPrefs.plist new file mode 100644 index 0000000..baa738f --- /dev/null +++ b/QuickActions/QuickActionsPrefs/layout/Library/PreferenceLoader/Preferences/QuickActionsPrefs.plist @@ -0,0 +1,21 @@ + + + + + entry + + bundle + QuickActionsPrefs + cell + PSLinkCell + detail + QASRootListController + icon + Icon.png + isController + + label + QuickActions + + + -- cgit v1.2.3-56-ge451