├── AppButtonKit.plist ├── AppButton.plist ├── ABWindow.h ├── appbuttonprefs ├── Resources │ ├── kyle.png │ ├── brush.png │ ├── aboutIcon.png │ ├── brush@2x.png │ ├── brush@3x.png │ ├── favorites.png │ ├── kyle@2x.png │ ├── kyle@3x.png │ ├── steverolfe.png │ ├── aboutIcon@2x.png │ ├── aboutIcon@3x.png │ ├── appbuttonprefs.png │ ├── behaviorIcon.png │ ├── favorites@2x.png │ ├── favorites@3x.png │ ├── steverolfe@2x.png │ ├── steverolfe@3x.png │ ├── appbuttonbutton.png │ ├── behaviorIcon@2x.png │ ├── behaviorIcon@3x.png │ ├── ja.lproj │ │ ├── abfavorites.strings │ │ ├── abwhitelist.strings │ │ ├── appbuttonprefs.strings │ │ ├── abactivator.strings │ │ ├── ababout.strings │ │ ├── abaesthetics.strings │ │ └── abbehavior.strings │ ├── appbuttonbutton@2x.png │ ├── appbuttonbutton@3x.png │ ├── appbuttonprefs@2x.png │ ├── appbuttonprefs@3x.png │ ├── de.lproj │ │ ├── abfavorites.strings │ │ ├── abwhitelist.strings │ │ ├── appbuttonprefs.strings │ │ ├── abactivator.strings │ │ ├── ababout.strings │ │ ├── abaesthetics.strings │ │ └── abbehavior.strings │ ├── el.lproj │ │ ├── ababout.strings │ │ ├── abactivator.strings │ │ ├── abbehavior.strings │ │ ├── abfavorites.strings │ │ ├── abwhitelist.strings │ │ ├── abaesthetics.strings │ │ └── appbuttonprefs.strings │ ├── en.lproj │ │ ├── abfavorites.strings │ │ ├── abwhitelist.strings │ │ ├── appbuttonprefs.strings │ │ ├── abactivator.strings │ │ ├── ababout.strings │ │ ├── abaesthetics.strings │ │ └── abbehavior.strings │ ├── he.lproj │ │ ├── abfavorites.strings │ │ ├── abwhitelist.strings │ │ ├── appbuttonprefs.strings │ │ ├── abactivator.strings │ │ ├── ababout.strings │ │ ├── abaesthetics.strings │ │ └── abbehavior.strings │ ├── tr.lproj │ │ ├── ababout.strings │ │ ├── abactivator.strings │ │ ├── abbehavior.strings │ │ ├── abfavorites.strings │ │ ├── abwhitelist.strings │ │ ├── abaesthetics.strings │ │ └── appbuttonprefs.strings │ ├── cs.lproj │ │ ├── abfavorites.strings │ │ ├── abwhitelist.strings │ │ ├── appbuttonprefs.strings │ │ ├── abactivator.strings │ │ ├── ababout.strings │ │ ├── abaesthetics.strings │ │ └── abbehavior.strings │ ├── da.lproj │ │ ├── abfavorites.strings │ │ ├── abwhitelist.strings │ │ ├── appbuttonprefs.strings │ │ ├── abactivator.strings │ │ ├── ababout.strings │ │ ├── abaesthetics.strings │ │ └── abbehavior.strings │ ├── es.lproj │ │ ├── abfavorites.strings │ │ ├── abwhitelist.strings │ │ ├── appbuttonprefs.strings │ │ ├── abactivator.strings │ │ ├── ababout.strings │ │ ├── abaesthetics.strings │ │ └── abbehavior.strings │ ├── pl.lproj │ │ ├── abfavorites.strings │ │ ├── abwhitelist.strings │ │ ├── appbuttonprefs.strings │ │ ├── abactivator.strings │ │ ├── ababout.strings │ │ ├── abaesthetics.strings │ │ └── abbehavior.strings │ ├── pt.lproj │ │ ├── abfavorites.strings │ │ ├── abwhitelist.strings │ │ ├── appbuttonprefs.strings │ │ ├── abactivator.strings │ │ ├── ababout.strings │ │ ├── abaesthetics.strings │ │ └── abbehavior.strings │ ├── ru.lproj │ │ ├── abfavorites.strings │ │ ├── abwhitelist.strings │ │ ├── appbuttonprefs.strings │ │ ├── abactivator.strings │ │ ├── ababout.strings │ │ ├── abaesthetics.strings │ │ └── abbehavior.strings │ ├── zh-Hans.lproj │ │ ├── ababout.strings │ │ ├── abactivator.strings │ │ ├── abbehavior.strings │ │ ├── abfavorites.strings │ │ ├── abwhitelist.strings │ │ ├── abaesthetics.strings │ │ └── appbuttonprefs.strings │ ├── ar.lproj │ │ ├── abfavorites.strings │ │ ├── abwhitelist.strings │ │ ├── appbuttonprefs.strings │ │ ├── abactivator.strings │ │ ├── ababout.strings │ │ ├── abaesthetics.strings │ │ └── abbehavior.strings │ ├── it.lproj │ │ ├── abfavorites.strings │ │ ├── abwhitelist.strings │ │ ├── appbuttonprefs.strings │ │ ├── abactivator.strings │ │ ├── ababout.strings │ │ ├── abaesthetics.strings │ │ └── abbehavior.strings │ ├── ko.lproj │ │ ├── abfavorites.strings │ │ ├── abwhitelist.strings │ │ ├── appbuttonprefs.strings │ │ ├── abactivator.strings │ │ ├── ababout.strings │ │ ├── abaesthetics.strings │ │ └── abbehavior.strings │ ├── zh-Hant.lproj │ │ ├── abfavorites.strings │ │ ├── abwhitelist.strings │ │ ├── appbuttonprefs.strings │ │ ├── abactivator.strings │ │ ├── ababout.strings │ │ ├── abaesthetics.strings │ │ └── abbehavior.strings │ ├── vi.lproj │ │ ├── abfavorites.strings │ │ ├── abwhitelist.strings │ │ ├── appbuttonprefs.strings │ │ ├── abactivator.strings │ │ ├── ababout.strings │ │ ├── abaesthetics.strings │ │ └── abbehavior.strings │ ├── Info.plist │ ├── appbuttonprefs.plist │ ├── abaesthetics.plist │ ├── abbehavior.plist │ └── ababout.plist ├── entry.plist ├── ABLookAndFeelController.m ├── appbuttonprefs.mm ├── ABSwitchTableCell.m ├── ABSliderTableCell.m ├── ABSegmentTableCell.m ├── SAMath.h ├── Makefile ├── SAMath.m ├── SAMultisectorControl.h ├── ABAboutTableCell.m ├── ABAboutKyleTableCell.m ├── ABAboutController.m ├── prefs-common.h ├── ABBehaviorController.m ├── ABPrefsHeaderCell.m ├── ABFavoritedAppsController.m ├── ABWhitelistApps.m └── SAMultisectorControl.m ├── TweakKit.xm ├── control ├── Makefile ├── LICENSE ├── ABWindow.m ├── UIImage+ColorAtPixel.m ├── AppButton.h ├── common.h └── ABButtonView.m /AppButtonKit.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.UIKit" ); }; } 2 | -------------------------------------------------------------------------------- /AppButton.plist: -------------------------------------------------------------------------------- 1 | { Filter = { Bundles = ( "com.apple.springboard" ); }; } 2 | -------------------------------------------------------------------------------- /ABWindow.h: -------------------------------------------------------------------------------- 1 | #import "common.h" 2 | 3 | @interface ABWindow : UIWindow 4 | //- (void)fixFrame; 5 | @end -------------------------------------------------------------------------------- /appbuttonprefs/Resources/kyle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/kyle.png -------------------------------------------------------------------------------- /appbuttonprefs/Resources/brush.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/brush.png -------------------------------------------------------------------------------- /appbuttonprefs/Resources/aboutIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/aboutIcon.png -------------------------------------------------------------------------------- /appbuttonprefs/Resources/brush@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/brush@2x.png -------------------------------------------------------------------------------- /appbuttonprefs/Resources/brush@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/brush@3x.png -------------------------------------------------------------------------------- /appbuttonprefs/Resources/favorites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/favorites.png -------------------------------------------------------------------------------- /appbuttonprefs/Resources/kyle@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/kyle@2x.png -------------------------------------------------------------------------------- /appbuttonprefs/Resources/kyle@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/kyle@3x.png -------------------------------------------------------------------------------- /appbuttonprefs/Resources/steverolfe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/steverolfe.png -------------------------------------------------------------------------------- /appbuttonprefs/Resources/aboutIcon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/aboutIcon@2x.png -------------------------------------------------------------------------------- /appbuttonprefs/Resources/aboutIcon@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/aboutIcon@3x.png -------------------------------------------------------------------------------- /appbuttonprefs/Resources/appbuttonprefs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/appbuttonprefs.png -------------------------------------------------------------------------------- /appbuttonprefs/Resources/behaviorIcon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/behaviorIcon.png -------------------------------------------------------------------------------- /appbuttonprefs/Resources/favorites@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/favorites@2x.png -------------------------------------------------------------------------------- /appbuttonprefs/Resources/favorites@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/favorites@3x.png -------------------------------------------------------------------------------- /appbuttonprefs/Resources/steverolfe@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/steverolfe@2x.png -------------------------------------------------------------------------------- /appbuttonprefs/Resources/steverolfe@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/steverolfe@3x.png -------------------------------------------------------------------------------- /appbuttonprefs/Resources/appbuttonbutton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/appbuttonbutton.png -------------------------------------------------------------------------------- /appbuttonprefs/Resources/behaviorIcon@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/behaviorIcon@2x.png -------------------------------------------------------------------------------- /appbuttonprefs/Resources/behaviorIcon@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/behaviorIcon@3x.png -------------------------------------------------------------------------------- /appbuttonprefs/Resources/ja.lproj/abfavorites.strings: -------------------------------------------------------------------------------- 1 | "FAVORITES_HEADER" = "お気に入り"; 2 | "ALL_APPS_HEADER" = "アプリ"; 3 | "LOADING_TEXT" = "ロード中…"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/appbuttonbutton@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/appbuttonbutton@2x.png -------------------------------------------------------------------------------- /appbuttonprefs/Resources/appbuttonbutton@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/appbuttonbutton@3x.png -------------------------------------------------------------------------------- /appbuttonprefs/Resources/appbuttonprefs@2x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/appbuttonprefs@2x.png -------------------------------------------------------------------------------- /appbuttonprefs/Resources/appbuttonprefs@3x.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/appbuttonprefs@3x.png -------------------------------------------------------------------------------- /appbuttonprefs/Resources/de.lproj/abfavorites.strings: -------------------------------------------------------------------------------- 1 | "FAVORITES_HEADER" = "Favoriten"; 2 | "ALL_APPS_HEADER" = "Apps"; 3 | "LOADING_TEXT" = "Lädt..."; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/el.lproj/ababout.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/el.lproj/ababout.strings -------------------------------------------------------------------------------- /appbuttonprefs/Resources/en.lproj/abfavorites.strings: -------------------------------------------------------------------------------- 1 | "FAVORITES_HEADER" = "Favorites"; 2 | "ALL_APPS_HEADER" = "Apps"; 3 | "LOADING_TEXT" = "Loading..."; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/he.lproj/abfavorites.strings: -------------------------------------------------------------------------------- 1 | "ALL_APPS_HEADER" = "אפליקציות"; 2 | "FAVORITES_HEADER" = "מועדפים"; 3 | "LOADING_TEXT" = "טוען..."; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/tr.lproj/ababout.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/tr.lproj/ababout.strings -------------------------------------------------------------------------------- /appbuttonprefs/Resources/cs.lproj/abfavorites.strings: -------------------------------------------------------------------------------- 1 | "FAVORITES_HEADER" = "Oblíbené"; 2 | "ALL_APPS_HEADER" = "Aplikace"; 3 | "LOADING_TEXT" = "Načítání..."; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/da.lproj/abfavorites.strings: -------------------------------------------------------------------------------- 1 | "FAVORITES_HEADER" = "Favoritter"; 2 | "ALL_APPS_HEADER" = "Apps"; 3 | "LOADING_TEXT" = "Indlæser..."; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/el.lproj/abactivator.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/el.lproj/abactivator.strings -------------------------------------------------------------------------------- /appbuttonprefs/Resources/el.lproj/abbehavior.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/el.lproj/abbehavior.strings -------------------------------------------------------------------------------- /appbuttonprefs/Resources/el.lproj/abfavorites.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/el.lproj/abfavorites.strings -------------------------------------------------------------------------------- /appbuttonprefs/Resources/el.lproj/abwhitelist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/el.lproj/abwhitelist.strings -------------------------------------------------------------------------------- /appbuttonprefs/Resources/es.lproj/abfavorites.strings: -------------------------------------------------------------------------------- 1 | "FAVORITES_HEADER" = "Favoritos"; 2 | "ALL_APPS_HEADER" = "Apps"; 3 | "LOADING_TEXT" = "Cargando..."; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/pl.lproj/abfavorites.strings: -------------------------------------------------------------------------------- 1 | "FAVORITES_HEADER" = "Ulubione"; 2 | "ALL_APPS_HEADER" = "Apki"; 3 | "LOADING_TEXT" = "Ładowanie..."; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/tr.lproj/abactivator.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/tr.lproj/abactivator.strings -------------------------------------------------------------------------------- /appbuttonprefs/Resources/tr.lproj/abbehavior.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/tr.lproj/abbehavior.strings -------------------------------------------------------------------------------- /appbuttonprefs/Resources/tr.lproj/abfavorites.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/tr.lproj/abfavorites.strings -------------------------------------------------------------------------------- /appbuttonprefs/Resources/tr.lproj/abwhitelist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/tr.lproj/abwhitelist.strings -------------------------------------------------------------------------------- /appbuttonprefs/Resources/el.lproj/abaesthetics.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/el.lproj/abaesthetics.strings -------------------------------------------------------------------------------- /appbuttonprefs/Resources/pt.lproj/abfavorites.strings: -------------------------------------------------------------------------------- 1 | "FAVORITES_HEADER" = "Favoritos"; 2 | "ALL_APPS_HEADER" = "Aplicativos"; 3 | "LOADING_TEXT" = "Carregando…"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/ru.lproj/abfavorites.strings: -------------------------------------------------------------------------------- 1 | "FAVORITES_HEADER" = "Избранное"; 2 | "ALL_APPS_HEADER" = "Приложения"; 3 | "LOADING_TEXT" = "Загрузка..."; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/tr.lproj/abaesthetics.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/tr.lproj/abaesthetics.strings -------------------------------------------------------------------------------- /appbuttonprefs/Resources/zh-Hans.lproj/ababout.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/zh-Hans.lproj/ababout.strings -------------------------------------------------------------------------------- /appbuttonprefs/Resources/ar.lproj/abfavorites.strings: -------------------------------------------------------------------------------- 1 | "FAVORITES_HEADER" = "البرامج المفضلة"; 2 | "ALL_APPS_HEADER" = "البرامج"; 3 | "LOADING_TEXT" = "جاري التحميل..."; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/el.lproj/appbuttonprefs.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/el.lproj/appbuttonprefs.strings -------------------------------------------------------------------------------- /appbuttonprefs/Resources/it.lproj/abfavorites.strings: -------------------------------------------------------------------------------- 1 | "FAVORITES_HEADER" = "Preferiti"; 2 | "ALL_APPS_HEADER" = "Applicazioni"; 3 | "LOADING_TEXT" = "Caricamento..."; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/ko.lproj/abfavorites.strings: -------------------------------------------------------------------------------- 1 | "FAVORITES_HEADER" = "즐겨찾기"; 2 | "ALL_APPS_HEADER" = "즐겨찾기에 등록할 App을 선택하세요."; 3 | "LOADING_TEXT" = "불러 오는 중..."; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/tr.lproj/appbuttonprefs.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/tr.lproj/appbuttonprefs.strings -------------------------------------------------------------------------------- /appbuttonprefs/Resources/zh-Hans.lproj/abactivator.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/zh-Hans.lproj/abactivator.strings -------------------------------------------------------------------------------- /appbuttonprefs/Resources/zh-Hans.lproj/abbehavior.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/zh-Hans.lproj/abbehavior.strings -------------------------------------------------------------------------------- /appbuttonprefs/Resources/zh-Hans.lproj/abfavorites.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/zh-Hans.lproj/abfavorites.strings -------------------------------------------------------------------------------- /appbuttonprefs/Resources/zh-Hans.lproj/abwhitelist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/zh-Hans.lproj/abwhitelist.strings -------------------------------------------------------------------------------- /appbuttonprefs/Resources/zh-Hant.lproj/abfavorites.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/zh-Hant.lproj/abfavorites.strings -------------------------------------------------------------------------------- /appbuttonprefs/Resources/zh-Hant.lproj/abwhitelist.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/zh-Hant.lproj/abwhitelist.strings -------------------------------------------------------------------------------- /TweakKit.xm: -------------------------------------------------------------------------------- 1 | %hook UIScreen 2 | - (id)snapshotViewAfterScreenUpdates:(BOOL)arg1{ 3 | [appButtonObject appButtonScreenshotHide]; 4 | return %orig; 5 | } 6 | %end 7 | -------------------------------------------------------------------------------- /appbuttonprefs/Resources/vi.lproj/abfavorites.strings: -------------------------------------------------------------------------------- 1 | "FAVORITES_HEADER" = "Ứng dụng yêu thích"; 2 | "ALL_APPS_HEADER" = "Các ứng dụng"; 3 | "LOADING_TEXT" = "Đang tải…"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/zh-Hans.lproj/abaesthetics.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/zh-Hans.lproj/abaesthetics.strings -------------------------------------------------------------------------------- /appbuttonprefs/Resources/zh-Hans.lproj/appbuttonprefs.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/zh-Hans.lproj/appbuttonprefs.strings -------------------------------------------------------------------------------- /appbuttonprefs/Resources/zh-Hant.lproj/appbuttonprefs.strings: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/srolfe/AppButton/HEAD/appbuttonprefs/Resources/zh-Hant.lproj/appbuttonprefs.strings -------------------------------------------------------------------------------- /appbuttonprefs/Resources/ja.lproj/abwhitelist.strings: -------------------------------------------------------------------------------- 1 | "NOW_PLAYING_LABEL" = "Now Playing アプリ"; 2 | "WHITELIST_HEADER" = "ホワイトリスト"; 3 | "ALL_APPS_HEADER" = "アプリ"; 4 | "LOADING_TEXT" = "ロード中…"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/ko.lproj/abwhitelist.strings: -------------------------------------------------------------------------------- 1 | "NOW_PLAYING_LABEL" = "현재 재생 중인 App"; 2 | "WHITELIST_HEADER" = ""; 3 | "ALL_APPS_HEADER" = "제외할 App을 선택하세요."; 4 | "LOADING_TEXT" = "불러 오는 중..."; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/en.lproj/abwhitelist.strings: -------------------------------------------------------------------------------- 1 | "NOW_PLAYING_LABEL" = "Now Playing App"; 2 | "WHITELIST_HEADER" = "Whitelisted"; 3 | "ALL_APPS_HEADER" = "Apps"; 4 | "LOADING_TEXT" = "Loading..."; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/es.lproj/abwhitelist.strings: -------------------------------------------------------------------------------- 1 | "NOW_PLAYING_LABEL" = "App en Reproducción"; 2 | "WHITELIST_HEADER" = "Excluidas"; 3 | "ALL_APPS_HEADER" = "Apps"; 4 | "LOADING_TEXT" = "Cargando..."; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/he.lproj/abwhitelist.strings: -------------------------------------------------------------------------------- 1 | "ALL_APPS_HEADER" = "אפליקציות"; 2 | "LOADING_TEXT" = "טוען..."; 3 | "NOW_PLAYING_LABEL" = "אפליקציה מנגנת"; 4 | "WHITELIST_HEADER" = "רשימה לבנה"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/da.lproj/abwhitelist.strings: -------------------------------------------------------------------------------- 1 | "NOW_PLAYING_LABEL" = "Afspiller nu App"; 2 | "WHITELIST_HEADER" = "Tilladte apps"; 3 | "ALL_APPS_HEADER" = "Apps"; 4 | "LOADING_TEXT" = "Indlæser..."; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/ja.lproj/appbuttonprefs.strings: -------------------------------------------------------------------------------- 1 | "FAVORITE_SECTION_LABEL" = "お気に入りアプリ"; 2 | "AESTHETICS_SECTION_LABEL" = "外観"; 3 | "BEHAVIOR_SECTION_LABEL" = "動作"; 4 | "ABOUT_SECTION_LABEL" = "詳細"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/ko.lproj/appbuttonprefs.strings: -------------------------------------------------------------------------------- 1 | "FAVORITE_SECTION_LABEL" = "즐겨찾기 App"; 2 | "AESTHETICS_SECTION_LABEL" = "모양과 느낌"; 3 | "BEHAVIOR_SECTION_LABEL" = "설정"; 4 | "ABOUT_SECTION_LABEL" = "정보"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/cs.lproj/abwhitelist.strings: -------------------------------------------------------------------------------- 1 | "NOW_PLAYING_LABEL" = "Právě hrající aplikace"; 2 | "WHITELIST_HEADER" = "Povolené"; 3 | "ALL_APPS_HEADER" = "Aplikace"; 4 | "LOADING_TEXT" = "Načítání..."; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/de.lproj/abwhitelist.strings: -------------------------------------------------------------------------------- 1 | "NOW_PLAYING_LABEL" = "Gerade wiedergebende Apps"; 2 | "WHITELIST_HEADER" = "Auf der Whitelist"; 3 | "ALL_APPS_HEADER" = "Apps"; 4 | "LOADING_TEXT" = "Lädt..."; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/da.lproj/appbuttonprefs.strings: -------------------------------------------------------------------------------- 1 | "FAVORITE_SECTION_LABEL" = "Favoritter"; 2 | "AESTHETICS_SECTION_LABEL" = "Udseende"; 3 | "BEHAVIOR_SECTION_LABEL" = "Opførsel"; 4 | "ABOUT_SECTION_LABEL" = "Om"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/pl.lproj/abwhitelist.strings: -------------------------------------------------------------------------------- 1 | "NOW_PLAYING_LABEL" = "Apka odtwarzająca muzykę"; 2 | "WHITELIST_HEADER" = "Na białej liście"; 3 | "ALL_APPS_HEADER" = "Apki"; 4 | "LOADING_TEXT" = "Ładowanie..."; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/ar.lproj/abwhitelist.strings: -------------------------------------------------------------------------------- 1 | "NOW_PLAYING_LABEL" = "البرنامج الذي يكون مشغل صوت"; 2 | "WHITELIST_HEADER" = "القائمة البيضاء"; 3 | "ALL_APPS_HEADER" = "البرامج"; 4 | "LOADING_TEXT" = "التحميل..."; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/it.lproj/abwhitelist.strings: -------------------------------------------------------------------------------- 1 | "NOW_PLAYING_LABEL" = "Applicazione in Riproduzione"; 2 | "WHITELIST_HEADER" = "Whitelist"; 3 | "ALL_APPS_HEADER" = "Applicazioni"; 4 | "LOADING_TEXT" = "Caricamento..."; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/ru.lproj/abwhitelist.strings: -------------------------------------------------------------------------------- 1 | "NOW_PLAYING_LABEL" = "Приложение, проигр. музыку"; 2 | "WHITELIST_HEADER" = "В Белом списке:"; 3 | "ALL_APPS_HEADER" = "Приложения"; 4 | "LOADING_TEXT" = "Загрузка..."; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/ar.lproj/appbuttonprefs.strings: -------------------------------------------------------------------------------- 1 | "FAVORITE_SECTION_LABEL" = "البرامج المفضلة"; 2 | "AESTHETICS_SECTION_LABEL" = "مظهر الزر"; 3 | "BEHAVIOR_SECTION_LABEL" = "سلوك الزر"; 4 | "ABOUT_SECTION_LABEL" = "حول"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/cs.lproj/appbuttonprefs.strings: -------------------------------------------------------------------------------- 1 | "FAVORITE_SECTION_LABEL" = "Oblíbené aplikace"; 2 | "AESTHETICS_SECTION_LABEL" = "Vzhled"; 3 | "BEHAVIOR_SECTION_LABEL" = "Chování"; 4 | "ABOUT_SECTION_LABEL" = "Informace"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/en.lproj/appbuttonprefs.strings: -------------------------------------------------------------------------------- 1 | "FAVORITE_SECTION_LABEL" = "Favorite Apps"; 2 | "AESTHETICS_SECTION_LABEL" = "Look and Feel"; 3 | "BEHAVIOR_SECTION_LABEL" = "Behavior"; 4 | "ABOUT_SECTION_LABEL" = "About"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/he.lproj/appbuttonprefs.strings: -------------------------------------------------------------------------------- 1 | "ABOUT_SECTION_LABEL" = "אודות"; 2 | "AESTHETICS_SECTION_LABEL" = "מראה והרגשה"; 3 | "BEHAVIOR_SECTION_LABEL" = "התנהגות"; 4 | "FAVORITE_SECTION_LABEL" = "אפליקציות מועדפות"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/ru.lproj/appbuttonprefs.strings: -------------------------------------------------------------------------------- 1 | "FAVORITE_SECTION_LABEL" = "Избранное"; 2 | "AESTHETICS_SECTION_LABEL" = "Внешний вид"; 3 | "BEHAVIOR_SECTION_LABEL" = "Поведение"; 4 | "ABOUT_SECTION_LABEL" = "О AppButton"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/de.lproj/appbuttonprefs.strings: -------------------------------------------------------------------------------- 1 | "FAVORITE_SECTION_LABEL" = "Favoriten"; 2 | "AESTHETICS_SECTION_LABEL" = "Aussehen und Handhabung"; 3 | "BEHAVIOR_SECTION_LABEL" = "Bedienung"; 4 | "ABOUT_SECTION_LABEL" = "Über"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/vi.lproj/abwhitelist.strings: -------------------------------------------------------------------------------- 1 | "NOW_PLAYING_LABEL" = "Các ứng dụng đang kích hoạt"; 2 | "WHITELIST_HEADER" = "Danh sách ứng dụng ưu tiên"; 3 | "ALL_APPS_HEADER" = "Các ứng dụng"; 4 | "LOADING_TEXT" = "Đang tải…"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/pt.lproj/abwhitelist.strings: -------------------------------------------------------------------------------- 1 | "NOW_PLAYING_LABEL" = "Aplicativo tocando música/vídeo"; 2 | "WHITELIST_HEADER" = "Aplicativos na Lista Branca"; 3 | "ALL_APPS_HEADER" = "Aplicativos"; 4 | "LOADING_TEXT" = "Carregando…"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/es.lproj/appbuttonprefs.strings: -------------------------------------------------------------------------------- 1 | "FAVORITE_SECTION_LABEL" = "Apps Favoritas"; 2 | "AESTHETICS_SECTION_LABEL" = "Aspecto y Sensación"; 3 | "BEHAVIOR_SECTION_LABEL" = "Comportamiento"; 4 | "ABOUT_SECTION_LABEL" = "Información"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/it.lproj/appbuttonprefs.strings: -------------------------------------------------------------------------------- 1 | "FAVORITE_SECTION_LABEL" = "Applicazioni Preferite"; 2 | "AESTHETICS_SECTION_LABEL" = "Aspetto e Estetica"; 3 | "BEHAVIOR_SECTION_LABEL" = "Comportamento"; 4 | "ABOUT_SECTION_LABEL" = "Info"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/pt.lproj/appbuttonprefs.strings: -------------------------------------------------------------------------------- 1 | "FAVORITE_SECTION_LABEL" = "Aplicativos Favoritos"; 2 | "AESTHETICS_SECTION_LABEL" = "Visual e Aspecto"; 3 | "BEHAVIOR_SECTION_LABEL" = "Comportamento"; 4 | "ABOUT_SECTION_LABEL" = "Sobre"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/pl.lproj/appbuttonprefs.strings: -------------------------------------------------------------------------------- 1 | "FAVORITE_SECTION_LABEL" = "Ulubione apki"; 2 | "AESTHETICS_SECTION_LABEL" = "Wygląd i funkcjonalność"; 3 | "BEHAVIOR_SECTION_LABEL" = "Zachowanie"; 4 | "ABOUT_SECTION_LABEL" = "O AppButtonie"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/vi.lproj/appbuttonprefs.strings: -------------------------------------------------------------------------------- 1 | "FAVORITE_SECTION_LABEL" = "Các ứng dụng được yêu thích"; 2 | "AESTHETICS_SECTION_LABEL" = "Nhìn và cảm nhận"; 3 | "BEHAVIOR_SECTION_LABEL" = "Cử chỉ"; 4 | "ABOUT_SECTION_LABEL" = "Về AppButton"; -------------------------------------------------------------------------------- /appbuttonprefs/entry.plist: -------------------------------------------------------------------------------- 1 | { 2 | entry = { 3 | bundle = appbuttonprefs; 4 | cell = PSLinkCell; 5 | detail = "appbuttonprefsListController"; 6 | icon = "appbuttonprefs.png"; 7 | isController = 1; 8 | label = AppButton; 9 | }; 10 | } -------------------------------------------------------------------------------- /appbuttonprefs/Resources/ja.lproj/abactivator.strings: -------------------------------------------------------------------------------- 1 | "ACTIVATE_APPBUTTON_LISTENER_TITLE" = "AppButton発動"; 2 | "ACTIVATE_APPBUTTON_LISTENER_DESCRIPTION" = "AppButton表示"; 3 | "EVENT_TAP_BUTTON_ONCE_TITLE" = "AppButtonタップ"; 4 | "EVENT_TAP_BUTTON_ONCE_DESCRIPTION" = "AppButtonをシングルタップ"; 5 | "EVENT_TAP_BUTTON_TWICE_TITLE" = "AppButtonダブルタップ"; 6 | "EVENT_TAP_BUTTON_TWICE_DESCRIPTION" = "AppButtonをダブルタップ"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/ko.lproj/abactivator.strings: -------------------------------------------------------------------------------- 1 | "ACTIVATE_APPBUTTON_LISTENER_TITLE" = "AppButton 활성화"; 2 | "ACTIVATE_APPBUTTON_LISTENER_DESCRIPTION" = "AppButton 화면에 표시하기"; 3 | "EVENT_TAP_BUTTON_ONCE_TITLE" = "AppButton 한 번 탭"; 4 | "EVENT_TAP_BUTTON_ONCE_DESCRIPTION" = "AppButton을 한 번 탭"; 5 | "EVENT_TAP_BUTTON_TWICE_TITLE" = "AppButton 두 번 탭"; 6 | "EVENT_TAP_BUTTON_TWICE_DESCRIPTION" = "AppButton을 두 번 탭"; -------------------------------------------------------------------------------- /control: -------------------------------------------------------------------------------- 1 | Package: com.chewmieser.appbutton 2 | Name: AppButton 3 | Depends: mobilesubstrate,preferenceloader,applist 4 | Version: 1.1.1.1 5 | Architecture: iphoneos-arm 6 | Description: Multitasking at your fingertips 7 | Maintainer: Steven Rolfe 8 | Author: Steven Rolfe 9 | Section: Tweaks 10 | Depiction: http://apt.steverolfe.com/depiction/appbutton.html 11 | -------------------------------------------------------------------------------- /appbuttonprefs/ABLookAndFeelController.m: -------------------------------------------------------------------------------- 1 | #import "prefs-common.h" 2 | 3 | @interface ABLookAndFeelController: PSListController { 4 | } 5 | @end 6 | 7 | @implementation ABLookAndFeelController 8 | - (id)specifiers { 9 | if(_specifiers == nil) { 10 | _specifiers = [self loadSpecifiersFromPlistName:@"abaesthetics" target:self]; 11 | } 12 | return _specifiers; 13 | } 14 | @end 15 | 16 | // vim:ft=objc 17 | -------------------------------------------------------------------------------- /appbuttonprefs/Resources/ar.lproj/abactivator.strings: -------------------------------------------------------------------------------- 1 | "ACTIVATE_APPBUTTON_LISTENER_TITLE" = "تفعيل الزر"; 2 | "ACTIVATE_APPBUTTON_LISTENER_DESCRIPTION" = "جعل الزر مرئي."; 3 | "EVENT_TAP_BUTTON_ONCE_TITLE" = "نقرة واحدة على الزر"; 4 | "EVENT_TAP_BUTTON_ONCE_DESCRIPTION" = "انقر مرة واحدة على الزر."; 5 | "EVENT_TAP_BUTTON_TWICE_TITLE" = "نقرتين على الزر"; 6 | "EVENT_TAP_BUTTON_TWICE_DESCRIPTION" = "إنقر مرتين على الزر."; -------------------------------------------------------------------------------- /appbuttonprefs/appbuttonprefs.mm: -------------------------------------------------------------------------------- 1 | #import "prefs-common.h" 2 | 3 | @interface appbuttonprefsListController: PSListController { 4 | } 5 | @end 6 | 7 | @implementation appbuttonprefsListController 8 | - (id)specifiers { 9 | if(_specifiers == nil) { 10 | _specifiers = [self loadSpecifiersFromPlistName:@"appbuttonprefs" target:self]; 11 | } 12 | return _specifiers; 13 | } 14 | @end 15 | 16 | // vim:ft=objc 17 | -------------------------------------------------------------------------------- /appbuttonprefs/Resources/en.lproj/abactivator.strings: -------------------------------------------------------------------------------- 1 | "ACTIVATE_APPBUTTON_LISTENER_TITLE" = "Activate AppButton"; 2 | "ACTIVATE_APPBUTTON_LISTENER_DESCRIPTION" = "Make AppButton visible"; 3 | "EVENT_TAP_BUTTON_ONCE_TITLE" = "AppButton Tap"; 4 | "EVENT_TAP_BUTTON_ONCE_DESCRIPTION" = "Single tap on AppButton"; 5 | "EVENT_TAP_BUTTON_TWICE_TITLE" = "AppButton Double Tap"; 6 | "EVENT_TAP_BUTTON_TWICE_DESCRIPTION" = "Double tap on AppButton"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/es.lproj/abactivator.strings: -------------------------------------------------------------------------------- 1 | "ACTIVATE_APPBUTTON_LISTENER_TITLE" = "Activar AppButton"; 2 | "ACTIVATE_APPBUTTON_LISTENER_DESCRIPTION" = "Hacer visible AppButton"; 3 | "EVENT_TAP_BUTTON_ONCE_TITLE" = "Toque AppButton"; 4 | "EVENT_TAP_BUTTON_ONCE_DESCRIPTION" = "Un toque en AppButton"; 5 | "EVENT_TAP_BUTTON_TWICE_TITLE" = "Doble Toque AppButton"; 6 | "EVENT_TAP_BUTTON_TWICE_DESCRIPTION" = "Doble toque en AppButton"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/he.lproj/abactivator.strings: -------------------------------------------------------------------------------- 1 | "ACTIVATE_APPBUTTON_LISTENER_DESCRIPTION" = "הפוך את AppButton לנראה"; 2 | "ACTIVATE_APPBUTTON_LISTENER_TITLE" = "הפעל את AppButton"; 3 | "EVENT_TAP_BUTTON_ONCE_DESCRIPTION" = "הקשה על AppButton"; 4 | "EVENT_TAP_BUTTON_ONCE_TITLE" = "AppButton הקשה על"; 5 | "EVENT_TAP_BUTTON_TWICE_DESCRIPTION" = "הקש פעמיים על AppButton"; 6 | "EVENT_TAP_BUTTON_TWICE_TITLE" = "AppButton הקשה כפולה על"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/da.lproj/abactivator.strings: -------------------------------------------------------------------------------- 1 | "ACTIVATE_APPBUTTON_LISTENER_TITLE" = "Activer AppButton"; 2 | "ACTIVATE_APPBUTTON_LISTENER_DESCRIPTION" = "Gør AppButton synlig"; 3 | "EVENT_TAP_BUTTON_ONCE_TITLE" = "AppButton enkelt tryk"; 4 | "EVENT_TAP_BUTTON_ONCE_DESCRIPTION" = "Enkelt tryk på AppButton"; 5 | "EVENT_TAP_BUTTON_TWICE_TITLE" = "AppButton Dobbelttryk"; 6 | "EVENT_TAP_BUTTON_TWICE_DESCRIPTION" = "Dobbelttryk på AppButton"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/pt.lproj/abactivator.strings: -------------------------------------------------------------------------------- 1 | "ACTIVATE_APPBUTTON_LISTENER_TITLE" = "Ativar AppButton"; 2 | "ACTIVATE_APPBUTTON_LISTENER_DESCRIPTION" = "Deixar AppButton visível"; 3 | "EVENT_TAP_BUTTON_ONCE_TITLE" = "AppButton Toque Único"; 4 | "EVENT_TAP_BUTTON_ONCE_DESCRIPTION" = "Dê um toque no AppButton"; 5 | "EVENT_TAP_BUTTON_TWICE_TITLE" = "AppButton Toque Duplo"; 6 | "EVENT_TAP_BUTTON_TWICE_DESCRIPTION" = "Dê dois toques no AppButton"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/it.lproj/abactivator.strings: -------------------------------------------------------------------------------- 1 | "ACTIVATE_APPBUTTON_LISTENER_TITLE" = "Attiva AppButton"; 2 | "ACTIVATE_APPBUTTON_LISTENER_DESCRIPTION" = "Rendi AppButton visibile"; 3 | "EVENT_TAP_BUTTON_ONCE_TITLE" = "Tocco di AppButton"; 4 | "EVENT_TAP_BUTTON_ONCE_DESCRIPTION" = "Singolo Tocco di AppButton"; 5 | "EVENT_TAP_BUTTON_TWICE_TITLE" = "Doppio Tocco di AppButton"; 6 | "EVENT_TAP_BUTTON_TWICE_DESCRIPTION" = "Doppio Toppo di AppButton"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/vi.lproj/abactivator.strings: -------------------------------------------------------------------------------- 1 | "ACTIVATE_APPBUTTON_LISTENER_TITLE" = "Kích hoạt AppButton"; 2 | "ACTIVATE_APPBUTTON_LISTENER_DESCRIPTION" = "Thiết lập để AppButton hiển thị"; 3 | "EVENT_TAP_BUTTON_ONCE_TITLE" = "AppButton chạm 1 lần"; 4 | "EVENT_TAP_BUTTON_ONCE_DESCRIPTION" = "Chạm 1 lần lên AppButton"; 5 | "EVENT_TAP_BUTTON_TWICE_TITLE" = "AppButton chạm 2 lần"; 6 | "EVENT_TAP_BUTTON_TWICE_DESCRIPTION" = "Chạm 2 lần lên AppButton"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/cs.lproj/abactivator.strings: -------------------------------------------------------------------------------- 1 | "ACTIVATE_APPBUTTON_LISTENER_TITLE" = "Zapnout AppButton"; 2 | "ACTIVATE_APPBUTTON_LISTENER_DESCRIPTION" = "Viditelnost AppButtonu"; 3 | "EVENT_TAP_BUTTON_ONCE_TITLE" = "Ťuknutí na AppButton"; 4 | "EVENT_TAP_BUTTON_ONCE_DESCRIPTION" = "Jedno ťuknutí na AppButton"; 5 | "EVENT_TAP_BUTTON_TWICE_TITLE" = "Dvojité ťuknutí na AppButton"; 6 | "EVENT_TAP_BUTTON_TWICE_DESCRIPTION" = "Dvojité ťuknutí na AppButton"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/de.lproj/abactivator.strings: -------------------------------------------------------------------------------- 1 | "ACTIVATE_APPBUTTON_LISTENER_TITLE" = "Aktiviere den AppButton"; 2 | "ACTIVATE_APPBUTTON_LISTENER_DESCRIPTION" = "Den AppButton sichtbar machen"; 3 | "EVENT_TAP_BUTTON_ONCE_TITLE" = "AppButton einzeln drücken"; 4 | "EVENT_TAP_BUTTON_ONCE_DESCRIPTION" = "Den AppButton einmal drücken"; 5 | "EVENT_TAP_BUTTON_TWICE_TITLE" = "AppButton zweifach drücken"; 6 | "EVENT_TAP_BUTTON_TWICE_DESCRIPTION" = "Den AppButton zweimal drücken"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/pl.lproj/abactivator.strings: -------------------------------------------------------------------------------- 1 | "ACTIVATE_APPBUTTON_LISTENER_TITLE" = "Aktywuj AppButtona"; 2 | "ACTIVATE_APPBUTTON_LISTENER_DESCRIPTION" = "Spraw, by AppButton był widoczny"; 3 | "EVENT_TAP_BUTTON_ONCE_TITLE" = "Dotknięcie AppButtona"; 4 | "EVENT_TAP_BUTTON_ONCE_DESCRIPTION" = "Pojedyncze tapnięcie w AppButtona"; 5 | "EVENT_TAP_BUTTON_TWICE_TITLE" = "Podwójne dotknięcie AppButtona"; 6 | "EVENT_TAP_BUTTON_TWICE_DESCRIPTION" = "Podwójne tapnięcie w AppButtona"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/ru.lproj/abactivator.strings: -------------------------------------------------------------------------------- 1 | "ACTIVATE_APPBUTTON_LISTENER_TITLE" = "Активировать AppButton"; 2 | "ACTIVATE_APPBUTTON_LISTENER_DESCRIPTION" = "Сделать AppButton видимым"; 3 | "EVENT_TAP_BUTTON_ONCE_TITLE" = "Нажатие на AppButton"; 4 | "EVENT_TAP_BUTTON_ONCE_DESCRIPTION" = "Осуществите одиночное нажатие на AppButton"; 5 | "EVENT_TAP_BUTTON_TWICE_TITLE" = "Двойное нажатие на AppButton"; 6 | "EVENT_TAP_BUTTON_TWICE_DESCRIPTION" = "Осуществите двойное нажатие на AppButton"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/ko.lproj/ababout.strings: -------------------------------------------------------------------------------- 1 | "ABOUT_TEXT" = "AppButton 1.0 by Steven Rolfe 2 | 3 | 멀티태스킹 트레이 활성화 각도를 설정하려면, 이전 설정 페이지에서 AppButton 관련 설정들을 이용하십시오. 즐겨찾기 트레이는 반대 각도로 사용합니다. 4 | 5 | 이 환경 설정 창은 SAMultisectorControl로 허가된 MIT로 만듭니다. 전체 라이선스 텍스트는 GitHub에서 사용할 수 있습니다."; 6 | "TWEET_ME_LABEL" = "Twitter @chewmieser"; 7 | "EMAIL_ME_LABEL" = "Email 주세요."; 8 | "RESET_FOOTER" = "모든 설정 초기화 및 AppButton 위치를 초기화합니다."; 9 | "RESET_LABEL" = "AppButton 초기화"; 10 | "ABOUT_SECTION_LABEL" = "정보"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/he.lproj/ababout.strings: -------------------------------------------------------------------------------- 1 | "ABOUT_SECTION_LABEL" = "אודות"; 2 | "ABOUT_TEXT" = "AppButton בטא 1.0, פותח על ידי Steven Rolfe 3 | 4 | 5 | כדי להגדיר את זוויות ההפעלה של מגש המולטיטסקינג, השתמש בידיות המקיפות את AppButton בדף ההגדרות הקודם. מגש המועדפים משתמשם בזוויות ההפוכות. 6 | 7 | דף ההגדרות הזה משתמש בMIT licensed SAMultisectorControl. רישיון מלא זמין בGitHub."; 8 | "EMAIL_ME_LABEL" = "שלח לי דוא״ל"; 9 | "RESET_FOOTER" = "מאתחל את כל ההגדרות ומזיז את הכפתור למיקומו המקורי."; 10 | "RESET_LABEL" = "אתחל כפתור"; 11 | "TWEET_ME_LABEL" = "Twitter @chewmieser"; -------------------------------------------------------------------------------- /appbuttonprefs/ABSwitchTableCell.m: -------------------------------------------------------------------------------- 1 | #import "prefs-common.h" 2 | 3 | @interface ABSwitchTableCell : PSSwitchTableCell //our class 4 | @end 5 | 6 | @implementation ABSwitchTableCell 7 | 8 | -(id)initWithStyle:(int)arg1 reuseIdentifier:(id)arg2 specifier:(id)arg3 { //init method 9 | self = [super initWithStyle:arg1 reuseIdentifier:arg2 specifier:arg3]; //call the super init method 10 | if (self) { 11 | [((UISwitch *)[self control]) setOnTintColor:[UIColor colorWithHue:0.58 saturation:1 brightness:0.96 alpha:1]]; //change the switch color 12 | } 13 | return self; 14 | } 15 | 16 | @end -------------------------------------------------------------------------------- /appbuttonprefs/Resources/ja.lproj/ababout.strings: -------------------------------------------------------------------------------- 1 | "ABOUT_TEXT" = "AppButton 1.0 by Steven Rolfe 2 | 3 | To set the multitasking tray activation angles, use the handles surrounding the AppButton in the previous settings page. The favorites tray uses the opposite angles. 4 | 5 | This preference pane makes use of the MIT licensed SAMultisectorControl. Full license text is available on GitHub."; 6 | "TWEET_ME_LABEL" = "Twitter @chewmieser"; 7 | "EMAIL_ME_LABEL" = "メールでお問い合わせ"; 8 | "RESET_FOOTER" = "すべての設定を初期化し、ボタンをデフォルトの位置に戻す。"; 9 | "RESET_LABEL" = "リセットボタン"; 10 | "ABOUT_SECTION_LABEL" = "詳細"; -------------------------------------------------------------------------------- /appbuttonprefs/ABSliderTableCell.m: -------------------------------------------------------------------------------- 1 | #import "prefs-common.h" 2 | 3 | @interface ABSliderTableCell : PSSliderTableCell //our class 4 | @end 5 | 6 | @implementation ABSliderTableCell 7 | 8 | -(id)initWithStyle:(int)arg1 reuseIdentifier:(id)arg2 specifier:(id)arg3 { //init method 9 | self = [super initWithStyle:arg1 reuseIdentifier:arg2 specifier:arg3]; //call the super init method 10 | if (self) { 11 | [((UISlider *)[self control]) setMinimumTrackTintColor:[UIColor colorWithHue:0.58 saturation:1 brightness:0.96 alpha:1]]; //change the switch color 12 | } 13 | return self; 14 | } 15 | 16 | @end -------------------------------------------------------------------------------- /appbuttonprefs/ABSegmentTableCell.m: -------------------------------------------------------------------------------- 1 | #import "prefs-common.h" 2 | 3 | @interface ABSegmentTableCell : PSSegmentTableCell //our class 4 | @end 5 | 6 | @implementation ABSegmentTableCell 7 | 8 | -(id)initWithStyle:(int)arg1 reuseIdentifier:(id)arg2 specifier:(id)arg3 { //init method 9 | self = [super initWithStyle:arg1 reuseIdentifier:arg2 specifier:arg3]; //call the super init method 10 | if (self) { 11 | [((UISegmentedControl *)[self control]) setTintColor:[UIColor colorWithHue:0.58 saturation:1 brightness:0.96 alpha:1]]; //change the switch color 12 | } 13 | return self; 14 | } 15 | 16 | @end -------------------------------------------------------------------------------- /appbuttonprefs/Resources/en.lproj/ababout.strings: -------------------------------------------------------------------------------- 1 | "ABOUT_TEXT" = "AppButton 1.0 by Steven Rolfe 2 | 3 | To set the multitasking tray activation angles, use the handles surrounding the AppButton in the previous settings page. The favorites tray uses the opposite angles. 4 | 5 | This preference pane makes use of the MIT licensed SAMultisectorControl. Full license text is available on GitHub."; 6 | "TWEET_ME_LABEL" = "Twitter @chewmieser"; 7 | "EMAIL_ME_LABEL" = "Email Me"; 8 | "RESET_FOOTER" = "Resets all settings and moves the button to its original location."; 9 | "RESET_LABEL" = "Reset Button"; 10 | "ABOUT_SECTION_LABEL" = "About"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/pl.lproj/ababout.strings: -------------------------------------------------------------------------------- 1 | "ABOUT_TEXT" = "AppButton Beta 1.0 autorstwa Stevena Rolfe'a 2 | 3 | Aby ustawić kąty aktywacji zasobnika użyj kropek dookoła guzika na poprzedniej stronie ustawień. Zasobnik ulubionych apek używa przeciwnych kątów. 4 | 5 | W programie użyto SAMultisectorControl dostępnego na licencji MIT. Pełny tekst licencji dostępny jest na GitHubie."; 6 | "TWEET_ME_LABEL" = "@chewmieser na Twitterze"; 7 | "EMAIL_ME_LABEL" = "Wyślij mi e-maila"; 8 | "RESET_FOOTER" = "Przywraca ustawienia domyślne i położenie przycisku."; 9 | "RESET_LABEL" = "Przycisk reset"; 10 | "ABOUT_SECTION_LABEL" = "O AppButtonie"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/ar.lproj/ababout.strings: -------------------------------------------------------------------------------- 1 | "ABOUT_TEXT" = "AppButton Beta 1.0 by Steven Rolfe 2 | 3 | To set the multitasking tray activation angles, use the handles surrounding the AppButton in the previous settings page. The favorites tray uses the opposite angles. 4 | 5 | This preference pane makes use of the MIT licensed SAMultisectorControl. Full license text is available on GitHub."; 6 | "TWEET_ME_LABEL" = "راسلوني عبر التويتر @chewmieser"; 7 | "EMAIL_ME_LABEL" = "إرسال بريد إلكتروني"; 8 | "RESET_FOOTER" = "إعادة تعيين جميع الإعدادات ونقل الزر الى مكانهِ الإفتراضي."; 9 | "RESET_LABEL" = "إعادة تعيين الزر"; 10 | "ABOUT_SECTION_LABEL" = "حول"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/da.lproj/ababout.strings: -------------------------------------------------------------------------------- 1 | "ABOUT_TEXT" = "AppButton Beta 1.0 by Steven Rolfe 2 | 3 | For at indstille multitasking-bakkens vinkler, anvendes de greb der er rundt om AppButton på den forrige side. Bakken med favoritter benytter de modsatte vinkler. 4 | 5 | Dette indstillingspanel er det MIT licenserede SAMultisectorControl. Den fulde licenstekst er tilgængelig på GitHub."; 6 | "TWEET_ME_LABEL" = "Twitter @chewmieser"; 7 | "EMAIL_ME_LABEL" = "Send mig en e-mail"; 8 | "RESET_FOOTER" = "Gendanner alle indstillinger og flytter knappen tilbage til den oprindelige plads."; 9 | "RESET_LABEL" = "Gendan"; 10 | "ABOUT_SECTION_LABEL" = "Om"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/vi.lproj/ababout.strings: -------------------------------------------------------------------------------- 1 | "ABOUT_TEXT" = "AppButton Beta 1.0 được tạo bởi Steven Rolfe 2 | 3 | Để thiết lập các góc độ kích hoạt khay đa nhiệm, sử dụng các xử lý xung quanh các AppButton trong trang cài đặt trước đó. Khay yêu thích sử dụng các góc đối diện. 4 | 5 | Khung điều chỉnh này sử dụng MIT bản quyền của SAMultisectorControl. Bản quyền đầy đủ có sẵn trên GitHub"; 6 | "TWEET_ME_LABEL" = "Twitter của tôi @chewmieser"; 7 | "EMAIL_ME_LABEL" = "Email của tôi"; 8 | "RESET_FOOTER" = "Đặt lại tất cả các cài đặt và di chuyển các nút đến vị trí ban đầu của nó"; 9 | "RESET_LABEL" = "Cài đặt lại nút"; 10 | "ABOUT_SECTION_LABEL" = "Về AppButton"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/ja.lproj/abaesthetics.strings: -------------------------------------------------------------------------------- 1 | "BLACK_BUTTON_FOOTER" = "レスティングボタンを白か黒に切り替える。"; 2 | "BLACK_BUTTON_LABEL" = "黒いボタン"; 3 | "BLACK_TRAY_FOOTER" = "オープントレーを知ろか黒に切り替える。"; 4 | "BLACK_TRAY_LABEL" = "黒いトレー"; 5 | "RESTING_ALPHA_FOOTER" = "レスティング中AppButtonの透明度の設定。"; 6 | "ACTIVE_ALPHA_FOOTER" = "発動中のAppButtonの透明度の設定。"; 7 | "ENABLE_BORDER_FOOTER" = "AppButtonの周りの小さな枠を有効にする。"; 8 | "ENABLE_BORDER_LABEL" = "枠を有効にする。"; 9 | "ENABLE_BLUR_FOOTER" = "ボタンとトレーのブラーエフェクトを有効にする。"; 10 | "ENABLE_BLUR_LABEL" = "ブラーエフェクト有効"; 11 | "HIGHLIGHT_APP_FOOTER" = "周辺のアイコンをフェードし、トレーを閉じた時に開くアプリをハイライトする。"; 12 | "HIGHLIGHT_APP_LABEL" = "選択したアプリをハイライト"; 13 | "AESTHETICS_SECTION_LABEL" = "外観"; -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | export ARCHS = armv7 armv7s arm64 2 | export ADDITIONAL_OBJCFLAGS = -fobjc-arc 3 | 4 | #PACKAGE_VERSION = $(THEOS_PACKAGE_BASE_VERSION) 5 | 6 | include theos/makefiles/common.mk 7 | 8 | TWEAK_NAME = AppButton 9 | AppButton_FILES = Tweak.xm ABWindow.m ABButtonView.m UIImage+ColorAtPixel.m 10 | AppButton_FRAMEWORKS = UIKit CoreGraphics QuartzCore 11 | AppButton_LDFLAGS = -weak_library theos/lib/libactivator.dylib 12 | AppButton_PRIVATE_FRAMEWORKS = BackBoardServices 13 | 14 | include $(THEOS_MAKE_PATH)/tweak.mk 15 | 16 | after-install:: 17 | install.exec "killall -9 SpringBoard" 18 | SUBPROJECTS += appbuttonprefs 19 | include $(THEOS_MAKE_PATH)/aggregate.mk 20 | -------------------------------------------------------------------------------- /appbuttonprefs/Resources/cs.lproj/ababout.strings: -------------------------------------------------------------------------------- 1 | "ABOUT_TEXT" = "AppButton Beta 1.0 od Stevena Rolfa 2 | 3 | Pro nastavení úhlů pro lištu multitasklingu použijte nastavovací jezdce obklopující AppButton na předchozí stránce. Lišta oblíbených používá úhly opačné. 4 | 5 | Toto okno nastavení používá SAMultisectorControl, které je licencováno pod licencí MIT. Celý text licence je dostupný na stránce GitHub."; 6 | "TWEET_ME_LABEL" = "Twitter @chewmieser"; 7 | "EMAIL_ME_LABEL" = "Napište mi email"; 8 | "RESET_FOOTER" = "Resetuje veškerá nastavení a přemístí AppButton zpět na jeho původní místo."; 9 | "RESET_LABEL" = "Resetovat tlačítko"; 10 | "ABOUT_SECTION_LABEL" = "Informace"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/pt.lproj/ababout.strings: -------------------------------------------------------------------------------- 1 | "ABOUT_TEXT" = "AppButton Beta 1.0 por Steven Rolfe 2 | 3 | Para ajustar o ângulo de ativação da bandeja multitarefas, use as abas ao redor do AppButton na página de configurações anterior. A bandeja dos favoritos usa os ângulos opostos. 4 | 5 | Esse painel de preferências faz uso do SAMultisectorControl licenciado pelo MIT. A licença completa está disponível no GitHub."; 6 | "TWEET_ME_LABEL" = "Twitter @chewmieser"; 7 | "EMAIL_ME_LABEL" = "Mande-me um Email"; 8 | "RESET_FOOTER" = "Redefine todas as configurações e move o botão para sua posição original."; 9 | "RESET_LABEL" = "Botão de redefinir"; 10 | "ABOUT_SECTION_LABEL" = "Sobre"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/ru.lproj/ababout.strings: -------------------------------------------------------------------------------- 1 | "ABOUT_TEXT" = "AppButton by Steven Rolfe, Бета-версия 1.0 2 | 3 | Для установки углов открытия панели мультизадачности, используйте рычажки, окружающие логотип AppButton на предыдущем экране. Панель избранного использует обратные углы. 4 | 5 | Данное меню использует SAMultisectorControl под лицензией MIT. Полный текст лицензии доступен для ознакомления на GitHub."; 6 | "TWEET_ME_LABEL" = "Твиттер @chewmieser"; 7 | "EMAIL_ME_LABEL" = "Написать E-mail разработчику"; 8 | "RESET_FOOTER" = "Сбрасывает все настройки и перемещает AppButton в начальное положение."; 9 | "RESET_LABEL" = "Сброс настроек"; 10 | "ABOUT_SECTION_LABEL" = "О AppButton"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/es.lproj/ababout.strings: -------------------------------------------------------------------------------- 1 | "ABOUT_TEXT" = "AppButton Beta 1.0 por Steven Rolfe\n \nPara establecer los ángulos de activación de la bandeja multitareas, usa las manijas que rodean el botón AppButton en la pantalla anterior. La bandeja de favoritos usa los ángulos opuestos.\n \nEste panel de preferencias hace uso de SAMultisectorControl bajo la licencia MIT. El texto completo de la licencia está disponible en GitHub."; 2 | "TWEET_ME_LABEL" = "Twitter @chewmieser"; 3 | "EMAIL_ME_LABEL" = "Envíame un Email"; 4 | "RESET_FOOTER" = "Restablece todas las configuraciones y mueve el botón a su posición original."; 5 | "RESET_LABEL" = "Restablecer"; 6 | "ABOUT_SECTION_LABEL" = "Información"; -------------------------------------------------------------------------------- /appbuttonprefs/SAMath.h: -------------------------------------------------------------------------------- 1 | // 2 | // Common.h 3 | // CustomControl 4 | // 5 | // Created by Snipter on 12/31/13. 6 | // Copyright (c) 2013 SmartAppStudio. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | typedef struct{ 12 | double radius; 13 | double angle; 14 | } SAPolarCoordinate; 15 | 16 | CGFloat toDegrees (CGFloat radians); 17 | CGFloat toRadians (CGFloat degrees); 18 | 19 | CGFloat segmentAngle (CGPoint startPoint, CGPoint endPoint); 20 | CGFloat segmentLength(CGPoint startPoint, CGPoint endPoint); 21 | 22 | CGPoint polarToDecart(CGPoint startPoint, CGFloat radius, CGFloat angle); 23 | SAPolarCoordinate decartToPolar(CGPoint center, CGPoint point); 24 | -------------------------------------------------------------------------------- /appbuttonprefs/Resources/ko.lproj/abaesthetics.strings: -------------------------------------------------------------------------------- 1 | "BLACK_BUTTON_FOOTER" = "버튼 색상을 화이트나 블랙으로 변경합니다."; 2 | "BLACK_BUTTON_LABEL" = "블랙 버튼"; 3 | "BLACK_TRAY_FOOTER" = "트레이의 색상을 화이트나 블랙으로 변경합니다."; 4 | "BLACK_TRAY_LABEL" = "블랙 트레이"; 5 | "RESTING_ALPHA_FOOTER" = "평상시의 AppButton의 투명도를 조절합니다."; 6 | "ACTIVE_ALPHA_FOOTER" = "활성화시의 AppButton의 투명도를 조절합니다."; 7 | "ENABLE_BORDER_FOOTER" = "AppButton의 테두리를 구분선으로 표시합니다."; 8 | "ENABLE_BORDER_LABEL" = "테두리 사용"; 9 | "ENABLE_BLUR_FOOTER" = "버튼과 트레이에 블러효과를 사용합니다."; 10 | "ENABLE_BLUR_LABEL" = "블러효과 사용"; 11 | "HIGHLIGHT_APP_FOOTER" = "선택한 App 주위 아이콘은 어두워지고 트레이가 닫히면서 강조된 아이콘으로 실행합니다."; 12 | "HIGHLIGHT_APP_LABEL" = "선택한 App 강조"; 13 | "AESTHETICS_SECTION_LABEL" = "모양과 느낌"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/it.lproj/ababout.strings: -------------------------------------------------------------------------------- 1 | "ABOUT_TEXT" = "AppButton Beta 1.0 da Steven Rolfe 2 | 3 | Per impostare gli angoli di attivazione del vassoio del multitasking usa le maniglie intorno ad AppButton nella pagina delle impostazioni precedente. La visualizzazione dei preferiti usa gli angoli opposti. 4 | Questo pannello delle impostazioni fa utilizzo del SAMultisectorControl patentato dal MIT. Il testo completo della licenza è disponibile su GitHub."; 5 | "TWEET_ME_LABEL" = "Twitter @chewmieser"; 6 | "EMAIL_ME_LABEL" = "Scrivimi una mail"; 7 | "RESET_FOOTER" = "Resetta tutte le impostazioni e muovi il bottone alla sua posizione originale."; 8 | "RESET_LABEL" = "Resetta il buttone"; 9 | "ABOUT_SECTION_LABEL" = "Info"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/ar.lproj/abaesthetics.strings: -------------------------------------------------------------------------------- 1 | "BLACK_BUTTON_FOOTER" = "تغيير لون الزر من الأبيض إلى الأسود."; 2 | "BLACK_BUTTON_LABEL" = "اللون الأسود للزر"; 3 | "BLACK_TRAY_FOOTER" = "تغيير لون الشريط من الأبيض إلى الأسود."; 4 | "BLACK_TRAY_LABEL" = "اللون الأسود للشريط"; 5 | "RESTING_ALPHA_FOOTER" = "شفافية الزر."; 6 | "ACTIVE_ALPHA_FOOTER" = "شفافية الشريط."; 7 | "ENABLE_BORDER_FOOTER" = "تفعيل الإطار حول الزر."; 8 | "ENABLE_BORDER_LABEL" = "تفعيل الإطار"; 9 | "ENABLE_BLUR_FOOTER" = "تفعيل الوضوح للزر والشريط."; 10 | "ENABLE_BLUR_LABEL" = "تفعيل الوضوح"; 11 | "HIGHLIGHT_APP_FOOTER" = "جعل البرنامج المختار غامق وبقية البرامج تكون باهتة."; 12 | "HIGHLIGHT_APP_LABEL" = "جعل البرنامج المختار غامق"; 13 | "AESTHETICS_SECTION_LABEL" = "مظهر الزر"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/de.lproj/ababout.strings: -------------------------------------------------------------------------------- 1 | "ABOUT_TEXT" = "AppButton Beta 1.0 von Steven Rolfe 2 | 3 | Um die Aktivierungswinkel der Multitasking-Ablage festzulegen, verwenden Sie in der vorherigen Einstellungsseite die Griffe um den AppButton herum. Die Ablage mit den ausgewählten Favoriten verwendet den entgegengesetzten Winkel. 4 | 5 | Dieses Einstellungsfenster nutzt das von MIT lizenzierte SAMultisectorControl. Der vollständigen Lizenztext ist auf GitHub verfügbar."; 6 | "TWEET_ME_LABEL" = "Twitter @chewmieser"; 7 | "EMAIL_ME_LABEL" = "Schreib mir eine E-Mail"; 8 | "RESET_FOOTER" = "Alle Einstellungen sowie den AppButton auf seine ursprüngliche Position zurücksetzen"; 9 | "RESET_LABEL" = "Reset-Taste"; 10 | "ABOUT_SECTION_LABEL" = "Über"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/he.lproj/abaesthetics.strings: -------------------------------------------------------------------------------- 1 | "ACTIVE_ALPHA_FOOTER" = "השקיפות המוחלת על AppButton פעיל."; 2 | "AESTHETICS_SECTION_LABEL" = "מראה והרגשה"; 3 | "BLACK_BUTTON_FOOTER" = "משנה את הכפתור הנח בין לבן לשחור."; 4 | "BLACK_BUTTON_LABEL" = "כפתור שחור"; 5 | "BLACK_TRAY_FOOTER" = "משנה את המגש הפתוח בין לבן לשחור."; 6 | "BLACK_TRAY_LABEL" = "מגש שחור"; 7 | "ENABLE_BLUR_FOOTER" = "מאפשר טשטוש על הכפתור והמגש"; 8 | "ENABLE_BLUR_LABEL" = "אפשר טשטוש"; 9 | "ENABLE_BORDER_FOOTER" = "מאפשר את הגבול הקטן מסביב לAppButton."; 10 | "ENABLE_BORDER_LABEL" = "אפשר גבול"; 11 | "HIGHLIGHT_APP_FOOTER" = "מדהה אפליקציות סובבות ומדגיש את האפליקציה שתיפתח כשהמגש ייסגר."; 12 | "HIGHLIGHT_APP_LABEL" = "הדגש אפליקציה נבחרת."; 13 | "RESTING_ALPHA_FOOTER" = " השקיפות המוחלת על AppButton נח."; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/zh-Hant.lproj/abactivator.strings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ACTIVATE_APPBUTTON_LISTENER_DESCRIPTION 6 | 讓 AppButton 可見 7 | ACTIVATE_APPBUTTON_LISTENER_TITLE 8 | 啟動 AppButton 9 | EVENT_TAP_BUTTON_ONCE_DESCRIPTION 10 | 單擊在 AppButton 11 | EVENT_TAP_BUTTON_ONCE_TITLE 12 | AppButton 點擊 13 | EVENT_TAP_BUTTON_TWICE_DESCRIPTION 14 | 雙擊在 AppButton 15 | EVENT_TAP_BUTTON_TWICE_TITLE 16 | AppButton 雙擊 17 | 18 | 19 | -------------------------------------------------------------------------------- /appbuttonprefs/Resources/zh-Hant.lproj/ababout.strings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ABOUT_SECTION_LABEL 6 | 關於 7 | ABOUT_TEXT 8 | AppButton Beta 1.0 by Steven Rolfe 9 | 10 | 在前面的設定頁面,使用AppButton周圍的手柄來設定多重作業啟動托盤角度。收藏夾托盤要使用對面角度。 11 | 12 | 偏好設定面板使用了MIT許可的SAMultisectorControl授權文本可在GitHub上找到。 13 | EMAIL_ME_LABEL 14 | Email我 15 | RESET_FOOTER 16 | 重置所有的設定到其原始位置 17 | RESET_LABEL 18 | 重置按鈕 19 | TWEET_ME_LABEL 20 | Twitter @chewmieser 21 | 22 | 23 | -------------------------------------------------------------------------------- /appbuttonprefs/Resources/cs.lproj/abaesthetics.strings: -------------------------------------------------------------------------------- 1 | "BLACK_BUTTON_FOOTER" = "Mění barvu tlačítka mezi černou a bílou."; 2 | "BLACK_BUTTON_LABEL" = "Černé tlačítko"; 3 | "BLACK_TRAY_FOOTER" = "Mění barvu lišty mezi černou a bílou."; 4 | "BLACK_TRAY_LABEL" = "Černá lišta"; 5 | "RESTING_ALPHA_FOOTER" = "Průhlednost AppButtonu, když není používán."; 6 | "ACTIVE_ALPHA_FOOTER" = "Průhlednost aktivního AppButtonu."; 7 | "ENABLE_BORDER_FOOTER" = "Zobrazí kolem AppButtonu tenký okraj."; 8 | "ENABLE_BORDER_LABEL" = "Zapnout okraje"; 9 | "ENABLE_BLUR_FOOTER" = "Zapne rozmazání u lišty i tlačítka."; 10 | "ENABLE_BLUR_LABEL" = "Zapnout rozmazání"; 11 | "HIGHLIGHT_APP_FOOTER" = "Zvýrazní aplikaci, která se po zavření lišty otevře."; 12 | "HIGHLIGHT_APP_LABEL" = "Zvýraznit vybranou aplikaci"; 13 | "AESTHETICS_SECTION_LABEL" = "Vzhled"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/da.lproj/abaesthetics.strings: -------------------------------------------------------------------------------- 1 | "BLACK_BUTTON_FOOTER" = "Ændrer hvilkeknappen i mellem sort og hvid."; 2 | "BLACK_BUTTON_LABEL" = "Sort knap"; 3 | "BLACK_TRAY_FOOTER" = "Ændrer den åbne bakke i mellem sort og hvid."; 4 | "BLACK_TRAY_LABEL" = "Sort bakke"; 5 | "RESTING_ALPHA_FOOTER" = "Gennemsigtighed på ventende AppButton."; 6 | "ACTIVE_ALPHA_FOOTER" = "Gennemsigtighed på aktiv AppButton."; 7 | "ENABLE_BORDER_FOOTER" = "Aktiverer en smal kant rundt om AppButton."; 8 | "ENABLE_BORDER_LABEL" = "Aktiver kant"; 9 | "ENABLE_BLUR_FOOTER" = "Aktiverer blur på knappen og bakken."; 10 | "ENABLE_BLUR_LABEL" = "Aktiver blur"; 11 | "HIGHLIGHT_APP_FOOTER" = "Fader omkringliggende ikoner og highlighter den app der åbnes når bakken lukker."; 12 | "HIGHLIGHT_APP_LABEL" = "Highlighter den valgte App"; 13 | "AESTHETICS_SECTION_LABEL" = "Udseende"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/ru.lproj/abaesthetics.strings: -------------------------------------------------------------------------------- 1 | "BLACK_BUTTON_FOOTER" = "Переключает вид неактивной AppButton между светлым и тёмным режимами."; 2 | "BLACK_BUTTON_LABEL" = "Тёмная кнопка"; 3 | "BLACK_TRAY_FOOTER" = "Переключает вид панели мультизадачности между светлым и тёмным режимами."; 4 | "BLACK_TRAY_LABEL" = "Тёмная панель"; 5 | "RESTING_ALPHA_FOOTER" = "Прозрачность неактивной AppButton."; 6 | "ACTIVE_ALPHA_FOOTER" = "Прозрачность активной AppButton."; 7 | "ENABLE_BORDER_FOOTER" = "Создает тонкую окантовку вокруг AppButton."; 8 | "ENABLE_BORDER_LABEL" = "Окантовка"; 9 | "ENABLE_BLUR_FOOTER" = "Включает размытие кнопки и панели мультизадачности."; 10 | "ENABLE_BLUR_LABEL" = "Размытие"; 11 | "HIGHLIGHT_APP_FOOTER" = "Подсвечивает выбранное приложение и затемняет остальные."; 12 | "HIGHLIGHT_APP_LABEL" = "Подсвечивать выбор"; 13 | "AESTHETICS_SECTION_LABEL" = "Внешний вид"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/es.lproj/abaesthetics.strings: -------------------------------------------------------------------------------- 1 | "BLACK_BUTTON_FOOTER" = "Cambia el botón en reposo entre blanco y negro."; 2 | "BLACK_BUTTON_LABEL" = "Botón Negro"; 3 | "BLACK_TRAY_FOOTER" = "Cambia la bandeja abierta de blanca a negra."; 4 | "BLACK_TRAY_LABEL" = "Bandeja Negra"; 5 | "RESTING_ALPHA_FOOTER" = "Transparencia de AppButton en reposo."; 6 | "ACTIVE_ALPHA_FOOTER" = "Transparencia de AppButton activo."; 7 | "ENABLE_BORDER_FOOTER" = "Muestra un pequeño borde alrededor de AppButton."; 8 | "ENABLE_BORDER_LABEL" = "Activar Borde"; 9 | "ENABLE_BLUR_FOOTER" = "Muestra un fondo borroso en el botón y en la bandeja."; 10 | "ENABLE_BLUR_LABEL" = "Activar Fondo Borroso"; 11 | "HIGHLIGHT_APP_FOOTER" = "Oscurece los iconos e ilumina la app que se lanzará al cerrarse la bandeja."; 12 | "HIGHLIGHT_APP_LABEL" = "Iluminar App Seleccionada"; 13 | "AESTHETICS_SECTION_LABEL" = "Aspecto y Sensación"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/en.lproj/abaesthetics.strings: -------------------------------------------------------------------------------- 1 | "BLACK_BUTTON_FOOTER" = "Changes the resting button between white and black."; 2 | "BLACK_BUTTON_LABEL" = "Black Button"; 3 | "BLACK_TRAY_FOOTER" = "Changes the open tray between white and black."; 4 | "BLACK_TRAY_LABEL" = "Black Tray"; 5 | "RESTING_ALPHA_FOOTER" = "The transparency applied to a resting AppButton."; 6 | "ACTIVE_ALPHA_FOOTER" = "The transparency applied to an active AppButton."; 7 | "ENABLE_BORDER_FOOTER" = "Enables the small border around AppButton."; 8 | "ENABLE_BORDER_LABEL" = "Enable Border"; 9 | "ENABLE_BLUR_FOOTER" = "Enables blurring on the button and tray."; 10 | "ENABLE_BLUR_LABEL" = "Enable Blur"; 11 | "HIGHLIGHT_APP_FOOTER" = "Fades surrounding icons and highlights the app that will launch when the tray is closed."; 12 | "HIGHLIGHT_APP_LABEL" = "Highlight Chosen App"; 13 | "AESTHETICS_SECTION_LABEL" = "Look and Feel"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/vi.lproj/abaesthetics.strings: -------------------------------------------------------------------------------- 1 | "BLACK_BUTTON_FOOTER" = "Thay đổi nút nghĩ giữa trắng và đen"; 2 | "BLACK_BUTTON_LABEL" = "Nút đen"; 3 | "BLACK_TRAY_FOOTER" = "Thay đổi khay mở giữa trắng và đen"; 4 | "BLACK_TRAY_LABEL" = "Khay đen"; 5 | "RESTING_ALPHA_FOOTER" = "Độ trong suốt được áp dụng cho AppButton ở các khoãng nghĩ"; 6 | "ACTIVE_ALPHA_FOOTER" = "Thiết lập độ trong suốt cho AppButton"; 7 | "ENABLE_BORDER_FOOTER" = "Cho phép viền bao xung quanh nút AppButton"; 8 | "ENABLE_BORDER_LABEL" = "Cho phép viền xung quanh"; 9 | "ENABLE_BLUR_FOOTER" = "Cho phép làm mờ vào nút và khay"; 10 | "ENABLE_BLUR_LABEL" = "Cho phép tính năng làm mờ"; 11 | "HIGHLIGHT_APP_FOOTER" = "Mất dần các biểu tượng xung quanh và làm nổi bật các ứng dụng sẽ được khởi động khi khay được đóng lại"; 12 | "HIGHLIGHT_APP_LABEL" = "Làm nổi bật ứng dụng đã chọn"; 13 | "AESTHETICS_SECTION_LABEL" = "Nhìn và cảm nhận"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/pl.lproj/abaesthetics.strings: -------------------------------------------------------------------------------- 1 | "BLACK_BUTTON_FOOTER" = "Zamienia kolor przycisku pomiędzy białym a czarnym."; 2 | "BLACK_BUTTON_LABEL" = "Czarny przycisk"; 3 | "BLACK_TRAY_FOOTER" = "Zamienia kolor zasobnika pomiędzy białym a czarnym."; 4 | "BLACK_TRAY_LABEL" = "Czarny zasobnik"; 5 | "RESTING_ALPHA_FOOTER" = "Przezroczystość przycisku gdy nie jest on używany."; 6 | "ACTIVE_ALPHA_FOOTER" = "Przezroczystość przycisku gdy jest on używany."; 7 | "ENABLE_BORDER_FOOTER" = "Włącza małą obwódkę dookoła przycisku."; 8 | "ENABLE_BORDER_LABEL" = "Włącz obwódkę"; 9 | "ENABLE_BLUR_FOOTER" = "Włącza rozmycie przycisku i zasobnika."; 10 | "ENABLE_BLUR_LABEL" = "Włącz rozmycie"; 11 | "HIGHLIGHT_APP_FOOTER" = "Podświetla apkę która uruchomi się po zamknięciu zasobnika oraz przyciemnia resztę."; 12 | "HIGHLIGHT_APP_LABEL" = "Podświetl wybraną apkę"; 13 | "AESTHETICS_SECTION_LABEL" = "Wygląd i funkcjonalność"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/pt.lproj/abaesthetics.strings: -------------------------------------------------------------------------------- 1 | "BLACK_BUTTON_FOOTER" = "Muda a cor do botão inativo do AppButton entre branco e preto."; 2 | "BLACK_BUTTON_LABEL" = "Botão Preto"; 3 | "BLACK_TRAY_FOOTER" = "Muda a cor da bandeja aberta entre branca e preta."; 4 | "BLACK_TRAY_LABEL" = "Bandeja Preta"; 5 | "RESTING_ALPHA_FOOTER" = "A transparência aplicada ao botão do AppButton inativo."; 6 | "ACTIVE_ALPHA_FOOTER" = "A transparência aplicada ao botão do AppButton quando ativo."; 7 | "ENABLE_BORDER_FOOTER" = "Habilita a pequena borda ao redor do botão do AppButton."; 8 | "ENABLE_BORDER_LABEL" = "Habilitar Borda"; 9 | "ENABLE_BLUR_FOOTER" = "Habilita o ofuscamento no botão e na bandeja."; 10 | "ENABLE_BLUR_LABEL" = "Habilitar ofuscamento"; 11 | "HIGHLIGHT_APP_FOOTER" = "Enfraquece os itens ao redor e destaca o aplicativo a ser aberto quando a bandeja fechar."; 12 | "HIGHLIGHT_APP_LABEL" = "Destaca o aplicativo escolhido"; 13 | "AESTHETICS_SECTION_LABEL" = "Visual e Aspecto"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/it.lproj/abaesthetics.strings: -------------------------------------------------------------------------------- 1 | "BLACK_BUTTON_FOOTER" = "Cambia il colore del bottone immobile tra bianco e nero."; 2 | "BLACK_BUTTON_LABEL" = "Buttone Nero"; 3 | "BLACK_TRAY_FOOTER" = "Cambia il colore del vassoio aperto tra bianco e nero."; 4 | "BLACK_TRAY_LABEL" = "Vassoio Nero"; 5 | "RESTING_ALPHA_FOOTER" = "La trasparenza applicata all'AppButton quando immobile."; 6 | "ACTIVE_ALPHA_FOOTER" = "La trasparenza applicata all'AppButton quando attivo."; 7 | "ENABLE_BORDER_FOOTER" = "Abilita un piccolo contorno per AppButton."; 8 | "ENABLE_BORDER_LABEL" = "Abilita il Contorno"; 9 | "ENABLE_BLUR_FOOTER" = "Abilita l'appannamento del bottone e del vassoio."; 10 | "ENABLE_BLUR_LABEL" = "Abilita l'appannamento"; 11 | "HIGHLIGHT_APP_FOOTER" = "Sbiadisci le icone intorno e evidenzia l'applicazione che verrà lanciata quando il vassoio verrà chiude."; 12 | "HIGHLIGHT_APP_LABEL" = "Evidenzia l'Applicazione Selezionata"; 13 | "AESTHETICS_SECTION_LABEL" = "Aspetto e Estetica"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/de.lproj/abaesthetics.strings: -------------------------------------------------------------------------------- 1 | "BLACK_BUTTON_FOOTER" = "Wechselt den unberührten AppButton von Weiß auf Schwarz."; 2 | "BLACK_BUTTON_LABEL" = "Schwarz-Taste"; 3 | "BLACK_TRAY_FOOTER" = "Wechselt die geöffnete Ablage von Weiß auf Schwarz."; 4 | "BLACK_TRAY_LABEL" = "Schwarze Ablage"; 5 | "RESTING_ALPHA_FOOTER" = "Regelt die Transparenz auf den unberührten AppButton."; 6 | "ACTIVE_ALPHA_FOOTER" = "Regelt die Transparenz auf den aktiven AppButton."; 7 | "ENABLE_BORDER_FOOTER" = "Aktiviert einen schmalen Rand um den AppButton."; 8 | "ENABLE_BORDER_LABEL" = "Ränder aktivieren"; 9 | "ENABLE_BLUR_FOOTER" = "Aktiviert einen Verschwommen-Effekt auf den AppButton sowie auf die Ablage."; 10 | "ENABLE_BLUR_LABEL" = "Verschwommen aktivieren"; 11 | "HIGHLIGHT_APP_FOOTER" = "Verblasst umgebende Symbole und hebt die App hervor, welche gestartet wird sobald die Ablage geschlossen wird."; 12 | "HIGHLIGHT_APP_LABEL" = "Hebt die ausgewählte App hervor"; 13 | "AESTHETICS_SECTION_LABEL" = "Aussehen"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | English 7 | CFBundleExecutable 8 | appbuttonprefs 9 | CFBundleIdentifier 10 | com.chewmieser.appbuttonprefs 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundlePackageType 14 | BNDL 15 | CFBundleShortVersionString 16 | 1.0.0 17 | CFBundleSignature 18 | ???? 19 | CFBundleVersion 20 | 1.0 21 | DTPlatformName 22 | iphoneos 23 | MinimumOSVersion 24 | 3.0 25 | NSPrincipalClass 26 | appbuttonprefsListController 27 | 28 | 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Steve Rolfe 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /appbuttonprefs/Resources/zh-Hant.lproj/abaesthetics.strings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ACTIVE_ALPHA_FOOTER 6 | 活躍的AppButton透明度。 7 | AESTHETICS_SECTION_LABEL 8 | 外觀和感覺 9 | BLACK_BUTTON_FOOTER 10 | 更改休息按鈕到黑色或白色。 11 | BLACK_BUTTON_LABEL 12 | 黑色按鈕 13 | BLACK_TRAY_FOOTER 14 | 更改開放式托盤到黑色或白色。 15 | BLACK_TRAY_LABEL 16 | 黑色托盤 17 | ENABLE_BLUR_FOOTER 18 | 啟用模糊在按鈕和託盤。 19 | ENABLE_BLUR_LABEL 20 | 啟用模糊 21 | ENABLE_BORDER_FOOTER 22 | 啟用AppButton周圍的邊境。 23 | ENABLE_BORDER_LABEL 24 | 啟用邊境 25 | HIGHLIGHT_APP_FOOTER 26 | 變淡周邊圖標並突出當關閉托盤的程序。 27 | HIGHLIGHT_APP_LABEL 28 | 突出選擇了的程式 29 | RESTING_ALPHA_FOOTER 30 | 休眠的AppButton透明度。 31 | 32 | 33 | -------------------------------------------------------------------------------- /appbuttonprefs/Makefile: -------------------------------------------------------------------------------- 1 | export ARCHS = armv7 armv7s arm64 2 | export ADDITIONAL_OBJCFLAGS = -fobjc-arc 3 | 4 | include theos/makefiles/common.mk 5 | 6 | BUNDLE_NAME = appbuttonprefs 7 | appbuttonprefs_FILES = appbuttonprefs.mm ABPrefsHeaderCell.m ABSwitchTableCell.m ABFavoritedAppsController.m ABLookAndFeelController.m ABBehaviorController.m ABAboutController.m SAMultisectorControl.m SAMath.m ABWhitelistApps.m ABSegmentTableCell.m ABAboutTableCell.m ABAboutKyleTableCell.m 8 | appbuttonprefs_INSTALL_PATH = /Library/PreferenceBundles 9 | appbuttonprefs_FRAMEWORKS = UIKit CoreGraphics 10 | appbuttonprefs_PRIVATE_FRAMEWORKS = Preferences 11 | appbuttonprefs_LIBRARIES = applist 12 | 13 | include $(THEOS_MAKE_PATH)/bundle.mk 14 | 15 | internal-stage:: 16 | $(ECHO_NOTHING)mkdir -p $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences$(ECHO_END) 17 | $(ECHO_NOTHING)cp entry.plist $(THEOS_STAGING_DIR)/Library/PreferenceLoader/Preferences/appbuttonprefs.plist$(ECHO_END) 18 | $(ECHO_NOTHING)sudo chown root:wheel $(THEOS_STAGING_DIR)/Library/PreferenceBundles/appbuttonprefs.bundle$(ECHO_END) 19 | $(ECHO_NOTHING)sudo chown -R root:wheel $(THEOS_STAGING_DIR)/Library/PreferenceBundles/appbuttonprefs.bundle/*$(ECHO_END) -------------------------------------------------------------------------------- /ABWindow.m: -------------------------------------------------------------------------------- 1 | #import "ABWindow.h" 2 | 3 | // StatusVol needs an auto-rotating UIWindow 4 | @implementation ABWindow 5 | // Un-hide after rotation 6 | /*- (void)_finishedFullRotation:(id)arg1 finished:(id)arg2 context:(id)arg3{ 7 | [super _finishedFullRotation:arg1 finished:arg2 context:arg3]; 8 | [self setFrame:theFrame]; 9 | 10 | //[self fixFrame]; 11 | //[self setHidden:NO]; 12 | }*/ 13 | 14 | /*- (void)fixFrame{ 15 | // Reset frame 16 | //long orientation=(long)[[UIDevice currentDevice] orientation]; 17 | CGRect windowRect=self.frame; 18 | windowRect.origin.x=20; 19 | windowRect.origin.y=20; 20 | windowRect.size.width=60; 21 | windowRect.size.height=60; 22 | 23 | switch (orientation){ 24 | case 1:{ 25 | if (!sVolIsVisible) windowRect.origin.y=-20; 26 | }break; 27 | case 2:{ 28 | if (!sVolIsVisible) windowRect.origin.y=20; 29 | }break; 30 | case 3:{ 31 | if (!sVolIsVisible) windowRect.origin.x=20; 32 | }break; 33 | case 4:{ 34 | if (!sVolIsVisible) windowRect.origin.x=-20; 35 | }break; 36 | } 37 | 38 | [self setFrame:windowRect]; 39 | }*/ 40 | 41 | // Force support auto-rotation. Hide on rotation events 42 | /*- (BOOL)_shouldAutorotateToInterfaceOrientation:(int)arg1{ 43 | //[self setHidden:YES]; // Mitigate black box issue 44 | theFrame=[self frame]; 45 | return YES; 46 | }*/ 47 | @end -------------------------------------------------------------------------------- /appbuttonprefs/SAMath.m: -------------------------------------------------------------------------------- 1 | // 2 | // Common.m 3 | // CustomControl 4 | // 5 | // Created by Snipter on 12/31/13. 6 | // Copyright (c) 2013 SmartAppStudio. All rights reserved. 7 | // 8 | 9 | #import "SAMath.h" 10 | 11 | CGFloat toDegrees (CGFloat radians){ 12 | return radians * 180 / M_PI; 13 | } 14 | 15 | CGFloat toRadians (CGFloat degrees){ 16 | return degrees * M_PI / 180; 17 | } 18 | 19 | CGFloat segmentAngle (CGPoint startPoint, CGPoint endPoint){ 20 | CGPoint v = CGPointMake(endPoint.x-startPoint.x, endPoint.y-startPoint.y); 21 | float vmag = sqrt(powf(v.x, 2.0) + powf(v.y, 2.0)); 22 | v.x /= vmag; 23 | v.y /= vmag; 24 | double radians = atan2(v.y,v.x); 25 | return radians; 26 | } 27 | 28 | CGFloat segmentLength(CGPoint startPoint, CGPoint endPoint){ 29 | return decartToPolar(startPoint, endPoint).radius; 30 | } 31 | 32 | CGPoint polarToDecart(CGPoint startPoint, CGFloat radius, CGFloat angle){ 33 | CGFloat x = radius * cos(angle) + startPoint.x; 34 | CGFloat y = radius * sin(angle) + startPoint.y; 35 | return CGPointMake(x, y); 36 | } 37 | 38 | SAPolarCoordinate decartToPolar(CGPoint center, CGPoint point){ 39 | double x = point.x - center.x; 40 | double y = point.y - center.y; 41 | 42 | SAPolarCoordinate polar; 43 | polar.radius = sqrt(pow(x, 2.0) + pow(y, 2.0)); 44 | polar.angle = acos(x/(sqrt(pow(x, 2.0) + pow(y, 2.0)))); 45 | if(y < 0) polar.angle = 2 * M_PI - polar.angle; 46 | return polar; 47 | } 48 | -------------------------------------------------------------------------------- /appbuttonprefs/Resources/ja.lproj/abbehavior.strings: -------------------------------------------------------------------------------- 1 | "SWAP_CONTROLS_FOOTER" = "When enabled, the tray is opened after a tap and hold. When disabled, the tray is opened by swiping on it."; 2 | "SWAP_CONTROLS_LABEL" = "Swap Controls"; 3 | "APPBUTTON_ACTIVATOR_ACTIVATION_FOOTER" = "AppButtonの発動イベントを割り当てる。なにも割り当てられていない場合はAppButtonは常に表示されます。トグルモードがオフの場合、発動した時にAppButtonが表示されます。"; 4 | "APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_LABEL" = "発動方法"; 5 | "APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_HEADER" = "AppButton発動"; 6 | "APPBUTTON_ACTIVATOR_ACTIVATION_TOGGLE_MODE_LABEL" = "トグルモード"; 7 | "SINGLE_TAP_ACTION_FOOTER" = "AppButtonがタップ時に行われるアクション。"; 8 | "SINGLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR" = "AppButtonタップ時に行われるアクション。Activatorのアクションがデフォルトより優先されます。"; 9 | "TAP_ACTION_IGNORE" = "無視"; 10 | "TAP_ACTION_LAST_APP" = "最後のアプリ"; 11 | "TAP_ACTION_TAP_HOME" = "ホームをタップ"; 12 | "TAP_ACTION_DOUBLE_TAP_HOME" = "ホームをダブルタップ"; 13 | "TAP_ACTION_ACTIVATOR_OTHER" = "その他"; 14 | "SINGLE_TAP_ACTIVATOR_HEADER" = "AppButtonシングルタップ"; 15 | "DOUBLE_TAP_ACTION_FOOTER" = "AppButtonダブルタップ時に行われるアクション。"; 16 | "DOUBLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR" = "AppButtonダブルタップ時に行われるアクション。Activatorのアクションがデフォルトより優先されます。"; 17 | "DOUBLE_TAP_ACTIVATOR_HEADER" = "AppButtonダブルタップ"; 18 | "SNAP_TO_EDGE_FOOTER" = "AppButtonを強制的に画面の端にスナップ。"; 19 | "SNAP_TO_EDGE_LABEL" = "画面の端にドックする"; 20 | "SCROLL_ENABLED_FOOTER" = "アイコンを全て画面に表示できないい場合わスクロールする。"; 21 | "SCROLL_ENABLED_LABEL" = "スクロール有効"; 22 | "KILL_APPS_FOOTER" = "トレーの末端を2秒間ホールドすることで起動中のアプリをすべて閉じます。ホワイトリストのアプリは閉じません。"; 23 | "KILL_APPS_LABEL" = "全アプリ停止ジェスチャー"; 24 | "WHITELIST_SECTION_HEADER" = "ホワイトリストされたアプリ"; 25 | "SAUSAGE_FINGERS_FOOTER" = "ローンチアイコンを指の一つ前にセットする。"; 26 | "SAUSAGE_FINGERS_LABEL" = "太っちょフィンガー"; 27 | "BEHAVIOR_SECTION_LABEL" = "動作"; -------------------------------------------------------------------------------- /appbuttonprefs/SAMultisectorControl.h: -------------------------------------------------------------------------------- 1 | // 2 | // SAMultisectorControl.h 3 | // CustomControl 4 | // 5 | // Created by Snipter on 12/31/13. 6 | // Copyright (c) 2013 SmartAppStudio. All rights reserved. 7 | // 8 | 9 | #import 10 | #import "SAMath.h" 11 | 12 | @class SAMultisectorSector; 13 | 14 | 15 | @interface SAMultisectorControl : UIControl 16 | 17 | @property (strong, nonatomic, readonly) NSArray *sectors; 18 | 19 | @property (nonatomic, readwrite) double sectorsRadius; 20 | @property (nonatomic, readwrite) double startAngle; 21 | @property (nonatomic, readwrite) NSUInteger numbersAfterPoint; 22 | @property (nonatomic, readwrite) double minCircleMarkerRadius; 23 | @property (nonatomic, readwrite) double maxCircleMarkerRadius; 24 | 25 | - (void)addSector:(SAMultisectorSector *)sector; 26 | - (void)removeSector:(SAMultisectorSector *)sector; 27 | - (void)removeAllSectors; 28 | 29 | - (instancetype)init; 30 | - (instancetype)initWithFrame:(CGRect)frame; 31 | - (instancetype)initWithCoder:(NSCoder *)aDecoder; 32 | 33 | @end 34 | 35 | 36 | 37 | @interface SAMultisectorSector : NSObject 38 | 39 | @property (strong, nonatomic) UIColor *color; 40 | 41 | @property (nonatomic, readwrite) double minValue; 42 | @property (nonatomic, readwrite) double maxValue; 43 | 44 | @property (nonatomic, readwrite) double startValue; 45 | @property (nonatomic, readwrite) double endValue; 46 | 47 | @property (nonatomic, readwrite) NSInteger tag; 48 | 49 | - (instancetype) init; 50 | 51 | + (instancetype) sector; 52 | + (instancetype) sectorWithColor:(UIColor *)color; 53 | + (instancetype) sectorWithColor:(UIColor *)color maxValue:(double)maxValue; 54 | + (instancetype) sectorWithColor:(UIColor *)color minValue:(double)minValue maxValue:(double)maxValue; 55 | 56 | @end 57 | -------------------------------------------------------------------------------- /appbuttonprefs/Resources/ko.lproj/abbehavior.strings: -------------------------------------------------------------------------------- 1 | "SWAP_CONTROLS_FOOTER" = "활성화 시 탭하고 길게 누른 후 스와프로 트레이가 열립니다. 비활성화 시는 스와프로 바로 트레이가 열립니다."; 2 | "SWAP_CONTROLS_LABEL" = "트레이 제어 스왑"; 3 | "APPBUTTON_ACTIVATOR_ACTIVATION_FOOTER" = "AppButton 액티베이션을 할당하십시오. 할당하지 않으면, AppButton을 항상 화면에 표시합니다. 토글 모드를 꺼두면 AppButton은 액티베이터 활성화 시 매번 나타납니다."; 4 | "APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_LABEL" = "액티베이션 방법"; 5 | "APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_HEADER" = "AppButton Activate"; 6 | "APPBUTTON_ACTIVATOR_ACTIVATION_TOGGLE_MODE_LABEL" = "토글 모드"; 7 | "SINGLE_TAP_ACTION_FOOTER" = "AppButton 한 번 탭 시 실행할 동작."; 8 | "SINGLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR" = "AppButton 한 번 탭 시 실행할 동작입니다. 기타 다른 동작으로 설정에서의 액티베이터 동작은 위의 AppButton 기본값보다 우선으로 동작합니다."; 9 | "TAP_ACTION_IGNORE" = "아무 것도 안함"; 10 | "TAP_ACTION_LAST_APP" = "마지막 App"; 11 | "TAP_ACTION_TAP_HOME" = "홈버튼 한 번 탭"; 12 | "TAP_ACTION_DOUBLE_TAP_HOME" = "홈버튼 두 번 탭"; 13 | "TAP_ACTION_ACTIVATOR_OTHER" = "기타 다른 동작으로 설정"; 14 | "SINGLE_TAP_ACTIVATOR_HEADER" = "AppButton 한 번 탭"; 15 | "DOUBLE_TAP_ACTION_FOOTER" = "AppButton 두 번 탭 시 실행할 동작."; 16 | "DOUBLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR" = "AppButton 두 번 탭 시 실행할 동작입니다. 기타 다른 동작으로 설정에서의 액티베이터 동작은 위의 AppButton 기본값보다 우선으로 동작합니다."; 17 | "DOUBLE_TAP_ACTIVATOR_HEADER" = "AppButton 두 번 탭"; 18 | "SNAP_TO_EDGE_FOOTER" = "AppButton을 화면 가장자리로 강제로 고정합니다."; 19 | "SNAP_TO_EDGE_LABEL" = "화면 가장자리로 고정"; 20 | "SCROLL_ENABLED_FOOTER" = "아이콘을 화면에 모두 표시할 수 없는 경우 아이콘을 통해 스크롤 할 수 있습니다."; 21 | "SCROLL_ENABLED_LABEL" = "스크롤 활성화"; 22 | "KILL_APPS_FOOTER" = "트레이의 끝에서 2초 동안 누른 후 때면 실행 중인 모든 App을 종료합니다. 제외할 App에 등록한 App은 종료되지 않습니다."; 23 | "KILL_APPS_LABEL" = "App 종료 제스처 활성화"; 24 | "WHITELIST_SECTION_HEADER" = "제외할 App"; 25 | "SAUSAGE_FINGERS_FOOTER" = "아이콘 선택을 좀 더 쉽게 하기 위해서 손가락 보다 앞서서 선택되도록 합니다."; 26 | "SAUSAGE_FINGERS_LABEL" = "소시지 손가락"; 27 | "BEHAVIOR_SECTION_LABEL" = "설정"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/ar.lproj/abbehavior.strings: -------------------------------------------------------------------------------- 1 | "SWAP_CONTROLS_FOOTER" = "عند التفعيل, سيفتح الشريط بعد النقر والضغط على الزر. عند الإيقاف, سيفتح الشريط عند السحب على الزر."; 2 | "SWAP_CONTROLS_LABEL" = "تبديل التحكم"; 3 | "APPBUTTON_ACTIVATOR_ACTIVATION_FOOTER" = "إربط الزر بحركة Activator. إذا لم تختر أي حركة, سيبقى الزر ظاهراً."; 4 | "APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_LABEL" = "إختر حركة Activator"; 5 | "APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_HEADER" = "تفعيل الزر"; 6 | "APPBUTTON_ACTIVATOR_ACTIVATION_TOGGLE_MODE_LABEL" = "تبديل الوضع"; 7 | "SINGLE_TAP_ACTION_FOOTER" = "إختر عمل للزر عند النقر عليهِ مرة واحدة."; 8 | "SINGLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR" = "إختر عمل للزر عند النقر عليهِ مرة واحدة. حركات Activator تُبطل عمل الزر الإفتراضي."; 9 | "TAP_ACTION_IGNORE" = "تجاهل"; 10 | "TAP_ACTION_LAST_APP" = "البرنامج الأخير"; 11 | "TAP_ACTION_TAP_HOME" = "نقرة لزر الهوم"; 12 | "TAP_ACTION_DOUBLE_TAP_HOME" = "نقرتين لزر الهوم"; 13 | "TAP_ACTION_ACTIVATOR_OTHER" = "أُخرى"; 14 | "SINGLE_TAP_ACTIVATOR_HEADER" = "نقرة واحدة على الزر"; 15 | "DOUBLE_TAP_ACTION_FOOTER" = "إختر عمل للزر عند النقر عليهِ مرتين"; 16 | "DOUBLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR" = "إختر عمل للزر عند النقر عليهِ مرتين. حركات Activator تُبطل عمل الزر الإفتراضي."; 17 | "DOUBLE_TAP_ACTIVATOR_HEADER" = "نقرتين على الزر"; 18 | "SNAP_TO_EDGE_FOOTER" = "نقل وتثبيت الزر إلى حواف الشاشة."; 19 | "SNAP_TO_EDGE_LABEL" = "التثبيت على حواف الشاشة"; 20 | "SCROLL_ENABLED_FOOTER" = "التمرير على البرامج عندما يجتاز عدد البرامج حجم الشاشة."; 21 | "SCROLL_ENABLED_LABEL" = "تفعيل التمرير"; 22 | "KILL_APPS_FOOTER" = "الإستمرار بالضغط لمدة ثانيتين على نهاية الشريط ثم الإفلات سيغلق جميع البرامج. البرامج المختارة بالقائمة البيضاء لن تنغلق."; 23 | "KILL_APPS_LABEL" = "تفعيل إغلاق البرامج"; 24 | "WHITELIST_SECTION_HEADER" = "قائمة البرامج البيضاء"; 25 | "SAUSAGE_FINGERS_FOOTER" = "يشغل البرنامج الذي بجانب الإصبع وليس البرنامج الذي تحت الإصبع."; 26 | "SAUSAGE_FINGERS_LABEL" = "بجانب الإصبع"; 27 | "BEHAVIOR_SECTION_LABEL" = "سلوك الزر"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/appbuttonprefs.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | items 6 | 7 | 8 | cell 9 | PSGroupCell 10 | headerCellClass 11 | ABPrefsHeaderCell 12 | 13 | 14 | cell 15 | PSLinkCell 16 | label 17 | FAVORITE_SECTION_LABEL 18 | icon 19 | favorites.png 20 | detail 21 | ABFavoritedAppsController 22 | 23 | 24 | cell 25 | PSGroupCell 26 | 27 | 28 | cell 29 | PSLinkCell 30 | label 31 | AESTHETICS_SECTION_LABEL 32 | icon 33 | brush.png 34 | detail 35 | ABLookAndFeelController 36 | 37 | 38 | cell 39 | PSGroupCell 40 | 41 | 42 | cell 43 | PSLinkCell 44 | label 45 | BEHAVIOR_SECTION_LABEL 46 | icon 47 | behaviorIcon.png 48 | detail 49 | ABBehaviorController 50 | 51 | 52 | cell 53 | PSGroupCell 54 | footerText 55 | AppButton © 2015 Steven Rolfe 56 | 57 | 58 | cell 59 | PSLinkCell 60 | label 61 | ABOUT_SECTION_LABEL 62 | icon 63 | aboutIcon.png 64 | detail 65 | ABAboutController 66 | 67 | 68 | title 69 | AppButton 70 | 71 | 72 | -------------------------------------------------------------------------------- /appbuttonprefs/Resources/he.lproj/abbehavior.strings: -------------------------------------------------------------------------------- 1 | "APPBUTTON_ACTIVATOR_ACTIVATION_FOOTER" = "הגדר מחוות הפעלה לAppButton. כאשר אף אחת לא מוגדרת, AppButton תמיד זמין. כאשר מצב מתג כבוי, AppButton מציץ כאשר הוא מופעל."; 2 | "APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_HEADER" = "הפעלת AppButton"; 3 | "APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_LABEL" = "מחוות הפעלה"; 4 | "APPBUTTON_ACTIVATOR_ACTIVATION_TOGGLE_MODE_LABEL" = "מצב מתג"; 5 | "BEHAVIOR_SECTION_LABEL" = "התנהגות"; 6 | "DOUBLE_TAP_ACTION_FOOTER" = "פעולה לביצוע כאשר מקישים פעמיים על AppButton"; 7 | "DOUBLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR" = "פעולה לביצוע כאשר מקישים פעמיים על AppButton 8 | מחוות Activator עוקפות את ברירת המחדל של AppButton."; 9 | "DOUBLE_TAP_ACTIVATOR_HEADER" = "AppButton הקשה כפולה על"; 10 | "KILL_APPS_FOOTER" = "כאשר מחזיקים את קצה המגש לשתי שניות ומשחררים, כל האפליקציות ברקע יסגרו, אפליקציות ברשימה הלבנה לא ייסגרו כאשר מחווה זו תבוצע."; 11 | "KILL_APPS_LABEL" = "מחווה לסגירת אפליקציות"; 12 | "SAUSAGE_FINGERS_FOOTER" = "מגדיר את אפליקציית הפתיחה לאחת לפני האצבע שלך."; 13 | "SAUSAGE_FINGERS_LABEL" = "אצבעות עבות"; 14 | "SCROLL_ENABLED_FOOTER" = "גולל בין האפליקציות כשהמסך לא יכול להציג את כולן."; 15 | "SCROLL_ENABLED_LABEL" = "גלילה מאפשרת"; 16 | "SINGLE_TAP_ACTION_FOOTER" = "פעולה לביצוע כאשר מקישים על AppButton"; 17 | "SINGLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR" = "פעולה לביצוע כאשר מקישים על AppButton 18 | מחוות Activator עוקפות את ברירת המחדל של AppButton."; 19 | "SINGLE_TAP_ACTIVATOR_HEADER" = "AppButton הקשה על"; 20 | "SNAP_TO_EDGE_FOOTER" = "מכריח את AppButton להיצמד לצדדי המכשיר"; 21 | "SNAP_TO_EDGE_LABEL" = "תעגון לקצה המסך"; 22 | "SWAP_CONTROLS_FOOTER" = "כאשר דולק, המגש נפתח לאחר הקשה והחזקה. 23 | כאשר כבוי, המגש נפתח על ידי החלקה עליו."; 24 | "SWAP_CONTROLS_LABEL" = "החלף שליטה"; 25 | "TAP_ACTION_ACTIVATOR_OTHER" = "אחר"; 26 | "TAP_ACTION_DOUBLE_TAP_HOME" = "הקשה כפולה על כפתור הבית"; 27 | "TAP_ACTION_IGNORE" = "התעלם"; 28 | "TAP_ACTION_LAST_APP" = "אפליקציה אחרונה"; 29 | "TAP_ACTION_TAP_HOME" = "הקשה על כפתור הבית"; 30 | "WHITELIST_SECTION_HEADER" = "אפליקציות רשימה לבנה"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/da.lproj/abbehavior.strings: -------------------------------------------------------------------------------- 1 | "SWAP_CONTROLS_FOOTER" = "Når aktiveret, åbnes AppButton på tryk og hold. Når deaktiveret, åbnes AppButton ved et swipe."; 2 | "SWAP_CONTROLS_LABEL" = "Ombyt aktiveringsmuligheder"; 3 | "APPBUTTON_ACTIVATOR_ACTIVATION_FOOTER" = "Tildel AppButton aktiveringsmuligheder. Når ingen er tildelt, er AppButton altid synnlig. Når til/fraknap ikke er slået til, bliver AppButton synlig ved aktivering. 4 | "; 5 | "APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_LABEL" = "Aktiveringsmuligheder"; 6 | "APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_HEADER" = "Aktiver AppButton"; 7 | "APPBUTTON_ACTIVATOR_ACTIVATION_TOGGLE_MODE_LABEL" = "Til/fraknao"; 8 | "SINGLE_TAP_ACTION_FOOTER" = "Handling ved enkelt tryk på AppButton."; 9 | "SINGLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR" = "Handling ved enkelt tryk på AppButton. Activator prioriteres over AppButtons standarder."; 10 | "TAP_ACTION_IGNORE" = "Ignorer"; 11 | "TAP_ACTION_LAST_APP" = "Sidst åbne App"; 12 | "TAP_ACTION_TAP_HOME" = "Tryk på Hjem-knappen"; 13 | "TAP_ACTION_DOUBLE_TAP_HOME" = "Dobbelttryk på hjem-knappen"; 14 | "TAP_ACTION_ACTIVATOR_OTHER" = "Andre"; 15 | "SINGLE_TAP_ACTIVATOR_HEADER" = "AppButton Enkelt tryk"; 16 | "DOUBLE_TAP_ACTION_FOOTER" = "Handling ved dobbelttryk på AppButton."; 17 | "DOUBLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR" = "Handling ved dobbelttryk på AppButton. Activator prioriteres over AppButtons standarder."; 18 | "DOUBLE_TAP_ACTIVATOR_HEADER" = "Dobbelttryk på AppButton"; 19 | "SNAP_TO_EDGE_FOOTER" = "Tvinger AppButton til at sætte sig fast til skærmens kant."; 20 | "SNAP_TO_EDGE_LABEL" = "Dock til Skærmkant"; 21 | "SCROLL_ENABLED_FOOTER" = "Scroll igennem ikoner når skærmen ikke kan vise alle."; 22 | "SCROLL_ENABLED_LABEL" = "Aktiver Scrolling"; 23 | "KILL_APPS_FOOTER" = "Hold fingeren nede 2 sek. i slutningen af bakken for at lukke alle apps. Tilladte apps lukkes ikke når handlingen udføres."; 24 | "KILL_APPS_LABEL" = "Luk alle apps"; 25 | "WHITELIST_SECTION_HEADER" = "Tilladte apps"; 26 | "SAUSAGE_FINGERS_FOOTER" = "Nuværende apps icon placeres over din finger."; 27 | "SAUSAGE_FINGERS_LABEL" = "Pølsefingre"; 28 | "BEHAVIOR_SECTION_LABEL" = "Opførsel"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/en.lproj/abbehavior.strings: -------------------------------------------------------------------------------- 1 | "SWAP_CONTROLS_FOOTER" = "When enabled, the tray is opened after a tap and hold. When disabled, the tray is opened by swiping on it."; 2 | "SWAP_CONTROLS_LABEL" = "Swap Controls"; 3 | "APPBUTTON_ACTIVATOR_ACTIVATION_FOOTER" = "Assign AppButton activation events. When none are assigned, AppButton is always visible. When toggle mode is off, AppButton peeks when activated."; 4 | "APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_LABEL" = "Activation Methods"; 5 | "APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_HEADER" = "AppButton Activate"; 6 | "APPBUTTON_ACTIVATOR_ACTIVATION_TOGGLE_MODE_LABEL" = "Toggle Mode"; 7 | "SINGLE_TAP_ACTION_FOOTER" = "Action to perform when AppButton is tapped."; 8 | "SINGLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR" = "Action to perform when AppButton is tapped. Activator actions override AppButton defaults."; 9 | "TAP_ACTION_IGNORE" = "Ignore"; 10 | "TAP_ACTION_LAST_APP" = "Last App"; 11 | "TAP_ACTION_TAP_HOME" = "Tap Home"; 12 | "TAP_ACTION_DOUBLE_TAP_HOME" = "Double Home"; 13 | "TAP_ACTION_ACTIVATOR_OTHER" = "Other"; 14 | "SINGLE_TAP_ACTIVATOR_HEADER" = "AppButton Single Tap"; 15 | "DOUBLE_TAP_ACTION_FOOTER" = "Action to perform when AppButton is double tapped."; 16 | "DOUBLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR" = "Action to perform when AppButton is double tapped. Activator actions override AppButton defaults."; 17 | "DOUBLE_TAP_ACTIVATOR_HEADER" = "AppButton Double Tap"; 18 | "SNAP_TO_EDGE_FOOTER" = "Forces AppButton to snap to the screen's edges."; 19 | "SNAP_TO_EDGE_LABEL" = "Dock to Screen Edge"; 20 | "SCROLL_ENABLED_FOOTER" = "Scrolls through icons when the screen can't display them all."; 21 | "SCROLL_ENABLED_LABEL" = "Scroll Enabled"; 22 | "KILL_APPS_FOOTER" = "Holding at the end of the tray for two seconds and letting go closes all running apps. Whitelisted apps will not close when this gesture is performed."; 23 | "KILL_APPS_LABEL" = "Kill Apps Gesture"; 24 | "WHITELIST_SECTION_HEADER" = "Whitelisted Apps"; 25 | "SAUSAGE_FINGERS_FOOTER" = "Sets the launch icon to the one before your finger."; 26 | "SAUSAGE_FINGERS_LABEL" = "Sausage Fingers"; 27 | "BEHAVIOR_SECTION_LABEL" = "Behavior"; -------------------------------------------------------------------------------- /UIImage+ColorAtPixel.m: -------------------------------------------------------------------------------- 1 | #import "common.h" 2 | 3 | @implementation UIImage (ColorAtPixel) 4 | 5 | - (UIColor *)colorAtPixel:(CGPoint)point 6 | { 7 | // Cancel if point is outside image coordinates 8 | if (!CGRectContainsPoint(CGRectMake(0.0f, 0.0f, self.size.width, self.size.height), point)) { 9 | return nil; 10 | } 11 | 12 | // Create a 1x1 pixel byte array and bitmap context to draw the pixel into. 13 | // Reference: http://stackoverflow.com/questions/1042830/retrieving-a-pixel-alpha-value-for-a-uiimage 14 | NSInteger pointX = trunc(point.x); 15 | NSInteger pointY = trunc(point.y); 16 | CGImageRef cgImage = self.CGImage; 17 | NSUInteger width = self.size.width; 18 | NSUInteger height = self.size.height; 19 | CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB(); 20 | int bytesPerPixel = 4; 21 | int bytesPerRow = bytesPerPixel * 1; 22 | NSUInteger bitsPerComponent = 8; 23 | unsigned char pixelData[4] = { 0, 0, 0, 0 }; 24 | CGContextRef context = CGBitmapContextCreate(pixelData, 25 | 1, 26 | 1, 27 | bitsPerComponent, 28 | bytesPerRow, 29 | colorSpace, 30 | kCGImageAlphaPremultipliedLast | kCGBitmapByteOrder32Big); 31 | CGColorSpaceRelease(colorSpace); 32 | CGContextSetBlendMode(context, kCGBlendModeCopy); 33 | 34 | // Draw the pixel we are interested in onto the bitmap context 35 | CGContextTranslateCTM(context, -pointX, pointY-(CGFloat)height); 36 | CGContextDrawImage(context, CGRectMake(0.0f, 0.0f, (CGFloat)width, (CGFloat)height), cgImage); 37 | CGContextRelease(context); 38 | 39 | // Convert color values [0..255] to floats [0.0..1.0] 40 | CGFloat red = (CGFloat)pixelData[0] / 255.0f; 41 | CGFloat green = (CGFloat)pixelData[1] / 255.0f; 42 | CGFloat blue = (CGFloat)pixelData[2] / 255.0f; 43 | CGFloat alpha = (CGFloat)pixelData[3] / 255.0f; 44 | return [UIColor colorWithRed:red green:green blue:blue alpha:alpha]; 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /appbuttonprefs/Resources/ru.lproj/abbehavior.strings: -------------------------------------------------------------------------------- 1 | "SWAP_CONTROLS_FOOTER" = "При включении, панель мультизадачности открывается при длительном нажатии. В обратном случае — по свайпу."; 2 | "SWAP_CONTROLS_LABEL" = "Сменить настройки открытия"; 3 | "APPBUTTON_ACTIVATOR_ACTIVATION_FOOTER" = "Установить способы открытия AppButton. Если не выбран ни один способ, AppButton виден постоянно. Если режим переключения выключен, AppButton появляется на короткое время после активации."; 4 | "APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_LABEL" = "Способы активации"; 5 | "APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_HEADER" = "Активация AppButton"; 6 | "APPBUTTON_ACTIVATOR_ACTIVATION_TOGGLE_MODE_LABEL" = "Режим переключения"; 7 | "SINGLE_TAP_ACTION_FOOTER" = "Действие, выполняемое по одиночному нажатию на AppButton."; 8 | "SINGLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR" = "Действие, выполняемое по одиночному нажатию на AppButton. Настройки Activator замещают предложенные выше варианты."; 9 | "TAP_ACTION_IGNORE" = "Игнорировать"; 10 | "TAP_ACTION_LAST_APP" = "Пред. прилож."; 11 | "TAP_ACTION_TAP_HOME" = "Кнопка 'Домой'"; 12 | "TAP_ACTION_DOUBLE_TAP_HOME" = "'Домой' x2"; 13 | "TAP_ACTION_ACTIVATOR_OTHER" = "Другое"; 14 | "SINGLE_TAP_ACTIVATOR_HEADER" = "Одиночное нажатие"; 15 | "DOUBLE_TAP_ACTION_FOOTER" = "Действие, выполняемое по двойному нажатию на AppButton."; 16 | "DOUBLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR" = "Действие, выполняемое по двойному нажатию на AppButton. Настройки Activator замещают предложенные выше варианты."; 17 | "DOUBLE_TAP_ACTIVATOR_HEADER" = "Двойное нажатие"; 18 | "SNAP_TO_EDGE_FOOTER" = "Прикрепляет AppButton к краю экрана."; 19 | "SNAP_TO_EDGE_LABEL" = "Прикрепить к краю экрана"; 20 | "SCROLL_ENABLED_FOOTER" = "Пролистывает список если экран не может отобразить больше иконок."; 21 | "SCROLL_ENABLED_LABEL" = "Пролистывание"; 22 | "KILL_APPS_FOOTER" = "Для закрытия всех запущенных приложений, удерживайте палец на краю панели мультизадачности в течении 2 секунд. Приложения из Белого списка не будут закрыты."; 23 | "KILL_APPS_LABEL" = "Закрытие приложений"; 24 | "WHITELIST_SECTION_HEADER" = "Белый список"; 25 | "SAUSAGE_FINGERS_FOOTER" = "Выбирает приложение, находящееся перед Вашим пальцем."; 26 | "SAUSAGE_FINGERS_LABEL" = "Пальцы-сосиски!"; 27 | "BEHAVIOR_SECTION_LABEL" = "Поведение"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/pl.lproj/abbehavior.strings: -------------------------------------------------------------------------------- 1 | "SWAP_CONTROLS_FOOTER" = "Gdy włączone, zasobnik otwierany jest po dotknięciu i przytrzymaniu. Gdy wyłączone, zasobnik otwierany jest po przesunięciu po nim."; 2 | "SWAP_CONTROLS_LABEL" = "Zamień sterowanie"; 3 | "APPBUTTON_ACTIVATOR_ACTIVATION_FOOTER" = "Przypisz metodę aktywacji do przycisku. Gdy nic nie jest przypisane, AppButton jest zawsze widoczny. Gdy opcja ciągłej widoczności nie jest aktywna, AppButton pojawi się tylko na chwilę."; 4 | "APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_LABEL" = "Metody aktywacji"; 5 | "APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_HEADER" = "Aktywacja AppButtona"; 6 | "APPBUTTON_ACTIVATOR_ACTIVATION_TOGGLE_MODE_LABEL" = "Zawsze widoczny"; 7 | "SINGLE_TAP_ACTION_FOOTER" = "Akcja do wykonania po dotknięciu ."; 8 | "SINGLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR" = "Akcja do wykonania po dotknięciu AppButtona. Akcje w Activatorze nadpisują te w AppButtonie."; 9 | "TAP_ACTION_IGNORE" = "Ignoruj"; 10 | "TAP_ACTION_LAST_APP" = "Ostatnia apka"; 11 | "TAP_ACTION_TAP_HOME" = "Początek"; 12 | "TAP_ACTION_DOUBLE_TAP_HOME" = "2x Początek"; 13 | "TAP_ACTION_ACTIVATOR_OTHER" = "Inna"; 14 | "SINGLE_TAP_ACTIVATOR_HEADER" = "Poj. tapnięcie AppButtona"; 15 | "DOUBLE_TAP_ACTION_FOOTER" = "Akcja do wykonania po podwójnym dotknięciu AppButtona."; 16 | "DOUBLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR" = "Akcja do wykonania po podwójnym dotknięciu AppButtona. Akcje w Activatorze nadpisują te w AppButtonie."; 17 | "DOUBLE_TAP_ACTIVATOR_HEADER" = "2x tapnięcie AppButtona"; 18 | "SNAP_TO_EDGE_FOOTER" = "AppButton będzie przyczepiał się do krawędzi ekranu."; 19 | "SNAP_TO_EDGE_LABEL" = "Przyczepiaj do krawędzi"; 20 | "SCROLL_ENABLED_FOOTER" = "Przewija ikony gdy nie można wyświetlić ich wszystkich."; 21 | "SCROLL_ENABLED_LABEL" = "Przewijanie włączone"; 22 | "KILL_APPS_FOOTER" = "Przytrzymanie palca przez dwie sekundy na końcu listy a następnie puszczenie go zabije wszystkie obecnie uruchomione apki. (oprócz tych znajdujących się na białej liście)"; 23 | "KILL_APPS_LABEL" = "Gest zabicia apek"; 24 | "WHITELIST_SECTION_HEADER" = "Apki na białej liście"; 25 | "SAUSAGE_FINGERS_FOOTER" = "Uruchamia aplikację przed twoim palcem, zamiast tej, na której masz palec."; 26 | "SAUSAGE_FINGERS_LABEL" = "Parówkowe palce"; 27 | "BEHAVIOR_SECTION_LABEL" = "Zachowanie"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/vi.lproj/abbehavior.strings: -------------------------------------------------------------------------------- 1 | "SWAP_CONTROLS_FOOTER" = "Khi được kích hoạt, các khay được mở ra sau khi chạm và giữ. Khi vô hiệu hóa, khay được mở bởi giữ và vuốt trên nó"; 2 | "SWAP_CONTROLS_LABEL" = "Chuyển đổi điều khiển"; 3 | "APPBUTTON_ACTIVATOR_ACTIVATION_FOOTER" = "Gán sự kiện kích hoạt cho AppButton.Khi không được gán, AppButton luôn luôn được nhìn thấy.Khi chế độ này tắt, AppButton được liếc qua khi kích hoạt"; 4 | "APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_LABEL" = "Cách thức kích hoạt"; 5 | "APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_HEADER" = "Kích hoạt AppButton"; 6 | "APPBUTTON_ACTIVATOR_ACTIVATION_TOGGLE_MODE_LABEL" = "Chế độ chuyển đổi"; 7 | "SINGLE_TAP_ACTION_FOOTER" = "Hành động được thực hiện khi chạm 1 lần"; 8 | "SINGLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR" = "Hành động để thực hiện khi chạm 1 lần lên AppButton. Hành động Activator được ghi đè lên AppButton mặc định"; 9 | "TAP_ACTION_IGNORE" = "Từ chối"; 10 | "TAP_ACTION_LAST_APP" = "Ứng dụng mở lần cuối"; 11 | "TAP_ACTION_TAP_HOME" = "Nhấn nút home 1 lần"; 12 | "TAP_ACTION_DOUBLE_TAP_HOME" = "Nhấn nút home 2 lần"; 13 | "TAP_ACTION_ACTIVATOR_OTHER" = "Khác"; 14 | "SINGLE_TAP_ACTIVATOR_HEADER" = "Chạm 1 lần lên AppButton"; 15 | "DOUBLE_TAP_ACTION_FOOTER" = "Hành động để thực hiện khi chạm 2 lần lên AppButton"; 16 | "DOUBLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR" = "Hành động để thực hiện khi chạm 2 lần lên AppButton. Hành động Activator được ghi đè lên AppButton mặc định"; 17 | "DOUBLE_TAP_ACTIVATOR_HEADER" = "Chạm 2 lần lên AppButton"; 18 | "SNAP_TO_EDGE_FOOTER" = "Bắt buộc AppButton chụp vào các góc cạnh của màn hình"; 19 | "SNAP_TO_EDGE_LABEL" = "Dock để màn hình cạnh"; 20 | "SCROLL_ENABLED_FOOTER" = "Di chuyển thông qua các biểu tượng khi màn hình không thể hiển thị tất cả"; 21 | "SCROLL_ENABLED_LABEL" = "Cho phép cuộn"; 22 | "KILL_APPS_FOOTER" = "Chạm và giữ vào cuối khay hai giây để cho phép đóng tất cả các ứng dụng đang chạy. Các ứng dụng thuộc danh sách trắng sẽ không bị đóng khi thực hiện nhiệm vụ này"; 23 | "KILL_APPS_LABEL" = "Cử chỉ diệt ứng dụng"; 24 | "WHITELIST_SECTION_HEADER" = "Danh sách ứng dụng ưu tiên"; 25 | "SAUSAGE_FINGERS_FOOTER" = "Thiết lập biểu tượng khởi động cho một sự việc trước ngón tay của bạn"; 26 | "SAUSAGE_FINGERS_LABEL" = "Đoạn ngón tay"; 27 | "BEHAVIOR_SECTION_LABEL" = "Các cử chỉ thiết lập"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/cs.lproj/abbehavior.strings: -------------------------------------------------------------------------------- 1 | "SWAP_CONTROLS_FOOTER" = "Pokud je tato volba zapnutá, lišta se otevře při stisknutí a podžení. Pokud je vypnutíá, pro zobrazení stačí po liště přejet prstem."; 2 | "SWAP_CONTROLS_LABEL" = "Změnit ovládání"; 3 | "APPBUTTON_ACTIVATOR_ACTIVATION_FOOTER" = "Přiřadit akce, které zapnou AppButton. Pokud není přiřazeno nic, AppButton bude stále aktivní. Pokud je vypnutý režim přepínaní, AppButton se po aktivaci objeví jen na chvilku."; 4 | "APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_LABEL" = "Metody aktivace"; 5 | "APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_HEADER" = "Aktivace AppButtonu"; 6 | "APPBUTTON_ACTIVATOR_ACTIVATION_TOGGLE_MODE_LABEL" = "Režim přepínaní"; 7 | "SINGLE_TAP_ACTION_FOOTER" = "Akce, kterou má AppButton provést, pokud je na něj ťuknuto."; 8 | "SINGLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR" = "Akce, kterou má AppButton provést, pokud je na něj ťuknuto. Akce z Activatoru přepíšou výchozí akce AppButtonu."; 9 | "TAP_ACTION_IGNORE" = "Ignorovat"; 10 | "TAP_ACTION_LAST_APP" = "Poslední aplikace"; 11 | "TAP_ACTION_TAP_HOME" = "Stiknout tlačítko domů"; 12 | "TAP_ACTION_DOUBLE_TAP_HOME" = "Dvakrát stisknout tlačítkou domů"; 13 | "TAP_ACTION_ACTIVATOR_OTHER" = "Jiná"; 14 | "SINGLE_TAP_ACTIVATOR_HEADER" = "Jedno ťuknutí na AppButton"; 15 | "DOUBLE_TAP_ACTION_FOOTER" = "Akce, kterou má AppButton provést, pokud je na něj dvakrát ťuknuto."; 16 | "DOUBLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR" = "Akce, kterou má AppButton provést, pokud je na něj dvakrát ťuknuto. Akce z Activatoru přepíšou výchozí akce AppButtonu."; 17 | "DOUBLE_TAP_ACTIVATOR_HEADER" = "Dvojité ťuknutí na AppButton"; 18 | "SNAP_TO_EDGE_FOOTER" = "Donutí AppButton zůstat o okraje obrazovky."; 19 | "SNAP_TO_EDGE_LABEL" = "Připoutat okraji"; 20 | "SCROLL_ENABLED_FOOTER" = "AppButton bude listovat ikonami, když nebudou moci být na obrazovce všechny zobrazeny."; 21 | "SCROLL_ENABLED_LABEL" = "Listování"; 22 | "KILL_APPS_FOOTER" = "Podržení konce lišty a následné puštění zavře všechny běžící aplikace. Aplikace z whitelistu zavřeny nebudou."; 23 | "KILL_APPS_LABEL" = "Gesto pro zavření aplikací"; 24 | "WHITELIST_SECTION_HEADER" = "Whitelist aplikací"; 25 | "SAUSAGE_FINGERS_FOOTER" = "Bude spuštěna aplikace, která je před Vaším prstem (a ne ta pod ním)."; 26 | "SAUSAGE_FINGERS_LABEL" = "Prsty jako nožky párku"; 27 | "BEHAVIOR_SECTION_LABEL" = "Chování"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/es.lproj/abbehavior.strings: -------------------------------------------------------------------------------- 1 | "SWAP_CONTROLS_FOOTER" = "Cuando esta opción está activada, la bandeja se abre después de tocar y mantener. Cuando está desactivada, la bandeja se abre al deslizar."; 2 | "SWAP_CONTROLS_LABEL" = "Intercambiar Controles"; 3 | "APPBUTTON_ACTIVATOR_ACTIVATION_FOOTER" = "Asigna acciones de activación de AppButton. Cuando ninguna está asignada, AppButton está siempre visible. Cuando el modo interruptor está apagado, AppButton aparece brevemente al activarse."; 4 | "APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_LABEL" = "Métodos de Activación"; 5 | "APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_HEADER" = "Activar AppButton"; 6 | "APPBUTTON_ACTIVATOR_ACTIVATION_TOGGLE_MODE_LABEL" = "Modo Interruptor"; 7 | "SINGLE_TAP_ACTION_FOOTER" = "Acción a realizar al tocar AppButton."; 8 | "SINGLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR" = "Acción a realizar al tocar AppButton. Las acciones de Activator anulan las acciones por defecto de AppButton."; 9 | "TAP_ACTION_IGNORE" = "Ignorar"; 10 | "TAP_ACTION_LAST_APP" = "Última App"; 11 | "TAP_ACTION_TAP_HOME" = "Botón de Inicio"; 12 | "TAP_ACTION_DOUBLE_TAP_HOME" = "Doble Botón de Inicio"; 13 | "TAP_ACTION_ACTIVATOR_OTHER" = "Otra"; 14 | "SINGLE_TAP_ACTIVATOR_HEADER" = "Toque AppButton"; 15 | "DOUBLE_TAP_ACTION_FOOTER" = "Acción a realizar al hacer un doble toque a AppButton."; 16 | "DOUBLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR" = "Acción a realizar al hacer un doble toque a AppButton. Las acciones de Activator anulan las acciones por defecto de AppButton."; 17 | "DOUBLE_TAP_ACTIVATOR_HEADER" = "Doble Toque AppButton"; 18 | "SNAP_TO_EDGE_FOOTER" = "Obliga a AppButton a quedarse en el borde de la pantalla."; 19 | "SNAP_TO_EDGE_LABEL" = "Acoplar al Borde de la Pantalla"; 20 | "SCROLL_ENABLED_FOOTER" = "Se desplaza a través de los iconos cuando la pantalla no puede mostrarlos todos."; 21 | "SCROLL_ENABLED_LABEL" = "Desplazamiento Activado"; 22 | "KILL_APPS_FOOTER" = "Manteniendo al final de la bandeja por dos segundos y luego soltando, se cerrarán todas las apps abiertas. Las apps excluidas no se cerrarán al realizar este gesto."; 23 | "KILL_APPS_LABEL" = "Gesto para Cerrar Apps"; 24 | "WHITELIST_SECTION_HEADER" = "Apps Excluidas"; 25 | "SAUSAGE_FINGERS_FOOTER" = "Cuando esta opción está activada, la app que se abrirá será la que aparezca antes de tu dedo."; 26 | "SAUSAGE_FINGERS_LABEL" = "Dedos de Chorizo"; 27 | "BEHAVIOR_SECTION_LABEL" = "Comportamiento"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/pt.lproj/abbehavior.strings: -------------------------------------------------------------------------------- 1 | "SWAP_CONTROLS_FOOTER" = "Quando habilitado, a bandeja é aberta após um toque e manter segurando. Quando desabilitado, a bandeja é aberta ao deslizar o dedo no botão"; 2 | "SWAP_CONTROLS_LABEL" = "Inverter controles"; 3 | "APPBUTTON_ACTIVATOR_ACTIVATION_FOOTER" = "Atribuir eventos do Activator para ativar o AppButton. Quando nenhum está selecionado, o AppButton estará sempre visível. Quando o modo de alternância está desligado, o AppButton aparece quando ativado."; 4 | "APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_LABEL" = "Métodos de ativação"; 5 | "APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_HEADER" = "Ativar AppButton"; 6 | "APPBUTTON_ACTIVATOR_ACTIVATION_TOGGLE_MODE_LABEL" = "Modo de alternância"; 7 | "SINGLE_TAP_ACTION_FOOTER" = "Ação a ser realizada quando se clica no AppButton."; 8 | "SINGLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR" = "Ação a ser realizada quando se clica no AppButton. Ações do Activator sobrescrevem as padrões do AppButton."; 9 | "TAP_ACTION_IGNORE" = "Ignorar"; 10 | "TAP_ACTION_LAST_APP" = "Último Aplicativo"; 11 | "TAP_ACTION_TAP_HOME" = "Toque botão Home"; 12 | "TAP_ACTION_DOUBLE_TAP_HOME" = "Toque duplo botão Home"; 13 | "TAP_ACTION_ACTIVATOR_OTHER" = "Outro"; 14 | "SINGLE_TAP_ACTIVATOR_HEADER" = "Toque Único no AppButton"; 15 | "DOUBLE_TAP_ACTION_FOOTER" = "Ação a ser realizada quando há um toque duplo no AppButton."; 16 | "DOUBLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR" = "Ação a ser realizada quando há um toque duplo no AppButton. Ações do Activator sobrescrevem as padrões do AppButton."; 17 | "DOUBLE_TAP_ACTIVATOR_HEADER" = "Toque Duplo no AppButton"; 18 | "SNAP_TO_EDGE_FOOTER" = "Força o AppButton a se fixar apenas nos cantos da tela."; 19 | "SNAP_TO_EDGE_LABEL" = "Fixar no canto da tela"; 20 | "SCROLL_ENABLED_FOOTER" = "Lista de ícones quando não há espaço na tela para todos eles."; 21 | "SCROLL_ENABLED_LABEL" = "Rolagem habilitada"; 22 | "KILL_APPS_FOOTER" = "Segurar no final da bandeja por dois segundos e depois soltar fecha todos aplicativos em funcionamento. Apps na Lista Branca não são fechadas quando essa ação é executada."; 23 | "KILL_APPS_LABEL" = "Ação para Fechar aplicativos"; 24 | "WHITELIST_SECTION_HEADER" = "Lista Branca de Aplicativos"; 25 | "SAUSAGE_FINGERS_FOOTER" = "Seleciona o aplicativo a ser aberto ao anterior aonde seu dedo está."; 26 | "SAUSAGE_FINGERS_LABEL" = "Dedos de salsicha"; 27 | "BEHAVIOR_SECTION_LABEL" = "Comportamento"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/it.lproj/abbehavior.strings: -------------------------------------------------------------------------------- 1 | "SWAP_CONTROLS_FOOTER" = "Quando abilitato, il vassoio viene aperto dopo un tocco mantenuto. Quando disabilitato, il vassoio viene aperto passandoci sopra."; 2 | "SWAP_CONTROLS_LABEL" = "Inverti Controlli"; 3 | "APPBUTTON_ACTIVATOR_ACTIVATION_FOOTER" = "Assegna ad AppButton un evento di attivazione. Quando non ci sono azioni assegnate, AppButton sarà sempre visibile. Quando la modalità di visualizzazione è disattivata, Appbutton spunta solo quando toccato."; 4 | "APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_LABEL" = "Metodi di Attivazione"; 5 | "APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_HEADER" = "Attiva AppButton"; 6 | "APPBUTTON_ACTIVATOR_ACTIVATION_TOGGLE_MODE_LABEL" = "Alterna Modalità"; 7 | "SINGLE_TAP_ACTION_FOOTER" = "Azione da permormare quando AppButton viene toccato."; 8 | "SINGLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR" = "Azione da permormare quando AppButton viene toccato. Le azioni di Activator ignorano le azioni predefinite di AppButton."; 9 | "TAP_ACTION_IGNORE" = "Ignora"; 10 | "TAP_ACTION_LAST_APP" = "Ultima Applicazione"; 11 | "TAP_ACTION_TAP_HOME" = "Tocco del Pulsante Home"; 12 | "TAP_ACTION_DOUBLE_TAP_HOME" = "Doppio Tocco del Pulsante Home"; 13 | "TAP_ACTION_ACTIVATOR_OTHER" = "Altro"; 14 | "SINGLE_TAP_ACTIVATOR_HEADER" = "Singolo Tocco di AppButton"; 15 | "DOUBLE_TAP_ACTION_FOOTER" = "Azione da permormare quando AppButton viene toccato due volte."; 16 | "DOUBLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR" = "Azione da permormare quando AppButton viene toccato due volte. Le azioni di Activator ignorano le azioni predefinite di AppButton."; 17 | "DOUBLE_TAP_ACTIVATOR_HEADER" = "Doppio Tocco di AppButton"; 18 | "SNAP_TO_EDGE_FOOTER" = "Forza AppButton ad attaccarsi alle estremità dello schermo."; 19 | "SNAP_TO_EDGE_LABEL" = "Attacca alle estremità dello schermo"; 20 | "SCROLL_ENABLED_FOOTER" = "Scorri attraverso le icone quando lo schermo non può mostrarle tutte."; 21 | "SCROLL_ENABLED_LABEL" = "Abilita lo Scorrimento"; 22 | "KILL_APPS_FOOTER" = "Tenere premuto alla dine del vassoio per due secondi e lasciar andare, chiude tutte le applicazioni aperte. Applicazione nella Whitelist non verranno chiuse quando questo gesto viene effettuato."; 23 | "KILL_APPS_LABEL" = "Gesto per Chiudere le Applicazioni"; 24 | "WHITELIST_SECTION_HEADER" = "Applicazioni nella Whitelist"; 25 | "SAUSAGE_FINGERS_FOOTER" = "Imposta l'icona da lanciare a quela prima del tuo dito."; 26 | "SAUSAGE_FINGERS_LABEL" = "Dita Larghe"; 27 | "BEHAVIOR_SECTION_LABEL" = "Comportamento"; -------------------------------------------------------------------------------- /appbuttonprefs/Resources/zh-Hant.lproj/abbehavior.strings: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | APPBUTTON_ACTIVATOR_ACTIVATION_FOOTER 6 | 指定 AppButton 啟動事件。 當沒有被分配啟動事件, AppButton 會常常可見。 當 切換模式 關閉時,啟動來顯示AppButton。 7 | APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_HEADER 8 | AppButton 啟動 9 | APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_LABEL 10 | 啟動方法 11 | APPBUTTON_ACTIVATOR_ACTIVATION_TOGGLE_MODE_LABEL 12 | 切換模式 13 | BEHAVIOR_SECTION_LABEL 14 | 行為 15 | DOUBLE_TAP_ACTION_FOOTER 16 | 雙擊 AppButton 會執行的操作。 17 | DOUBLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR 18 | 雙擊 AppButton 會執行的操作。操作會覆蓋 AppButton 預設功能。 19 | DOUBLE_TAP_ACTIVATOR_HEADER 20 | AppButton 雙擊 21 | KILL_APPS_FOOTER 22 | 保持按住托盤邊緣2秒再放開會關閉所有正在運行的應用。當執行這個手勢時,白名單應用不會被關閉。 23 | KILL_APPS_LABEL 24 | 殺掉應用手勢 25 | SAUSAGE_FINGERS_FOOTER 26 | 設定啟動圖標到你的手指前。 27 | SAUSAGE_FINGERS_LABEL 28 | 肥手指 29 | SCROLL_ENABLED_FOOTER 30 | 當屏幕無法顯示全部應用會滾動圖標。 31 | SCROLL_ENABLED_LABEL 32 | 啟用滾動 33 | SINGLE_TAP_ACTION_FOOTER 34 | 按 AppButton 會執行的操作。 35 | SINGLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR 36 | 按 AppButton 會執行的操作。 Activator 操作會覆蓋 AppButton 預設功能。 37 | SINGLE_TAP_ACTIVATOR_HEADER 38 | AppButton 單擊 39 | SNAP_TO_EDGE_FOOTER 40 | 強迫 AppButton 到屏幕的邊緣。 41 | SNAP_TO_EDGE_LABEL 42 | 對接到屏幕的邊緣 43 | SWAP_CONTROLS_FOOTER 44 | 當啟用這個功能時侯,點擊並按住來開啟托盤。當關閉這個功能,托盤是由刷掃來開啟。 45 | SWAP_CONTROLS_LABEL 46 | 對換控制 47 | TAP_ACTION_ACTIVATOR_OTHER 48 | 其它 49 | TAP_ACTION_DOUBLE_TAP_HOME 50 | 雙擊主頁按鈕 51 | TAP_ACTION_IGNORE 52 | 忽略 53 | TAP_ACTION_LAST_APP 54 | 最後程式 55 | TAP_ACTION_TAP_HOME 56 | 點擊主頁按鈕 57 | WHITELIST_SECTION_HEADER 58 | 白名單應用 59 | 60 | 61 | -------------------------------------------------------------------------------- /appbuttonprefs/Resources/de.lproj/abbehavior.strings: -------------------------------------------------------------------------------- 1 | "SWAP_CONTROLS_FOOTER" = "Wenn aktiviert, wird die Ablage nach einem Antippen und Halten geöffnet. Wenn deaktiviert, wird die Ablage durch einen Swipe mit dem Finger geöffnet."; 2 | "SWAP_CONTROLS_LABEL" = "Swap-Regler"; 3 | "APPBUTTON_ACTIVATOR_ACTIVATION_FOOTER" = "Ordne dem AppButton Activator-Events zu. Falls keine zugeordnet sind, ist der AppButton immer sichtbar. Wenn der Schalter ausgeschaltet ist, späht der AppButton wenn er aktiviert wird."; 4 | "APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_LABEL" = "Aktivierungs-Methode"; 5 | "APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_HEADER" = "AppButton Aktivierung"; 6 | "APPBUTTON_ACTIVATOR_ACTIVATION_TOGGLE_MODE_LABEL" = "Toggle-Modus"; 7 | "SINGLE_TAP_ACTION_FOOTER" = "Aktion die durchgeführt wird, wenn der AppButton angetippt wird."; 8 | "SINGLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR" = "Aktion die durchgeführt wird, wenn der AppButton angetippt wird. Activator-Events überschreiben AppButton’s Voreinstellungen."; 9 | "TAP_ACTION_IGNORE" = "Nichts"; 10 | "TAP_ACTION_LAST_APP" = "Letzte App"; 11 | "TAP_ACTION_TAP_HOME" = "Einmal Home-Taste"; 12 | "TAP_ACTION_DOUBLE_TAP_HOME" = "Zweifach Home-Taste"; 13 | "TAP_ACTION_ACTIVATOR_OTHER" = "Anderes"; 14 | "SINGLE_TAP_ACTIVATOR_HEADER" = "AppButton einmal antippen"; 15 | "DOUBLE_TAP_ACTION_FOOTER" = "Aktion die durchgeführt wird, wenn der AppButton zweifach angetippt wird."; 16 | "DOUBLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR" = "Aktion die durchgeführt wird, wenn der AppButton zweifach angetippt wird. Activator-Events überschreiben AppButtons’s Voreinstellungen."; 17 | "DOUBLE_TAP_ACTIVATOR_HEADER" = "AppButton zweimal antippen"; 18 | "SNAP_TO_EDGE_FOOTER" = "Erzwingt, dass der AppButton an den Rändern des Bildschirms positioniert wird"; 19 | "SNAP_TO_EDGE_LABEL" = "Am Rand des Bildschirms andocken"; 20 | "SCROLL_ENABLED_FOOTER" = "Durch die Symbole scrollen wenn diese nicht ganz vom Bildschirm angezeigt werden können."; 21 | "SCROLL_ENABLED_LABEL" = "Scrollen Aktivieren"; 22 | "KILL_APPS_FOOTER" = "Wenn das Ende der Ablage für zwei Sekunden gehalten und dann losgelassen wird, werden alle laufenden Apps geschlossen. Apps die in der Whitelist gespeichert sind, werden nicht geschlossen, wenn diese Geste ausgeführt wird."; 23 | "KILL_APPS_LABEL" = "Alle Apps schließen"; 24 | "WHITELIST_SECTION_HEADER" = "Whitelisted Apps"; 25 | "SAUSAGE_FINGERS_FOOTER" = "Startet die App die sich vor deinem Finger befindet"; 26 | "SAUSAGE_FINGERS_LABEL" = "Wurstfinger"; 27 | "BEHAVIOR_SECTION_LABEL" = "Bedienung"; -------------------------------------------------------------------------------- /appbuttonprefs/ABAboutTableCell.m: -------------------------------------------------------------------------------- 1 | #import "prefs-common.h" 2 | 3 | @interface ABAboutTableCell : PSTableCell{ // 4 | UILabel *_label; 5 | UILabel *_jobText; 6 | UIImageView *_personImage; 7 | } 8 | @end 9 | 10 | @implementation ABAboutTableCell 11 | 12 | -(id)initWithStyle:(int)arg1 reuseIdentifier:(id)arg2 specifier:(id)arg3 { //init method 13 | self = [super initWithStyle:arg1 reuseIdentifier:arg2 specifier:arg3]; //call the super init method 14 | if (self) { 15 | NSString *personPath=[[NSBundle bundleForClass:[self class]] pathForResource:@"steverolfe" ofType:@"png"]; 16 | _personImage=[[UIImageView alloc] initWithFrame:CGRectMake(10,10,50,50)]; 17 | [_personImage setImage:[UIImage imageWithContentsOfFile:personPath]]; 18 | [_personImage setClipsToBounds:YES]; 19 | [_personImage.layer setCornerRadius:_personImage.bounds.size.width/2]; 20 | [_personImage.layer setMasksToBounds:YES]; 21 | [_personImage.layer setBorderWidth:1.0]; 22 | [_personImage.layer setBorderColor:[UIColor whiteColor].CGColor]; 23 | [self addSubview:_personImage]; 24 | 25 | 26 | CGRect frame = [self frame]; 27 | frame.origin=CGPointMake(70,2); 28 | 29 | _label = [[UILabel alloc] initWithFrame:frame]; 30 | 31 | NSMutableAttributedString *attributedString=[[NSMutableAttributedString alloc] initWithString:@"Steve Rolfe @Chewmieser"]; 32 | [attributedString addAttribute:NSFontAttributeName value:[UIFont fontWithName:@"HelveticaNeue" size:24] range:NSMakeRange(0, 12)]; 33 | [attributedString addAttribute:NSFontAttributeName value:[UIFont fontWithName:@"HelveticaNeue-UltraLight" size:24] range:NSMakeRange(12, 11)]; 34 | 35 | [_label setAttributedText:attributedString]; 36 | [_label setBackgroundColor:[UIColor clearColor]]; 37 | [_label setShadowColor:[UIColor whiteColor]]; 38 | [_label setShadowOffset:CGSizeMake(0,1)]; 39 | [_label setTextAlignment:NSTextAlignmentLeft]; 40 | 41 | [self addSubview:_label]; 42 | 43 | frame.origin=CGPointMake(70,27); 44 | _jobText = [[UILabel alloc] initWithFrame:frame]; 45 | 46 | [_jobText setFont:[UIFont fontWithName:@"HelveticaNeue-UltraLight" size:18]]; 47 | [_jobText setText:@"Developer"]; 48 | [_jobText setBackgroundColor:[UIColor clearColor]]; 49 | [_jobText setShadowColor:[UIColor whiteColor]]; 50 | [_jobText setShadowOffset:CGSizeMake(0,1)]; 51 | [_jobText setTextAlignment:NSTextAlignmentLeft]; 52 | 53 | [self addSubview:_jobText]; 54 | } 55 | return self; 56 | } 57 | 58 | @end -------------------------------------------------------------------------------- /appbuttonprefs/ABAboutKyleTableCell.m: -------------------------------------------------------------------------------- 1 | #import "prefs-common.h" 2 | 3 | @interface ABAboutKyleTableCell : PSTableCell{ // 4 | UILabel *_label; 5 | UILabel *_jobText; 6 | UIImageView *_personImage; 7 | } 8 | @end 9 | 10 | @implementation ABAboutKyleTableCell 11 | 12 | -(id)initWithStyle:(int)arg1 reuseIdentifier:(id)arg2 specifier:(id)arg3 { //init method 13 | self = [super initWithStyle:arg1 reuseIdentifier:arg2 specifier:arg3]; //call the super init method 14 | if (self) { 15 | NSString *personPath=[[NSBundle bundleForClass:[self class]] pathForResource:@"kyle" ofType:@"png"]; 16 | _personImage=[[UIImageView alloc] initWithFrame:CGRectMake(10,10,50,50)]; 17 | [_personImage setImage:[UIImage imageWithContentsOfFile:personPath]]; 18 | [_personImage setClipsToBounds:YES]; 19 | [_personImage.layer setCornerRadius:_personImage.bounds.size.width/2]; 20 | [_personImage.layer setMasksToBounds:YES]; 21 | [_personImage.layer setBorderWidth:1.0]; 22 | [_personImage.layer setBorderColor:[UIColor whiteColor].CGColor]; 23 | [self addSubview:_personImage]; 24 | 25 | 26 | CGRect frame = [self frame]; 27 | frame.origin=CGPointMake(70,2); 28 | 29 | _label = [[UILabel alloc] initWithFrame:frame]; 30 | 31 | NSMutableAttributedString *attributedString=[[NSMutableAttributedString alloc] initWithString:@"Kyle Revony @Krevony"]; 32 | [attributedString addAttribute:NSFontAttributeName value:[UIFont fontWithName:@"HelveticaNeue" size:24] range:NSMakeRange(0, 11)]; 33 | [attributedString addAttribute:NSFontAttributeName value:[UIFont fontWithName:@"HelveticaNeue-UltraLight" size:24] range:NSMakeRange(11, 9)]; 34 | 35 | [_label setAttributedText:attributedString]; 36 | [_label setBackgroundColor:[UIColor clearColor]]; 37 | [_label setShadowColor:[UIColor whiteColor]]; 38 | [_label setShadowOffset:CGSizeMake(0,1)]; 39 | [_label setTextAlignment:NSTextAlignmentLeft]; 40 | 41 | [self addSubview:_label]; 42 | 43 | frame.origin=CGPointMake(70,27); 44 | _jobText = [[UILabel alloc] initWithFrame:frame]; 45 | 46 | [_jobText setFont:[UIFont fontWithName:@"HelveticaNeue-UltraLight" size:18]]; 47 | [_jobText setText:@"Designer"]; 48 | [_jobText setBackgroundColor:[UIColor clearColor]]; 49 | [_jobText setShadowColor:[UIColor whiteColor]]; 50 | [_jobText setShadowOffset:CGSizeMake(0,1)]; 51 | [_jobText setTextAlignment:NSTextAlignmentLeft]; 52 | 53 | [self addSubview:_jobText]; 54 | } 55 | return self; 56 | } 57 | 58 | @end -------------------------------------------------------------------------------- /AppButton.h: -------------------------------------------------------------------------------- 1 | #import "common.h" 2 | #import "ABWindow.h" 3 | #import 4 | 5 | #pragma clang diagnostic ignored "-Wswitch" 6 | #define DEGREES_TO_RADIANS(angle) ((angle) / 180.0 * M_PI) 7 | 8 | @interface ABEventDataSource: NSObject 9 | @end 10 | 11 | @interface ABEventHandler : NSObject { 12 | NSTimer *visibilityTimer; 13 | } 14 | - (BOOL)hasListenerAssigned; 15 | - (void)checkVisibility; 16 | - (NSData *)dataForActivatorImageWithScale:(CGFloat)scale; 17 | @end 18 | 19 | @interface ABViewController : UIViewController 20 | @end 21 | 22 | @interface AppButton : NSObject{ 23 | NSMutableArray *theIcons; 24 | NSMutableArray *bundles; 25 | 26 | NSMutableArray *favoriteBundles; 27 | NSMutableArray *favoriteIcons; 28 | NSMutableArray *filteredFavBundles; 29 | 30 | BOOL didTapDat; 31 | 32 | NSMutableDictionary *prefs; 33 | } 34 | - (id)init; 35 | - (void)initializeButton; 36 | - (void)cacheIcons; 37 | - (NSMutableArray *)icons; 38 | - (NSMutableArray *)identifiers; 39 | - (NSMutableArray *)favoriteBundles; 40 | - (NSMutableArray *)favoriteIcons; 41 | - (void)cacheFavoriteIcons; 42 | - (void)savePosition:(CGPoint)position; 43 | 44 | - (id)getPreferenceForKey:(NSString *)key; 45 | - (BOOL)getToggleForKey:(NSString *)key; 46 | - (float)getFloatForKey:(NSString *)key; 47 | 48 | - (UIView *)touchesView; 49 | - (UIVisualEffectView *)effectView; 50 | - (ABWindow *)window; 51 | 52 | - (void)didPickApplication:(NSString *)bundle; 53 | - (void)simulateHomePress; 54 | 55 | - (void)stopNotificationCenter; 56 | - (void)startNotificationCenter; 57 | 58 | - (void)hideWindow; 59 | - (void)showWindow; 60 | - (void)appButtonScreenshotHide; 61 | - (void)appButtonScreenshotUnhide; 62 | 63 | - (void)toggleAppButton; 64 | - (void)showAppButton; 65 | - (void)hideAppButton; 66 | - (void)updateAppButtonVisibility; 67 | 68 | - (void)killAllRunningApplications; 69 | @end 70 | 71 | 72 | @interface ABButtonView : UIView{ 73 | BOOL isMovable; 74 | BOOL isPositionable; 75 | BOOL didSomething; 76 | float maxTrayHeight; 77 | UIImageView *iconImageView; 78 | AppButton *abutton; 79 | ABWindow *abWin; 80 | 81 | CGPoint firstTouch; 82 | 83 | float lastAngle; 84 | int currentView; 85 | 86 | NSMutableArray *filteredFavBundles; 87 | NSMutableArray *favoriteIcons; 88 | 89 | NSMutableDictionary *cachedColors; 90 | 91 | UIScrollView *trayView; 92 | 93 | BOOL isExpanding; 94 | BOOL isShrinking; 95 | 96 | float capHeight; 97 | float heightForScroll; 98 | 99 | BOOL clearTrayWaiting; 100 | BOOL willDestroyMultitasking; 101 | } 102 | - (id)initWithFrame:(CGRect)frame andButton:(AppButton *)button; 103 | - (void)unlockOpenTray; 104 | - (void)lockOpenTray; 105 | - (void)configureLayout; 106 | - (void)setupIconView; 107 | 108 | - (void)scrollToEnd; 109 | - (void)scrollToBeginning; 110 | - (void)stopScrolling; 111 | 112 | - (int)calculateIconNumber; 113 | 114 | - (void)clearMultitaskingTrigger; 115 | @end -------------------------------------------------------------------------------- /appbuttonprefs/ABAboutController.m: -------------------------------------------------------------------------------- 1 | #import "prefs-common.h" 2 | 3 | @interface ABAboutController: PSListController { 4 | } 5 | @end 6 | 7 | @implementation ABAboutController 8 | - (id)specifiers { 9 | if(_specifiers == nil) { 10 | _specifiers = [self loadSpecifiersFromPlistName:@"ababout" target:self]; 11 | } 12 | return _specifiers; 13 | } 14 | 15 | - (void)openTwitter:(id)sender{ 16 | if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"tweetbot:"]]){ 17 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tweetbot:///user_profile/chewmieser"]]; 18 | }else if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"twitterrific:"]]){ 19 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"twitterrific:///profile?screen_name=chewmieser"]]; 20 | }else if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"tweetings:"]]){ 21 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tweetings:///user?screen_name=chewmieser"]]; 22 | }else if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"twitter:"]]){ 23 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"twitter://user?screen_name=chewmieser"]]; 24 | }else{ 25 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://mobile.twitter.com/chewmieser"]]; 26 | } 27 | } 28 | 29 | - (void)openKylesTwitter:(id)sender{ 30 | if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"tweetbot:"]]){ 31 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tweetbot:///user_profile/krevony"]]; 32 | }else if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"twitterrific:"]]){ 33 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"twitterrific:///profile?screen_name=krevony"]]; 34 | }else if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"tweetings:"]]){ 35 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"tweetings:///user?screen_name=krevony"]]; 36 | }else if ([[UIApplication sharedApplication] canOpenURL:[NSURL URLWithString:@"twitter:"]]){ 37 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"twitter://user?screen_name=krevony"]]; 38 | }else{ 39 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"https://mobile.twitter.com/krevony"]]; 40 | } 41 | } 42 | 43 | - (NSString *)languageForSpecifier:(PSSpecifier *)specifier{ 44 | return [specifier propertyForKey:@"language"]; 45 | } 46 | 47 | - (void)emailMe:(id)sender{ 48 | [[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"mailto:steve@rolfe.land?subject=AppButton%200.8.3&body=I%20love%20AppButton!"]]; 49 | } 50 | 51 | - (void)resetSettings:(id)sender{ 52 | CFPreferencesSetValue(CFSTR("ResetSettings"), (__bridge CFPropertyListRef)[NSNumber numberWithInt:1], CFSTR("com.chewmieser.appbutton"), kCFPreferencesCurrentUser, kCFPreferencesAnyHost); 53 | CFPreferencesAppSynchronize(CFSTR("com.chewmieser.appbutton")); 54 | 55 | CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR("com.chewmieser.appbutton.prefs-changed"), NULL, NULL, TRUE); 56 | } 57 | 58 | - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ 59 | if (indexPath.section<2){ 60 | return 70; 61 | }else{ 62 | return [super tableView:tableView heightForRowAtIndexPath:indexPath]; 63 | } 64 | } 65 | 66 | @end 67 | 68 | // vim:ft=objc -------------------------------------------------------------------------------- /common.h: -------------------------------------------------------------------------------- 1 | @interface UIImage (ColorAtPixel) 2 | - (UIColor *)colorAtPixel:(CGPoint)point; 3 | @end 4 | 5 | @interface UIVisualEffectView (ex) 6 | - (void)_setEffect:(id)arg1; 7 | @end 8 | 9 | @interface UIWindow (ex) 10 | - (void)_setSecure:(BOOL)arg1; 11 | - (void)_finishedFullRotation:(id)arg1 finished:(id)arg2 context:(id)arg3; 12 | - (void)_updateToInterfaceOrientation:(int)arg1 animated:(BOOL)arg2; 13 | - (void)setHidden:(BOOL)arg1; 14 | - (void)_resignKeyWindowStatus; 15 | - (void)_orderFrontWithoutMakingKey; 16 | - (void)setBecomeKeyOnOrderFront:(BOOL)arg1; 17 | - (void)setAutorotates:(BOOL)arg1 forceUpdateInterfaceOrientation:(BOOL)arg2; 18 | - (void)setAutorotates:(BOOL)arg1; 19 | - (void)makeKey:(id)arg1; 20 | @end 21 | 22 | @interface SBIcon 23 | - (id)applicationBundleID; 24 | @end 25 | 26 | @interface SBIconView : UIView 27 | @property(retain, nonatomic) SBIcon *icon; 28 | - (void)setHighlighted:(_Bool)arg1; 29 | @end 30 | 31 | @interface SBIconController 32 | - (void)clearHighlightedIcon; 33 | @end 34 | 35 | @interface SBApplicationIcon 36 | - (UIImage *)generateIconImage:(int)arg1; 37 | - (id)getUnmaskedIconImage:(int)arg1; 38 | - (id)initWithApplication:(id)arg1; 39 | @end 40 | 41 | @interface SBAppSwitcherModel 42 | - (void)removeDisplayItem:(id)arg1; 43 | - (void)remove:(id)arg1; 44 | + (id)sharedInstance; 45 | - (NSArray *)snapshotOfFlattenedArrayOfAppIdentifiersWhichIsOnlyTemporary; 46 | @end 47 | 48 | @interface SBApplication 49 | - (id)mainSceneID; 50 | - (id)mainScene; 51 | - (id)bundleIdentifier; 52 | - (id)_screenFromSceneID:(id)arg1; 53 | - (_Bool)isInternalApplication; 54 | - (_Bool)isSystemApplication; 55 | - (NSArray *)tags; 56 | @end 57 | 58 | @interface SBApplicationController 59 | + (id)sharedInstance; 60 | - (id)applicationWithPid:(int)arg1; 61 | - (SBApplication *)applicationWithBundleIdentifier:(id)arg1; 62 | @end 63 | 64 | @interface SBDisplayItem : NSObject 65 | + (id)displayItemWithType:(NSString *)arg1 displayIdentifier:(id)arg2; 66 | @property(readonly, nonatomic) NSString *displayIdentifier; 67 | @end 68 | 69 | @interface SBDisplayLayout : NSObject 70 | @property(readonly, nonatomic) NSArray *displayItems; 71 | @end 72 | 73 | @interface SBAppSwitcherIconController : UIViewController{ 74 | NSMutableArray *_appList; 75 | NSMutableDictionary *_iconViews; 76 | } 77 | @end 78 | 79 | @interface SBAppSwitcherServices 80 | @property(readonly, nonatomic) NSMutableArray *services; // @synthesize services=_services; 81 | - (id)displayItems; 82 | - (id)serviceBundleIdentifiers; 83 | - (id)serviceForIdentifier:(id)arg1; 84 | - (id)serviceForBundleIdentifier:(id)arg1; 85 | - (id)serviceAtIndex:(unsigned long long)arg1; 86 | - (unsigned long long)count; 87 | - (void)removeService:(id)arg1; 88 | - (void)addService:(id)arg1; 89 | - (id)copyWithZone:(struct _NSZone *)arg1; 90 | - (void)dealloc; 91 | - (id)initWithServices:(id)arg1 zone:(struct _NSZone *)arg2; 92 | @end 93 | 94 | @interface SBAppSwitcherController : UIViewController{ 95 | NSMutableArray *_appList_use_block_accessor; 96 | NSMutableSet *_hostedApplications; 97 | SBAppSwitcherServices *_switcherServices_use_block_accessor; 98 | } 99 | 100 | - (void)_rebuildAppListCache; 101 | - (void)_destroyAppListCache; 102 | @property(readonly, nonatomic) SBAppSwitcherIconController *iconController; 103 | 104 | @end 105 | 106 | @interface SBUIController 107 | +(id)sharedInstance; 108 | -(void)clickedMenuButton; 109 | -(void)handleMenuDoubleTap; 110 | -(void)activateApplicationAnimated:(id)arg1; 111 | -(SBAppSwitcherController *)switcherController; 112 | @end 113 | 114 | @interface SpringBoard : UIApplication{ 115 | } 116 | @property(nonatomic) int nowPlayingProcessPID; 117 | - (id)_accessibilityRunningApplications; 118 | - (id)_accessibilityFrontMostApplication; 119 | - (id)_keyWindowForScreen:(id)arg1; 120 | @end -------------------------------------------------------------------------------- /appbuttonprefs/prefs-common.h: -------------------------------------------------------------------------------- 1 | typedef enum PSCellType { 2 | PSGroupCell, 3 | PSLinkCell, 4 | PSLinkListCell, 5 | PSListItemCell, 6 | PSTitleValueCell, 7 | PSSliderCell, 8 | PSSwitchCell, 9 | PSStaticTextCell, 10 | PSEditTextCell, 11 | PSSegmentCell, 12 | PSGiantIconCell, 13 | PSGiantCell, 14 | PSSecureEditTextCell, 15 | PSButtonCell, 16 | PSEditTextViewCell, 17 | } PSCellType; 18 | 19 | @interface PSTableCell : UITableViewCell 20 | //-(id)initWithStyle:(long long)arg1 reuseIdentifier:(id)arg2 specifier:(id)arg3; 21 | - (id)initWithSpecifier:(id)specifier; 22 | - (id)initWithStyle:(int)style reuseIdentifier:(NSString *)identifier specifier:(id)specifier; 23 | -(void)setIcon:(id)icon; 24 | 25 | @end 26 | 27 | @interface PSListController : UITableViewController{ 28 | UITableView *_table; 29 | id _specifiers; 30 | } 31 | - (id)specifiers; 32 | - (id)loadSpecifiersFromPlistName:(id)arg1 target:(id)arg2; 33 | - (PSTableCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath; 34 | - (void)_moveSpecifierAtIndex:(unsigned int)arg1 toIndex:(unsigned int)arg2 animated:(BOOL)arg3; 35 | - (int)indexOfSpecifier:(id)arg1; 36 | - (int)indexOfGroup:(int)arg1; 37 | - (void)beginUpdates; 38 | - (void)endUpdates; 39 | 40 | - (void)insertSpecifier:(id)arg1 atEndOfGroup:(int)arg2; 41 | - (void)removeSpecifierAtIndex:(int)arg1; 42 | 43 | - (UITableView *)table; 44 | 45 | - (id)specifierAtIndex:(int)arg1; 46 | - (int)indexForIndexPath:(id)arg1; 47 | - (id)indexPathForSpecifier:(id)arg1; 48 | - (id)indexPathForIndex:(int)arg1; 49 | 50 | - (void)_moveSpecifierAtIndex:(unsigned int)arg1 toIndex:(unsigned int)arg2 animated:(BOOL)arg3; 51 | - (NSArray *)specifiersInGroup:(int)arg1; 52 | - (int)indexOfGroup:(int)arg1; 53 | - (void)insertSpecifier:(id)arg1 atEndOfGroup:(int)arg2; 54 | 55 | -(void)reload; 56 | -(void)reloadSpecifiers; 57 | @end 58 | 59 | 60 | @interface PSSpecifier : NSObject{ 61 | id target; 62 | SEL getter; 63 | SEL setter; 64 | 65 | SEL cancel; 66 | Class detailControllerClass; 67 | long long cellType; 68 | Class editPaneClass; 69 | long long keyboardType; 70 | long long autoCapsType; 71 | long long autoCorrectionType; 72 | unsigned long long textFieldType; 73 | NSString *_name; 74 | NSArray *_values; 75 | NSDictionary *_titleDict; 76 | NSDictionary *_shortTitleDict; 77 | id _userInfo; 78 | NSMutableDictionary *_properties; 79 | SEL _confirmationAction; 80 | SEL _confirmationCancelAction; 81 | SEL _buttonAction; 82 | SEL _controllerLoadAction; 83 | _Bool _showContentString; 84 | 85 | @public 86 | SEL action; 87 | } 88 | @property(retain, nonatomic) NSString *name; 89 | + (long long)keyboardTypeForString:(id)arg1; 90 | + (long long)autoCapsTypeForString:(id)arg1; 91 | + (long long)autoCorrectionTypeForNumber:(id)arg1; 92 | + (id)emptyGroupSpecifier; 93 | + (id)groupSpecifierWithName:(id)arg1; 94 | + (id)preferenceSpecifierNamed:(id)arg1 target:(id)arg2 set:(SEL)arg3 get:(SEL)arg4 detail:(Class)arg5 cell:(long long)arg6 edit:(Class)arg7; 95 | - (id)description; 96 | - (void)dealloc; 97 | - (void)setValues:(id)arg1 titles:(id)arg2 shortTitles:(id)arg3 usingLocalizedTitleSorting:(_Bool)arg4; 98 | - (void)setValues:(id)arg1 titles:(id)arg2 shortTitles:(id)arg3; 99 | - (void)setValues:(id)arg1 titles:(id)arg2; 100 | - (id)properties; 101 | - (void)setProperties:(id)arg1; 102 | - (void)removePropertyForKey:(id)arg1; 103 | - (void)setProperty:(id)arg1 forKey:(id)arg2; 104 | - (id)propertyForKey:(id)arg1; 105 | - (id)init; 106 | @property(retain, nonatomic) NSString *identifier; 107 | @end 108 | 109 | @interface PSControlTableCell : PSTableCell 110 | -(UIControl *)control; 111 | @end 112 | 113 | @interface PSSwitchTableCell : PSControlTableCell 114 | -(id)initWithStyle:(int)arg1 reuseIdentifier:(id)arg2 specifier:(id)arg3 ; 115 | @end 116 | 117 | @interface PSSliderTableCell : PSControlTableCell 118 | -(id)initWithStyle:(int)arg1 reuseIdentifier:(id)arg2 specifier:(id)arg3 ; 119 | @end 120 | 121 | @interface PSSegmentTableCell : PSControlTableCell 122 | -(id)initWithStyle:(int)arg1 reuseIdentifier:(id)arg2 specifier:(id)arg3 ; 123 | @end -------------------------------------------------------------------------------- /appbuttonprefs/ABBehaviorController.m: -------------------------------------------------------------------------------- 1 | #import "prefs-common.h" 2 | #import 3 | #include 4 | 5 | @interface ABSwitchTableCell : PSSwitchTableCell //our class 6 | @end 7 | 8 | @interface ABBehaviorController: PSListController { 9 | } 10 | @end 11 | 12 | @implementation ABBehaviorController 13 | - (NSString *)localizedString:(NSString *)key{ 14 | return [[NSBundle bundleForClass: [self class]] localizedStringForKey:key value:key table:@"abbehavior"]; 15 | } 16 | 17 | - (id)specifiers { 18 | if(_specifiers == nil) { 19 | NSMutableArray *specs=[self loadSpecifiersFromPlistName:@"abbehavior" target:self]; 20 | 21 | // Look for Activator 22 | dlopen("/usr/lib/libactivator.dylib",RTLD_LAZY); 23 | Class la=objc_getClass("LAActivator"); 24 | 25 | if (la!=nil){ 26 | // Inject Activator group 27 | PSSpecifier *activatorGroup=[PSSpecifier emptyGroupSpecifier]; 28 | [activatorGroup setProperty:[self localizedString:@"APPBUTTON_ACTIVATOR_ACTIVATION_FOOTER"] forKey:@"footerText"]; 29 | [specs insertObject:activatorGroup atIndex:2]; 30 | 31 | // Inject activator specifier 32 | PSSpecifier *activatorSpecifier=[PSSpecifier preferenceSpecifierNamed:[self localizedString:@"APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_LABEL"] target:self set:nil get:nil detail:nil cell:PSLinkCell edit:nil]; 33 | [activatorSpecifier setProperty:@"com.chewmieser.appbutton" forKey:@"activatorListener"]; 34 | [activatorSpecifier setProperty:[NSBundle bundleWithIdentifier:@"com.libactivator.preferencebundle"].bundlePath forKey:@"lazy-bundle"]; 35 | [activatorSpecifier setProperty:[self localizedString:@"APPBUTTON_ACTIVATOR_ACTIVATION_METHODS_HEADER"] forKey:@"activatorTitle"]; 36 | activatorSpecifier->action=@selector(lazyLoadBundle:); 37 | 38 | [specs insertObject:activatorSpecifier atIndex:3]; 39 | 40 | // Inject activator toggle 41 | PSSpecifier *activatorToggleSpec=[PSSpecifier preferenceSpecifierNamed:[self localizedString:@"APPBUTTON_ACTIVATOR_ACTIVATION_TOGGLE_MODE_LABEL"] target:self set:@selector(setPreferenceValue:specifier:) get:@selector(readPreferenceValue:) detail:nil cell:PSSwitchCell edit:nil]; 42 | [activatorToggleSpec setProperty:[ABSwitchTableCell class] forKey:@"cellClass"]; 43 | [activatorToggleSpec setProperty:@YES forKey:@"enabled"]; 44 | [activatorToggleSpec setProperty:@NO forKey:@"default"]; 45 | [activatorToggleSpec setProperty:@"com.chewmieser.appbutton" forKey:@"defaults"]; 46 | [activatorToggleSpec setProperty:@"com.chewmieser.appbutton.prefs-changed" forKey:@"PostNotification"]; 47 | [activatorToggleSpec setProperty:@"ActivatorToggleMode" forKey:@"key"]; 48 | 49 | [specs insertObject:activatorToggleSpec atIndex:4]; 50 | 51 | // Manipulate single tap event group 52 | PSSpecifier *singleTapGroupSpecifier=(PSSpecifier *)[specs objectAtIndex:5]; 53 | [singleTapGroupSpecifier setProperty:[self localizedString:@"SINGLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR"] forKey:@"footerText"]; 54 | [specs replaceObjectAtIndex:5 withObject:singleTapGroupSpecifier]; 55 | 56 | // Manipulate double tap event group 57 | PSSpecifier *doubleTapGroupSpecifier=(PSSpecifier *)[specs objectAtIndex:7]; 58 | [doubleTapGroupSpecifier setProperty:[self localizedString:@"DOUBLE_TAP_ACTION_FOOTER_WITH_ACTIVATOR"] forKey:@"footerText"]; 59 | [specs replaceObjectAtIndex:7 withObject:doubleTapGroupSpecifier]; 60 | 61 | // Inject single-tap activator event 62 | PSSpecifier *activatorABSingleTap=[PSSpecifier preferenceSpecifierNamed:[self localizedString:@"TAP_ACTION_ACTIVATOR_OTHER"] target:self set:nil get:nil detail:nil cell:PSLinkCell edit:nil]; 63 | [activatorABSingleTap setProperty:@"com.chewmieser.appbutton.button.tapped" forKey:@"activatorEvent"]; 64 | [activatorABSingleTap setProperty:[NSBundle bundleWithIdentifier:@"com.libactivator.preferencebundle"].bundlePath forKey:@"lazy-bundle"]; 65 | [activatorABSingleTap setProperty:[self localizedString:@"SINGLE_TAP_ACTIVATOR_HEADER"] forKey:@"activatorTitle"]; 66 | activatorABSingleTap->action=@selector(lazyLoadBundle:); 67 | 68 | [specs insertObject:activatorABSingleTap atIndex:7]; 69 | 70 | // Inject double-tap activator event 71 | PSSpecifier *activatorABDoubleTap=[PSSpecifier preferenceSpecifierNamed:[self localizedString:@"TAP_ACTION_ACTIVATOR_OTHER"] target:self set:nil get:nil detail:nil cell:PSLinkCell edit:nil]; 72 | [activatorABDoubleTap setProperty:@"com.chewmieser.appbutton.button.double.tapped" forKey:@"activatorEvent"]; 73 | [activatorABDoubleTap setProperty:[NSBundle bundleWithIdentifier:@"com.libactivator.preferencebundle"].bundlePath forKey:@"lazy-bundle"]; 74 | [activatorABDoubleTap setProperty:[self localizedString:@"DOUBLE_TAP_ACTIVATOR_HEADER"] forKey:@"activatorTitle"]; 75 | activatorABDoubleTap->action=@selector(lazyLoadBundle:); 76 | 77 | [specs insertObject:activatorABDoubleTap atIndex:10]; 78 | } 79 | 80 | _specifiers=[specs copy]; 81 | } 82 | return _specifiers; 83 | } 84 | @end 85 | 86 | // vim:ft=objc 87 | -------------------------------------------------------------------------------- /appbuttonprefs/Resources/abaesthetics.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | items 6 | 7 | 8 | cell 9 | PSGroupCell 10 | footerText 11 | BLACK_BUTTON_FOOTER 12 | 13 | 14 | cell 15 | PSSwitchCell 16 | cellClass 17 | ABSwitchTableCell 18 | default 19 | 20 | defaults 21 | com.chewmieser.appbutton 22 | PostNotification 23 | com.chewmieser.appbutton.prefs-changed 24 | key 25 | BlackButton 26 | label 27 | BLACK_BUTTON_LABEL 28 | 29 | 30 | cell 31 | PSGroupCell 32 | footerText 33 | BLACK_TRAY_FOOTER 34 | 35 | 36 | cell 37 | PSSwitchCell 38 | cellClass 39 | ABSwitchTableCell 40 | default 41 | 42 | defaults 43 | com.chewmieser.appbutton 44 | PostNotification 45 | com.chewmieser.appbutton.prefs-changed 46 | key 47 | BlackTray 48 | label 49 | BLACK_TRAY_LABEL 50 | 51 | 52 | cell 53 | PSGroupCell 54 | footerText 55 | RESTING_ALPHA_FOOTER 56 | 57 | 58 | cell 59 | PSSliderCell 60 | cellClass 61 | ABSliderTableCell 62 | min 63 | 0.0 64 | max 65 | 1.0 66 | default 67 | 0.3 68 | defaults 69 | com.chewmieser.appbutton 70 | PostNotification 71 | com.chewmieser.appbutton.prefs-changed 72 | key 73 | RestingAlpha 74 | 75 | 76 | cell 77 | PSGroupCell 78 | footerText 79 | ACTIVE_ALPHA_FOOTER 80 | 81 | 82 | cell 83 | PSSliderCell 84 | cellClass 85 | ABSliderTableCell 86 | min 87 | 0.1 88 | max 89 | 1.0 90 | default 91 | 1.0 92 | defaults 93 | com.chewmieser.appbutton 94 | PostNotification 95 | com.chewmieser.appbutton.prefs-changed 96 | key 97 | ActiveAlpha 98 | 99 | 100 | cell 101 | PSGroupCell 102 | footerText 103 | ENABLE_BORDER_FOOTER 104 | 105 | 106 | cell 107 | PSSwitchCell 108 | cellClass 109 | ABSwitchTableCell 110 | default 111 | 112 | defaults 113 | com.chewmieser.appbutton 114 | PostNotification 115 | com.chewmieser.appbutton.prefs-changed 116 | key 117 | EnableBorder 118 | label 119 | ENABLE_BORDER_LABEL 120 | 121 | 122 | cell 123 | PSGroupCell 124 | footerText 125 | ENABLE_BLUR_FOOTER 126 | 127 | 128 | cell 129 | PSSwitchCell 130 | cellClass 131 | ABSwitchTableCell 132 | default 133 | 134 | defaults 135 | com.chewmieser.appbutton 136 | PostNotification 137 | com.chewmieser.appbutton.prefs-changed 138 | key 139 | EnableBlur 140 | label 141 | ENABLE_BLUR_LABEL 142 | 143 | 144 | cell 145 | PSGroupCell 146 | footerText 147 | HIGHLIGHT_APP_FOOTER 148 | 149 | 150 | cell 151 | PSSwitchCell 152 | cellClass 153 | ABSwitchTableCell 154 | default 155 | 156 | defaults 157 | com.chewmieser.appbutton 158 | PostNotification 159 | com.chewmieser.appbutton.prefs-changed 160 | key 161 | HighlightApp 162 | label 163 | HIGHLIGHT_APP_LABEL 164 | 165 | 166 | title 167 | AESTHETICS_SECTION_LABEL 168 | 169 | 170 | -------------------------------------------------------------------------------- /appbuttonprefs/Resources/abbehavior.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | items 6 | 7 | 8 | cell 9 | PSGroupCell 10 | footerText 11 | SWAP_CONTROLS_FOOTER 12 | 13 | 14 | cell 15 | PSSwitchCell 16 | cellClass 17 | ABSwitchTableCell 18 | default 19 | 20 | defaults 21 | com.chewmieser.appbutton 22 | PostNotification 23 | com.chewmieser.appbutton.prefs-changed 24 | key 25 | SwapControls 26 | label 27 | SWAP_CONTROLS_LABEL 28 | 29 | 30 | cell 31 | PSGroupCell 32 | footerText 33 | SINGLE_TAP_ACTION_FOOTER 34 | 35 | 36 | cell 37 | PSSegmentCell 38 | cellClass 39 | ABSegmentTableCell 40 | default 41 | LastApp 42 | validTitles 43 | 44 | TAP_ACTION_IGNORE 45 | TAP_ACTION_LAST_APP 46 | TAP_ACTION_TAP_HOME 47 | TAP_ACTION_DOUBLE_TAP_HOME 48 | 49 | validValues 50 | 51 | Nothing 52 | LastApp 53 | HomePress 54 | DoubleHome 55 | 56 | defaults 57 | com.chewmieser.appbutton 58 | PostNotification 59 | com.chewmieser.appbutton.prefs-changed 60 | key 61 | SingleTapButton 62 | 63 | 64 | cell 65 | PSGroupCell 66 | footerText 67 | DOUBLE_TAP_ACTION_FOOTER 68 | 69 | 70 | cell 71 | PSSegmentCell 72 | cellClass 73 | ABSegmentTableCell 74 | default 75 | Nothing 76 | validTitles 77 | 78 | TAP_ACTION_IGNORE 79 | TAP_ACTION_LAST_APP 80 | TAP_ACTION_TAP_HOME 81 | TAP_ACTION_DOUBLE_TAP_HOME 82 | 83 | validValues 84 | 85 | Nothing 86 | LastApp 87 | HomePress 88 | DoubleHome 89 | 90 | defaults 91 | com.chewmieser.appbutton 92 | PostNotification 93 | com.chewmieser.appbutton.prefs-changed 94 | key 95 | DoubleTapButton 96 | 97 | 98 | cell 99 | PSGroupCell 100 | footerText 101 | SNAP_TO_EDGE_FOOTER 102 | 103 | 104 | cell 105 | PSSwitchCell 106 | cellClass 107 | ABSwitchTableCell 108 | default 109 | 110 | defaults 111 | com.chewmieser.appbutton 112 | PostNotification 113 | com.chewmieser.appbutton.prefs-changed 114 | key 115 | DockToEdge 116 | label 117 | SNAP_TO_EDGE_LABEL 118 | 119 | 120 | cell 121 | PSGroupCell 122 | footerText 123 | SCROLL_ENABLED_FOOTER 124 | 125 | 126 | cell 127 | PSSwitchCell 128 | cellClass 129 | ABSwitchTableCell 130 | default 131 | 132 | defaults 133 | com.chewmieser.appbutton 134 | PostNotification 135 | com.chewmieser.appbutton.prefs-changed 136 | key 137 | ScrollEnabled 138 | label 139 | SCROLL_ENABLED_LABEL 140 | 141 | 142 | cell 143 | PSGroupCell 144 | footerText 145 | KILL_APPS_FOOTER 146 | 147 | 148 | cell 149 | PSSwitchCell 150 | cellClass 151 | ABSwitchTableCell 152 | default 153 | 154 | defaults 155 | com.chewmieser.appbutton 156 | PostNotification 157 | com.chewmieser.appbutton.prefs-changed 158 | key 159 | KillApps 160 | label 161 | KILL_APPS_LABEL 162 | 163 | 164 | cell 165 | PSLinkCell 166 | label 167 | WHITELIST_SECTION_HEADER 168 | detail 169 | ABWhitelistApps 170 | 171 | 172 | cell 173 | PSGroupCell 174 | footerText 175 | SAUSAGE_FINGERS_FOOTER 176 | 177 | 178 | cell 179 | PSSwitchCell 180 | cellClass 181 | ABSwitchTableCell 182 | default 183 | 184 | defaults 185 | com.chewmieser.appbutton 186 | PostNotification 187 | com.chewmieser.appbutton.prefs-changed 188 | key 189 | SausageFingers 190 | label 191 | SAUSAGE_FINGERS_LABEL 192 | 193 | 194 | title 195 | BEHAVIOR_SECTION_LABEL 196 | 197 | 198 | -------------------------------------------------------------------------------- /appbuttonprefs/Resources/ababout.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | items 6 | 7 | 8 | cell 9 | PSGroupCell 10 | 11 | 12 | cellClass 13 | ABAboutTableCell 14 | cell 15 | PSLinkCell 16 | action 17 | openTwitter: 18 | 19 | 20 | cell 21 | PSGroupCell 22 | 23 | 24 | cellClass 25 | ABAboutKyleTableCell 26 | cell 27 | PSLinkCell 28 | action 29 | openKylesTwitter: 30 | 31 | 32 | cell 33 | PSGroupCell 34 | label 35 | Translations 36 | 37 | 38 | cell 39 | PSTitleValueCell 40 | label 41 | MiRO 42 | language 43 | Arabic 44 | get 45 | languageForSpecifier: 46 | 47 | 48 | cell 49 | PSTitleValueCell 50 | label 51 | Ka Pan Chan 52 | language 53 | Chinese (Tranditional) 54 | get 55 | languageForSpecifier: 56 | 57 | 58 | cell 59 | PSTitleValueCell 60 | label 61 | Kevin Lee 62 | language 63 | Chinese (Tranditional) 64 | get 65 | languageForSpecifier: 66 | 67 | 68 | cell 69 | PSTitleValueCell 70 | label 71 | Ka Pan Chan 72 | language 73 | Chinese (Simplified) 74 | get 75 | languageForSpecifier: 76 | 77 | 78 | cell 79 | PSTitleValueCell 80 | label 81 | Sh4rPEYE 82 | language 83 | Czech 84 | get 85 | languageForSpecifier: 86 | 87 | 88 | cell 89 | PSTitleValueCell 90 | label 91 | Rasmus Hansen 92 | language 93 | Danish 94 | get 95 | languageForSpecifier: 96 | 97 | 98 | cell 99 | PSTitleValueCell 100 | label 101 | Stefan D'Elia 102 | language 103 | German 104 | get 105 | languageForSpecifier: 106 | 107 | 108 | cell 109 | PSTitleValueCell 110 | label 111 | Niko 112 | language 113 | Greek 114 | get 115 | languageForSpecifier: 116 | 117 | 118 | cell 119 | PSTitleValueCell 120 | label 121 | Aran Shavit 122 | language 123 | Hebrew 124 | get 125 | languageForSpecifier: 126 | 127 | 128 | cell 129 | PSTitleValueCell 130 | label 131 | Alessandro Grandi 132 | language 133 | Italian 134 | get 135 | languageForSpecifier: 136 | 137 | 138 | cell 139 | PSTitleValueCell 140 | label 141 | koh_kun 142 | language 143 | Japanese 144 | get 145 | languageForSpecifier: 146 | 147 | 148 | cell 149 | PSTitleValueCell 150 | label 151 | 고맙쥐 152 | language 153 | Korean 154 | get 155 | languageForSpecifier: 156 | 157 | 158 | cell 159 | PSTitleValueCell 160 | label 161 | Aaken 162 | language 163 | Polish 164 | get 165 | languageForSpecifier: 166 | 167 | 168 | cell 169 | PSTitleValueCell 170 | label 171 | Bruno Bareta 172 | language 173 | Portuguese 174 | get 175 | languageForSpecifier: 176 | 177 | 178 | cell 179 | PSTitleValueCell 180 | label 181 | Alex Godelashvili 182 | language 183 | Russian 184 | get 185 | languageForSpecifier: 186 | 187 | 188 | cell 189 | PSTitleValueCell 190 | label 191 | German Ríos-Lazo 192 | language 193 | Spanish 194 | get 195 | languageForSpecifier: 196 | 197 | 198 | cell 199 | PSTitleValueCell 200 | label 201 | Adnan Çakmak 202 | language 203 | Turkish 204 | get 205 | languageForSpecifier: 206 | 207 | 208 | cell 209 | PSTitleValueCell 210 | label 211 | Tolga Meteay Yıldız 212 | language 213 | Turkish 214 | get 215 | languageForSpecifier: 216 | 217 | 218 | cell 219 | PSTitleValueCell 220 | label 221 | Thanhnh091™ 222 | language 223 | Vietnamese 224 | get 225 | languageForSpecifier: 226 | 227 | 228 | cell 229 | PSGroupCell 230 | footerText 231 | ABOUT_TEXT 232 | 233 | 234 | cell 235 | PSButtonCell 236 | label 237 | RESET_LABEL 238 | action 239 | resetSettings: 240 | 241 | 242 | title 243 | ABOUT_SECTION_LABEL 244 | 245 | 246 | -------------------------------------------------------------------------------- /appbuttonprefs/ABPrefsHeaderCell.m: -------------------------------------------------------------------------------- 1 | #include 2 | #import "prefs-common.h" 3 | #import "SAMultisectorControl.h" 4 | 5 | @interface ABPrefsHeaderCell : PSTableCell { 6 | UILabel *_label; 7 | SAMultisectorControl *multisectorControl; 8 | UIImageView *theImageView; 9 | 10 | UIVisualEffectView *blurView; 11 | UILabel *helloLabel; 12 | } 13 | @end 14 | 15 | @implementation ABPrefsHeaderCell 16 | - (id)initWithSpecifier:(PSSpecifier *)specifier{ 17 | self = [super initWithStyle:UITableViewCellStyleDefault reuseIdentifier:@"ABHeaderCell" specifier:specifier]; 18 | 19 | if (self) { 20 | // Load prefs 21 | CFStringRef appID=CFSTR("com.chewmieser.appbutton"); 22 | CFPropertyListRef angles=CFPreferencesCopyAppValue(CFSTR("MTTrayValues"),appID); 23 | CFPropertyListRef didExpirience=CFPreferencesCopyAppValue(CFSTR("DidExpirienceHeaderOverlay"),appID); 24 | 25 | [self setBackgroundColor:[UIColor colorWithHue:0.58 saturation:1 brightness:0.96 alpha:1]];//[UIColor colorWithHue:0.58 saturation:1 brightness:0.75 alpha:1]]; 26 | 27 | CGRect theFrame=CGRectMake(50,50,150,150); 28 | multisectorControl=[[SAMultisectorControl alloc] initWithFrame:theFrame]; 29 | [multisectorControl setClipsToBounds:NO]; 30 | 31 | [self addSubview:multisectorControl]; 32 | 33 | [multisectorControl addTarget:self action:@selector(updatePrefs) forControlEvents:UIControlEventValueChanged]; 34 | 35 | // Image 36 | NSBundle *ourBundle=[NSBundle bundleWithPath:@"/Library/PreferenceBundles/appbuttonprefs.bundle"]; 37 | UIImage *buttonImage=[UIImage imageWithContentsOfFile:[ourBundle pathForResource:@"appbuttonbutton" ofType:@"png"]]; 38 | 39 | theImageView=[[UIImageView alloc] initWithFrame:theFrame]; 40 | [theImageView setImage:buttonImage]; 41 | [self addSubview:theImageView]; 42 | //[[UIColor colorWithHue:0.49 saturation:1 brightness:0.99 alpha:1] 43 | //[[UIColor grayColor] colorWithAlphaComponent:0.4] //[UIColor colorWithHue:0.67 saturation:0.77 brightness:0.95 alpha:1] 44 | SAMultisectorSector *sector2 = [SAMultisectorSector sectorWithColor:[UIColor whiteColor] maxValue:360]; 45 | 46 | sector2.tag = 0; 47 | 48 | if (angles==nil){ 49 | sector2.startValue=90; 50 | sector2.endValue=270; 51 | }else{ 52 | NSArray *trayValues=(__bridge NSArray *)angles; 53 | sector2.startValue=[((NSNumber *)[trayValues objectAtIndex:0]) integerValue]; 54 | sector2.endValue=[((NSNumber *)[trayValues objectAtIndex:1]) integerValue]; 55 | } 56 | 57 | [multisectorControl addSector:sector2]; 58 | 59 | if (didExpirience==nil){ 60 | // Create a quick overlay 61 | blurView=[[UIVisualEffectView alloc] initWithEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]]; 62 | [blurView setFrame:self.frame]; 63 | [blurView setAlpha:0.75]; 64 | //[blurView setAutoresizingMask:UIViewAutoresizingFlexibleHeight|UIViewAutoresizingFlexibleWidth]; 65 | [self addSubview:blurView]; 66 | 67 | helloLabel=[[UILabel alloc] initWithFrame:self.frame]; 68 | [helloLabel setText:@"Thank you for using AppButton"]; 69 | [helloLabel setTextAlignment:NSTextAlignmentCenter]; 70 | [helloLabel setTextColor:[UIColor whiteColor]]; 71 | [helloLabel setFont:[UIFont fontWithName:@"HelveticaNeue-UltraLight" size:36]]; 72 | [helloLabel setAdjustsFontSizeToFitWidth:YES]; 73 | [blurView addSubview:helloLabel]; 74 | [self performSelector:@selector(headerStep1) withObject:nil afterDelay:2]; 75 | } 76 | } 77 | 78 | return self; 79 | } 80 | 81 | - (void)headerStep1{ 82 | [UIView animateWithDuration:0.25 delay:0.0 options:(UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionAllowUserInteraction) animations:^{ 83 | [helloLabel setAlpha:0]; 84 | } completion:^(BOOL finished){ 85 | [helloLabel setNumberOfLines:2]; 86 | [helloLabel setText:@"To set multitasking tray angles\nuse the handles around the button"]; 87 | 88 | [UIView animateWithDuration:0.25 delay:0.0 options:(UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionAllowUserInteraction) animations:^{ 89 | [helloLabel setAlpha:1]; 90 | } completion:^(BOOL finished){ 91 | [self performSelector:@selector(headerStep2) withObject:nil afterDelay:4]; 92 | }]; 93 | }]; 94 | } 95 | 96 | - (void)headerStep2{ 97 | [UIView animateWithDuration:0.25 delay:0.0 options:(UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionAllowUserInteraction) animations:^{ 98 | [helloLabel setAlpha:0]; 99 | } completion:^(BOOL finished){ 100 | [helloLabel setNumberOfLines:3]; 101 | [helloLabel setText:@"I'm always here for support!\nPlease check the about section\nfor contact information."]; 102 | 103 | [UIView animateWithDuration:0.25 delay:0.0 options:(UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionAllowUserInteraction) animations:^{ 104 | [helloLabel setAlpha:1]; 105 | } completion:^(BOOL finished){ 106 | [self performSelector:@selector(headerStep3) withObject:nil afterDelay:4]; 107 | }]; 108 | }]; 109 | } 110 | 111 | - (void)headerStep3{ 112 | [UIView animateWithDuration:0.25 delay:0.0 options:(UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionAllowUserInteraction) animations:^{ 113 | [helloLabel setAlpha:0]; 114 | } completion:^(BOOL finished){ 115 | [helloLabel setNumberOfLines:1]; 116 | [helloLabel setText:@"Enjoy!"]; 117 | 118 | [UIView animateWithDuration:0.25 delay:0.0 options:(UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionAllowUserInteraction) animations:^{ 119 | [helloLabel setAlpha:1]; 120 | } completion:^(BOOL finished){ 121 | [self performSelector:@selector(headerStep4) withObject:nil afterDelay:2]; 122 | }]; 123 | }]; 124 | } 125 | 126 | - (void)headerStep4{ 127 | [UIView animateWithDuration:0.25 delay:0.0 options:(UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionAllowUserInteraction) animations:^{ 128 | [blurView setAlpha:0]; 129 | } completion:^(BOOL finished){ 130 | [blurView removeFromSuperview]; 131 | 132 | // Save it up 133 | CFPreferencesSetValue(CFSTR("DidExpirienceHeaderOverlay"), (__bridge CFPropertyListRef)[NSNumber numberWithInt:1], CFSTR("com.chewmieser.appbutton"), kCFPreferencesCurrentUser, kCFPreferencesAnyHost); 134 | CFPreferencesAppSynchronize(CFSTR("com.chewmieser.appbutton")); 135 | }]; 136 | } 137 | 138 | - (void)updatePrefs{ 139 | SAMultisectorSector *sector=[multisectorControl.sectors objectAtIndex:0]; 140 | int startValue=(int)sector.startValue; 141 | int endValue=(int)sector.endValue; 142 | 143 | NSArray *vals=[[NSArray alloc] initWithObjects:[NSNumber numberWithInt:startValue],[NSNumber numberWithInt:endValue],nil]; 144 | 145 | CFPreferencesSetValue(CFSTR("MTTrayValues"), (__bridge CFPropertyListRef)vals, CFSTR("com.chewmieser.appbutton"), kCFPreferencesCurrentUser, kCFPreferencesAnyHost); 146 | CFPreferencesAppSynchronize(CFSTR("com.chewmieser.appbutton")); 147 | 148 | CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR("com.chewmieser.appbutton.prefs-changed"), NULL, NULL, TRUE); 149 | } 150 | 151 | - (CGFloat)preferredHeightForWidth:(CGFloat)arg1 { 152 | [blurView setFrame:CGRectMake(0,0,arg1,300)]; 153 | 154 | CGRect labelFrame=blurView.frame; 155 | labelFrame.size.width-=150; 156 | labelFrame.origin.x+=75; 157 | [helloLabel setFrame:blurView.frame]; 158 | 159 | // Return a custom cell height. 160 | CGRect theFrame=CGRectMake(arg1/2-125,300/2-125,250,250); 161 | [multisectorControl setFrame:theFrame]; 162 | 163 | //CGRect theImageViewFrame=CGRectMake(arg1/2-75,300/2-75,150,150); 164 | CGRect theImageViewFrame=CGRectMake(arg1/2-62.5,300/2-62.5,125,125); 165 | [theImageView setFrame:theImageViewFrame]; 166 | 167 | return 300.f; 168 | } 169 | @end -------------------------------------------------------------------------------- /appbuttonprefs/ABFavoritedAppsController.m: -------------------------------------------------------------------------------- 1 | #import "prefs-common.h" 2 | #import 3 | 4 | extern NSString *PSDeletionActionKey; 5 | 6 | @interface PSEditableListController : PSListController 7 | - (BOOL)performDeletionActionForSpecifier:(id)arg1; 8 | - (void)setEditingButtonHidden:(BOOL)arg1 animated:(BOOL)arg2; 9 | @end 10 | 11 | @interface ABFavoritedAppsController : PSEditableListController { 12 | ALApplicationList *apps; 13 | NSArray *displayIdentifiers; 14 | NSMutableArray *favorites; 15 | } 16 | @end 17 | 18 | @implementation ABFavoritedAppsController 19 | - (NSString *)localizedString:(NSString *)key{ 20 | return [[NSBundle bundleForClass: [self class]] localizedStringForKey:key value:key table:@"abfavorites"]; 21 | } 22 | 23 | - (id)specifiers { 24 | if(_specifiers==nil) { 25 | CFStringRef appID=CFSTR("com.chewmieser.appbutton"); 26 | CFPropertyListRef favs=CFPreferencesCopyAppValue(CFSTR("favoriteApplications"),appID); 27 | if (favs!=nil){ 28 | favorites=[(__bridge NSArray *)favs mutableCopy]; 29 | }else{ 30 | favorites=[[NSMutableArray alloc] init]; 31 | } 32 | 33 | if (apps==nil){ 34 | apps=[ALApplicationList sharedApplicationList]; 35 | dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ 36 | if (displayIdentifiers==nil) displayIdentifiers = [[[apps applications] allKeys] sortedArrayUsingComparator:^NSComparisonResult(id obj1, id obj2) { 37 | return [[[apps applications] objectForKey:obj1] caseInsensitiveCompare:[[apps applications] objectForKey:obj2]];}]; 38 | 39 | // If you then need to execute something making sure it's on the main thread (updating the UI for example) 40 | dispatch_async(dispatch_get_main_queue(), ^{ 41 | [self reloadSpecifiers]; 42 | }); 43 | }); 44 | } 45 | } 46 | 47 | NSMutableArray *specs=[[NSMutableArray alloc] init]; 48 | 49 | PSSpecifier *favGroup=[PSSpecifier groupSpecifierWithName:[self localizedString:@"FAVORITES_HEADER"]]; 50 | [specs addObject:favGroup]; 51 | 52 | for (NSString *displayId in favorites){ 53 | PSSpecifier *s=[PSSpecifier preferenceSpecifierNamed:[apps.applications objectForKey:displayId] target:nil set:nil get:nil detail:nil cell:PSListItemCell edit:nil]; 54 | [s setProperty:displayId forKey:@"displayIdentifier"]; 55 | //[s setProperty:NSStringFromSelector(@selector(removeFavorite:)) forKey:@"deletionAction"]; 56 | [specs addObject:s]; 57 | } 58 | 59 | // Create applist group 60 | PSSpecifier *appGroup=[PSSpecifier groupSpecifierWithName:[self localizedString:@"ALL_APPS_HEADER"]]; 61 | [specs addObject:appGroup]; 62 | 63 | for (NSString *displayId in displayIdentifiers){ 64 | if (![favorites containsObject:displayId]){ 65 | PSSpecifier *s=[PSSpecifier preferenceSpecifierNamed:[apps.applications objectForKey:displayId] target:nil set:nil get:nil detail:nil cell:PSListItemCell edit:nil]; 66 | [s setProperty:displayId forKey:@"displayIdentifier"]; 67 | [specs addObject:s]; 68 | } 69 | } 70 | 71 | if (displayIdentifiers==nil){ 72 | PSSpecifier *s=[PSSpecifier preferenceSpecifierNamed:[self localizedString:@"LOADING_TEXT"] target:nil set:nil get:nil detail:nil cell:PSListItemCell edit:nil]; 73 | [specs addObject:s]; 74 | } 75 | 76 | _specifiers=[specs copy]; 77 | 78 | [[self table] setEditing:YES]; 79 | [[self table] setAllowsSelectionDuringEditing:YES]; 80 | [self setEditingButtonHidden:YES animated:NO]; 81 | 82 | return _specifiers; 83 | } 84 | 85 | // Lock moving inside section only 86 | - (NSIndexPath *)tableView:(UITableView *)tableView targetIndexPathForMoveFromRowAtIndexPath:(NSIndexPath *)sourceIndexPath toProposedIndexPath:(NSIndexPath *)proposedDestinationIndexPath{ 87 | if (sourceIndexPath.section != proposedDestinationIndexPath.section){ 88 | NSInteger row=0; 89 | if (sourceIndexPath.section < proposedDestinationIndexPath.section){ 90 | row = [tableView numberOfRowsInSection:sourceIndexPath.section] - 1; 91 | } 92 | return [NSIndexPath indexPathForRow:row inSection:sourceIndexPath.section]; 93 | } 94 | 95 | return proposedDestinationIndexPath; 96 | } 97 | 98 | - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath{ 99 | id object=[favorites objectAtIndex:fromIndexPath.row]; 100 | [favorites removeObjectAtIndex:fromIndexPath.row]; 101 | [favorites insertObject:object atIndex:toIndexPath.row]; 102 | 103 | CFPreferencesSetValue(CFSTR("favoriteApplications"), (__bridge CFPropertyListRef)favorites, CFSTR("com.chewmieser.appbutton"), kCFPreferencesCurrentUser, kCFPreferencesAnyHost); 104 | CFPreferencesAppSynchronize(CFSTR("com.chewmieser.appbutton")); 105 | 106 | CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR("com.chewmieser.appbutton.prefs-changed"), NULL, NULL, TRUE); 107 | } 108 | 109 | - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath{ 110 | return indexPath.section==0; 111 | } 112 | 113 | - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath{ 114 | return indexPath.section==0; 115 | } 116 | 117 | - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath{ 118 | [super tableView:tableView commitEditingStyle:editingStyle forRowAtIndexPath:indexPath]; 119 | 120 | if (editingStyle==UITableViewCellEditingStyleDelete){ 121 | [favorites removeObjectAtIndex:indexPath.row]; 122 | CFPreferencesSetValue(CFSTR("favoriteApplications"), (__bridge CFPropertyListRef)favorites, CFSTR("com.chewmieser.appbutton"), kCFPreferencesCurrentUser, kCFPreferencesAnyHost); 123 | CFPreferencesAppSynchronize(CFSTR("com.chewmieser.appbutton")); 124 | 125 | CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR("com.chewmieser.appbutton.prefs-changed"), NULL, NULL, TRUE); 126 | 127 | [self reloadSpecifiers]; 128 | } 129 | } 130 | 131 | - (void)tableView:(UITableView *)arg1 didSelectRowAtIndexPath:(NSIndexPath *)arg2{ 132 | [arg1 deselectRowAtIndexPath:arg2 animated:YES]; 133 | /* 134 | - (void)insertSpecifier:(id)arg1 atEndOfGroup:(int)arg2; 135 | - (void)removeSpecifierAtIndex:(int)arg1; 136 | - (void)_moveSpecifierAtIndex:(unsigned int)arg1 toIndex:(unsigned int)arg2 animated:(BOOL)arg3; 137 | - (NSArray *)specifiersInGroup:(int)arg1; 138 | - (int)indexOfGroup:(int)arg1; 139 | - (void)insertSpecifier:(id)arg1 atEndOfGroup:(int)arg2; 140 | */ 141 | /*if (arg2.section==1){ 142 | PSSpecifier *spec=[self specifierAtIndex:[self indexForIndexPath:arg2]]; 143 | [favorites addObject:[spec propertyForKey:@"displayIdentifier"]]; 144 | [self insertSpecifier:nil atEndOfGroup:0]; 145 | [self _moveSpecifierAtIndex:[self indexForIndexPath:arg2] toIndex:[self indexOfGroup:1]-1 animated:YES]; 146 | 147 | CFPreferencesSetValue(CFSTR("favoriteApplications"), (__bridge CFPropertyListRef)favorites, CFSTR("com.chewmieser.appbutton"), kCFPreferencesCurrentUser, kCFPreferencesAnyHost); 148 | CFPreferencesAppSynchronize(CFSTR("com.chewmieser.appbutton")); 149 | 150 | CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR("com.chewmieser.appbutton.prefs-changed"), NULL, NULL, TRUE); 151 | }*/ 152 | 153 | if (arg2.section==1){ 154 | PSSpecifier *spec=[self specifierAtIndex:[self indexForIndexPath:arg2]]; 155 | 156 | if ([spec propertyForKey:@"displayIdentifier"]!=nil){ 157 | [favorites addObject:[spec propertyForKey:@"displayIdentifier"]]; 158 | 159 | CFPreferencesSetValue(CFSTR("favoriteApplications"), (__bridge CFPropertyListRef)favorites, CFSTR("com.chewmieser.appbutton"), kCFPreferencesCurrentUser, kCFPreferencesAnyHost); 160 | CFPreferencesAppSynchronize(CFSTR("com.chewmieser.appbutton")); 161 | 162 | CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR("com.chewmieser.appbutton.prefs-changed"), NULL, NULL, TRUE); 163 | 164 | [self reloadSpecifiers]; 165 | } 166 | } 167 | } 168 | 169 | - (PSTableCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 170 | PSTableCell *cell = [super tableView:tableView cellForRowAtIndexPath:indexPath]; 171 | 172 | PSSpecifier *spec=[self specifierAtIndex:[self indexForIndexPath:indexPath]]; 173 | 174 | if ([spec propertyForKey:@"displayIdentifier"]!=nil){ 175 | UIImage *icon=[apps iconOfSize:ALApplicationIconSizeSmall forDisplayIdentifier:[spec propertyForKey:@"displayIdentifier"]]; 176 | [cell setIcon:icon]; 177 | } 178 | 179 | return cell; 180 | } 181 | @end -------------------------------------------------------------------------------- /appbuttonprefs/ABWhitelistApps.m: -------------------------------------------------------------------------------- 1 | #import "prefs-common.h" 2 | #import 3 | 4 | extern NSString *PSDeletionActionKey; 5 | 6 | @interface PSEditableListController : PSListController 7 | - (BOOL)performDeletionActionForSpecifier:(id)arg1; 8 | - (void)setEditingButtonHidden:(BOOL)arg1 animated:(BOOL)arg2; 9 | @end 10 | 11 | @interface ABWhitelistApps : PSEditableListController { 12 | ALApplicationList *apps; 13 | NSArray *displayIdentifiers; 14 | NSMutableArray *whitelisted; 15 | } 16 | @end 17 | 18 | @implementation ABWhitelistApps 19 | - (NSString *)localizedString:(NSString *)key{ 20 | return [[NSBundle bundleForClass: [self class]] localizedStringForKey:key value:key table:@"abwhitelist"]; 21 | } 22 | 23 | - (id)specifiers { 24 | if(_specifiers==nil) { 25 | CFStringRef appID=CFSTR("com.chewmieser.appbutton"); 26 | CFPropertyListRef white=CFPreferencesCopyAppValue(CFSTR("whitelistApplications"),appID); 27 | if (white!=nil){ 28 | whitelisted=[(__bridge NSArray *)white mutableCopy]; 29 | }else{ 30 | whitelisted=[[NSMutableArray alloc] init]; 31 | } 32 | 33 | if (apps==nil){ 34 | apps=[ALApplicationList sharedApplicationList]; 35 | dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{ 36 | if (displayIdentifiers==nil) displayIdentifiers = [[[apps applications] allKeys] sortedArrayUsingComparator:^NSComparisonResult(id obj1, id obj2) { 37 | return [[[apps applications] objectForKey:obj1] caseInsensitiveCompare:[[apps applications] objectForKey:obj2]];}]; 38 | 39 | // If you then need to execute something making sure it's on the main thread (updating the UI for example) 40 | dispatch_async(dispatch_get_main_queue(), ^{ 41 | [self reloadSpecifiers]; 42 | }); 43 | }); 44 | } 45 | } 46 | 47 | NSMutableArray *specs=[[NSMutableArray alloc] init]; 48 | 49 | PSSpecifier *nowPlayingGroup=[PSSpecifier groupSpecifierWithName:@""]; 50 | [specs addObject:nowPlayingGroup]; 51 | 52 | PSSpecifier *nowPlaying=[PSSpecifier preferenceSpecifierNamed:[self localizedString:@"NOW_PLAYING_LABEL"] target:self set:@selector(setPreferenceValue:specifier:) get:@selector(readPreferenceValue:) detail:nil cell:PSSwitchCell edit:nil]; 53 | [nowPlaying setProperty:@YES forKey:@"enabled"]; 54 | [nowPlaying setProperty:@YES forKey:@"default"]; 55 | [nowPlaying setProperty:@"com.chewmieser.appbutton" forKey:@"defaults"]; 56 | [nowPlaying setProperty:@"com.chewmieser.appbutton.prefs-changed" forKey:@"PostNotification"]; 57 | [nowPlaying setProperty:@"WhitelistNowPlaying" forKey:@"key"]; 58 | 59 | [specs addObject:nowPlaying]; 60 | 61 | PSSpecifier *whiteGroup=[PSSpecifier groupSpecifierWithName:[self localizedString:@"WHITELIST_HEADER"]]; 62 | [specs addObject:whiteGroup]; 63 | 64 | for (NSString *displayId in whitelisted){ 65 | PSSpecifier *s=[PSSpecifier preferenceSpecifierNamed:[apps.applications objectForKey:displayId] target:nil set:nil get:nil detail:nil cell:PSListItemCell edit:nil]; 66 | [s setProperty:displayId forKey:@"displayIdentifier"]; 67 | //[s setProperty:NSStringFromSelector(@selector(removeFavorite:)) forKey:@"deletionAction"]; 68 | [specs addObject:s]; 69 | } 70 | 71 | // Create applist group 72 | PSSpecifier *appGroup=[PSSpecifier groupSpecifierWithName:[self localizedString:@"ALL_APPS_HEADER"]]; 73 | [specs addObject:appGroup]; 74 | 75 | for (NSString *displayId in displayIdentifiers){ 76 | if (![whitelisted containsObject:displayId]){ 77 | PSSpecifier *s=[PSSpecifier preferenceSpecifierNamed:[apps.applications objectForKey:displayId] target:nil set:nil get:nil detail:nil cell:PSListItemCell edit:nil]; 78 | [s setProperty:displayId forKey:@"displayIdentifier"]; 79 | [specs addObject:s]; 80 | } 81 | } 82 | 83 | if (displayIdentifiers==nil){ 84 | PSSpecifier *s=[PSSpecifier preferenceSpecifierNamed:[self localizedString:@"LOADING_TEXT"] target:nil set:nil get:nil detail:nil cell:PSListItemCell edit:nil]; 85 | [specs addObject:s]; 86 | } 87 | 88 | _specifiers=[specs copy]; 89 | 90 | [[self table] setEditing:YES]; 91 | [[self table] setAllowsSelectionDuringEditing:YES]; 92 | [self setEditingButtonHidden:YES animated:NO]; 93 | 94 | return _specifiers; 95 | } 96 | 97 | // Lock moving inside section only 98 | - (NSIndexPath *)tableView:(UITableView *)tableView targetIndexPathForMoveFromRowAtIndexPath:(NSIndexPath *)sourceIndexPath toProposedIndexPath:(NSIndexPath *)proposedDestinationIndexPath{ 99 | if (sourceIndexPath.section != proposedDestinationIndexPath.section){ 100 | NSInteger row=0; 101 | if (sourceIndexPath.section < proposedDestinationIndexPath.section){ 102 | row = [tableView numberOfRowsInSection:sourceIndexPath.section] - 1; 103 | } 104 | return [NSIndexPath indexPathForRow:row inSection:sourceIndexPath.section]; 105 | } 106 | 107 | return proposedDestinationIndexPath; 108 | } 109 | 110 | - (void)tableView:(UITableView *)tableView moveRowAtIndexPath:(NSIndexPath *)fromIndexPath toIndexPath:(NSIndexPath *)toIndexPath{ 111 | id object=[whitelisted objectAtIndex:fromIndexPath.row]; 112 | [whitelisted removeObjectAtIndex:fromIndexPath.row]; 113 | [whitelisted insertObject:object atIndex:toIndexPath.row]; 114 | 115 | CFPreferencesSetValue(CFSTR("whitelistApplications"), (__bridge CFPropertyListRef)whitelisted, CFSTR("com.chewmieser.appbutton"), kCFPreferencesCurrentUser, kCFPreferencesAnyHost); 116 | CFPreferencesAppSynchronize(CFSTR("com.chewmieser.appbutton")); 117 | 118 | CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR("com.chewmieser.appbutton.prefs-changed"), NULL, NULL, TRUE); 119 | } 120 | 121 | - (BOOL)tableView:(UITableView *)tableView canMoveRowAtIndexPath:(NSIndexPath *)indexPath{ 122 | return indexPath.section==1; 123 | } 124 | 125 | - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath{ 126 | return indexPath.section==1; 127 | } 128 | 129 | - (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath{ 130 | [super tableView:tableView commitEditingStyle:editingStyle forRowAtIndexPath:indexPath]; 131 | 132 | if (editingStyle==UITableViewCellEditingStyleDelete){ 133 | [whitelisted removeObjectAtIndex:indexPath.row]; 134 | CFPreferencesSetValue(CFSTR("whitelistApplications"), (__bridge CFPropertyListRef)whitelisted, CFSTR("com.chewmieser.appbutton"), kCFPreferencesCurrentUser, kCFPreferencesAnyHost); 135 | CFPreferencesAppSynchronize(CFSTR("com.chewmieser.appbutton")); 136 | 137 | CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR("com.chewmieser.appbutton.prefs-changed"), NULL, NULL, TRUE); 138 | 139 | [self reloadSpecifiers]; 140 | } 141 | } 142 | 143 | - (void)tableView:(UITableView *)arg1 didSelectRowAtIndexPath:(NSIndexPath *)arg2{ 144 | [arg1 deselectRowAtIndexPath:arg2 animated:YES]; 145 | /* 146 | - (void)insertSpecifier:(id)arg1 atEndOfGroup:(int)arg2; 147 | - (void)removeSpecifierAtIndex:(int)arg1; 148 | - (void)_moveSpecifierAtIndex:(unsigned int)arg1 toIndex:(unsigned int)arg2 animated:(BOOL)arg3; 149 | - (NSArray *)specifiersInGroup:(int)arg1; 150 | - (int)indexOfGroup:(int)arg1; 151 | - (void)insertSpecifier:(id)arg1 atEndOfGroup:(int)arg2; 152 | */ 153 | /*if (arg2.section==1){ 154 | PSSpecifier *spec=[self specifierAtIndex:[self indexForIndexPath:arg2]]; 155 | [favorites addObject:[spec propertyForKey:@"displayIdentifier"]]; 156 | [self insertSpecifier:nil atEndOfGroup:0]; 157 | [self _moveSpecifierAtIndex:[self indexForIndexPath:arg2] toIndex:[self indexOfGroup:1]-1 animated:YES]; 158 | 159 | CFPreferencesSetValue(CFSTR("favoriteApplications"), (__bridge CFPropertyListRef)favorites, CFSTR("com.chewmieser.appbutton"), kCFPreferencesCurrentUser, kCFPreferencesAnyHost); 160 | CFPreferencesAppSynchronize(CFSTR("com.chewmieser.appbutton")); 161 | 162 | CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR("com.chewmieser.appbutton.prefs-changed"), NULL, NULL, TRUE); 163 | }*/ 164 | 165 | if (arg2.section==2){ 166 | PSSpecifier *spec=[self specifierAtIndex:[self indexForIndexPath:arg2]]; 167 | 168 | if ([spec propertyForKey:@"displayIdentifier"]!=nil){ 169 | [whitelisted addObject:[spec propertyForKey:@"displayIdentifier"]]; 170 | 171 | CFPreferencesSetValue(CFSTR("whitelistApplications"), (__bridge CFPropertyListRef)whitelisted, CFSTR("com.chewmieser.appbutton"), kCFPreferencesCurrentUser, kCFPreferencesAnyHost); 172 | CFPreferencesAppSynchronize(CFSTR("com.chewmieser.appbutton")); 173 | 174 | CFNotificationCenterPostNotification(CFNotificationCenterGetDarwinNotifyCenter(), CFSTR("com.chewmieser.appbutton.prefs-changed"), NULL, NULL, TRUE); 175 | 176 | [self reloadSpecifiers]; 177 | } 178 | } 179 | } 180 | 181 | - (PSTableCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { 182 | PSTableCell *cell = [super tableView:tableView cellForRowAtIndexPath:indexPath]; 183 | 184 | PSSpecifier *spec=[self specifierAtIndex:[self indexForIndexPath:indexPath]]; 185 | 186 | if ([spec propertyForKey:@"displayIdentifier"]!=nil){ 187 | UIImage *icon=[apps iconOfSize:ALApplicationIconSizeSmall forDisplayIdentifier:[spec propertyForKey:@"displayIdentifier"]]; 188 | [cell setIcon:icon]; 189 | } 190 | 191 | return cell; 192 | } 193 | @end -------------------------------------------------------------------------------- /appbuttonprefs/SAMultisectorControl.m: -------------------------------------------------------------------------------- 1 | // 2 | // SAMultisectorControl.m 3 | // CustomControl 4 | // 5 | // Created by Snipter on 12/31/13. 6 | // Copyright (c) 2013 SmartAppStudio. All rights reserved. 7 | // 8 | 9 | #import "SAMultisectorControl.h" 10 | 11 | #define saCircleLineWidth 2.0 12 | #define saMarkersLineWidth 2.0 13 | 14 | #define IS_OS_LOWER_7 ([[[UIDevice currentDevice] systemVersion] floatValue] < 7.0) 15 | 16 | typedef struct{ 17 | CGPoint circleCenter; 18 | CGFloat radius; 19 | 20 | double fullLine; 21 | double circleOffset; 22 | double circleLine; 23 | double circleEmpty; 24 | 25 | double circleOffsetAngle; 26 | double circleLineAngle; 27 | double circleEmptyAngle; 28 | 29 | CGPoint startMarkerCenter; 30 | CGPoint endMarkerCenter; 31 | 32 | CGFloat startMarkerRadius; 33 | CGFloat endMarkerRadius; 34 | 35 | CGFloat startMarkerFontSize; 36 | CGFloat endMarkerFontize; 37 | 38 | CGFloat startMarkerAlpha; 39 | CGFloat endMarkerAlpha; 40 | 41 | } SASectorDrawingInformation; 42 | 43 | 44 | @implementation SAMultisectorControl{ 45 | NSMutableArray *sectorsArray; 46 | 47 | SAMultisectorSector *trackingSector; 48 | SASectorDrawingInformation trackingSectorDrawInf; 49 | BOOL trackingSectorStartMarker; 50 | } 51 | 52 | #pragma mark - Initializators 53 | 54 | - (instancetype)init{ 55 | if(self = [super init]){ 56 | [self setupDefaultConfigurations]; 57 | } 58 | return self; 59 | } 60 | 61 | - (instancetype)initWithCoder:(NSCoder *)aDecoder{ 62 | if(self = [super initWithCoder:aDecoder]){ 63 | [self setupDefaultConfigurations]; 64 | } 65 | return self; 66 | } 67 | 68 | 69 | - (instancetype)initWithFrame:(CGRect)frame{ 70 | if(self = [super initWithFrame:frame]){ 71 | [self setupDefaultConfigurations]; 72 | } 73 | return self; 74 | } 75 | 76 | - (void) setupDefaultConfigurations{ 77 | sectorsArray = [NSMutableArray new]; 78 | self.sectorsRadius = 45.0; 79 | self.backgroundColor = [UIColor clearColor]; 80 | self.startAngle = toRadians(270); 81 | self.minCircleMarkerRadius = 10.0; 82 | self.maxCircleMarkerRadius = 50.0; 83 | self.numbersAfterPoint = 0; 84 | } 85 | 86 | #pragma mark - Setters 87 | 88 | - (void)setSectorsRadius:(double)sectorsRadius{ 89 | _sectorsRadius = sectorsRadius; 90 | [self setNeedsDisplay]; 91 | } 92 | 93 | #pragma mark - Sectors manipulations 94 | 95 | - (void)addSector:(SAMultisectorSector *)sector{ 96 | [sectorsArray addObject:sector]; 97 | [self setNeedsDisplay]; 98 | } 99 | 100 | - (void)removeSector:(SAMultisectorSector *)sector{ 101 | [sectorsArray removeObject:sector]; 102 | [self setNeedsDisplay]; 103 | } 104 | 105 | - (void)removeAllSectors{ 106 | [sectorsArray removeAllObjects]; 107 | [self setNeedsDisplay]; 108 | } 109 | 110 | - (NSArray *)sectors{ 111 | return sectorsArray; 112 | } 113 | 114 | #pragma mark - Events manipulator 115 | 116 | - (BOOL) beginTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event{ 117 | CGPoint touchPoint = [touch locationInView:self]; 118 | 119 | for(NSUInteger i = 0; i < sectorsArray.count; i++){ 120 | SAMultisectorSector *sector = sectorsArray[i]; 121 | NSUInteger position = i + 1; 122 | 123 | //if (sector.startValue < sector.endValue && sector.minValue < sector.maxValue) { 124 | 125 | SASectorDrawingInformation drawInf =[self sectorToDrawInf:sector position:position]; 126 | 127 | if([self touchInCircleWithPoint:touchPoint circleCenter:drawInf.endMarkerCenter]){ 128 | trackingSector = sector; 129 | trackingSectorDrawInf = drawInf; 130 | trackingSectorStartMarker = NO; 131 | return YES; 132 | } 133 | 134 | if([self touchInCircleWithPoint:touchPoint circleCenter:drawInf.startMarkerCenter]){ 135 | trackingSector = sector; 136 | trackingSectorDrawInf = drawInf; 137 | trackingSectorStartMarker = YES; 138 | return YES; 139 | } 140 | //} 141 | 142 | } 143 | return NO; 144 | } 145 | 146 | - (BOOL) continueTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event{ 147 | CGPoint touchPoint = [touch locationInView:self]; 148 | CGPoint ceter = [self multiselectCenter]; 149 | SAPolarCoordinate polar = decartToPolar(ceter, touchPoint); 150 | 151 | double correctedAngle; 152 | if(polar.angle < self.startAngle) correctedAngle = polar.angle + (2 * M_PI - self.startAngle); 153 | else correctedAngle = polar.angle - self.startAngle; 154 | 155 | double procent = correctedAngle / (M_PI * 2); 156 | 157 | double newValue = procent * (trackingSector.maxValue - trackingSector.minValue) + trackingSector.minValue; 158 | 159 | if(trackingSectorStartMarker){ 160 | /*if(newValue > trackingSector.startValue){ 161 | double diff = newValue - trackingSector.startValue; 162 | if(diff > ((trackingSector.maxValue - trackingSector.minValue)/2)){ 163 | trackingSector.startValue = trackingSector.minValue; 164 | [self valueChangedNotification]; 165 | [self setNeedsDisplay]; 166 | return YES; 167 | } 168 | } 169 | if(newValue >= trackingSector.endValue){ 170 | trackingSector.startValue = trackingSector.endValue; 171 | [self valueChangedNotification]; 172 | [self setNeedsDisplay]; 173 | return YES; 174 | }*/ 175 | trackingSector.startValue = newValue; 176 | [self valueChangedNotification]; 177 | } 178 | else{ 179 | /*if(newValue < trackingSector.endValue){ 180 | double diff = trackingSector.endValue - newValue; 181 | if(diff > ((trackingSector.maxValue - trackingSector.minValue)/2)){ 182 | trackingSector.endValue = trackingSector.maxValue; 183 | [self valueChangedNotification]; 184 | [self setNeedsDisplay]; 185 | return YES; 186 | } 187 | } 188 | if(newValue <= trackingSector.startValue){ 189 | trackingSector.endValue = trackingSector.startValue; 190 | [self valueChangedNotification]; 191 | [self setNeedsDisplay]; 192 | return YES; 193 | }*/ 194 | trackingSector.endValue = newValue; 195 | [self valueChangedNotification]; 196 | } 197 | 198 | [self setNeedsDisplay]; 199 | 200 | return YES; 201 | } 202 | 203 | - (void) endTrackingWithTouch:(UITouch *)touch withEvent:(UIEvent *)event{ 204 | trackingSector = nil; 205 | trackingSectorStartMarker = NO; 206 | } 207 | 208 | - (CGPoint) multiselectCenter{ 209 | return CGPointMake(self.bounds.size.width/2, self.bounds.size.height/2); 210 | } 211 | 212 | - (BOOL) touchInCircleWithPoint:(CGPoint)touchPoint circleCenter:(CGPoint)circleCenter{ 213 | SAPolarCoordinate polar = decartToPolar(circleCenter, touchPoint); 214 | if(polar.radius >= (self.sectorsRadius / 2)) return NO; 215 | else return YES; 216 | } 217 | 218 | - (void) valueChangedNotification{ 219 | [self sendActionsForControlEvents:UIControlEventValueChanged]; 220 | } 221 | 222 | 223 | #pragma mark - Drawing 224 | 225 | - (void)drawRect:(CGRect)rect{ 226 | for(int i = 0; i < sectorsArray.count; i++){ 227 | SAMultisectorSector *sector = sectorsArray[i]; 228 | 229 | //if (sector.startValue < sector.endValue && sector.minValue < sector.maxValue) { 230 | [self drawSector:sector atPosition:i+1]; 231 | //} 232 | 233 | } 234 | } 235 | 236 | - (void)drawSector:(SAMultisectorSector *)sector atPosition:(NSUInteger)position{ 237 | CGContextRef context = UIGraphicsGetCurrentContext(); 238 | 239 | CGContextSetLineWidth(context, 3.0);//saCircleLineWidth); 240 | 241 | 242 | UIColor *circleColor = sector.color; 243 | UIColor *endCircleColor = [UIColor colorWithHue:0.58 saturation:0.77 brightness:0.97 alpha:1];//[UIColor colorWithHue:0.58 saturation:0.66 brightness:0.89 alpha:1];//[UIColor colorWithHue:0 saturation:0 brightness:0.84 alpha:1];//[UIColor colorWithHue:0.51 saturation:1 brightness:0.99 alpha:1];//[UIColor colorWithHue:0.67 saturation:0.77 brightness:0.95 alpha:1];//[[UIColor grayColor] colorWithAlphaComponent:0.1]; 244 | UIColor *startCircleColor = endCircleColor; 245 | 246 | SASectorDrawingInformation drawInf = [self sectorToDrawInf:sector position:position]; 247 | 248 | CGFloat x = drawInf.circleCenter.x; 249 | CGFloat y = drawInf.circleCenter.y; 250 | CGFloat r = drawInf.radius; 251 | 252 | 253 | //start circle line 254 | [startCircleColor setStroke]; 255 | CGContextAddArc(context, x, y, r, drawInf.circleLineAngle, drawInf.circleOffsetAngle, 0); 256 | CGContextStrokePath(context); 257 | 258 | //circle line 259 | [circleColor setStroke]; 260 | CGContextAddArc(context, x, y, r, drawInf.circleOffsetAngle, drawInf.circleLineAngle, 0); 261 | CGContextStrokePath(context); 262 | 263 | //end circle line 264 | /*[endCircleColor setStroke]; 265 | CGContextAddArc(context, x, y, r, drawInf.circleLineAngle, drawInf.circleEmptyAngle, 0); 266 | CGContextStrokePath(context);*/ 267 | 268 | 269 | //clearing place for start marker 270 | CGContextSaveGState(context); 271 | CGContextAddArc(context, drawInf.startMarkerCenter.x, drawInf.startMarkerCenter.y, drawInf.startMarkerRadius - (saMarkersLineWidth/2.0), 0.0, 6.28, 0); 272 | CGContextClip(context); 273 | CGContextClearRect(context, self.bounds); 274 | CGContextRestoreGState(context); 275 | 276 | 277 | //clearing place for end marker 278 | CGContextSaveGState(context); 279 | CGContextAddArc(context, drawInf.endMarkerCenter.x, drawInf.endMarkerCenter.y, drawInf.endMarkerRadius - (saMarkersLineWidth/2.0), 0.0, 6.28, 0); 280 | CGContextClip(context); 281 | CGContextClearRect(context, self.bounds); 282 | CGContextRestoreGState(context); 283 | 284 | 285 | //markers 286 | CGContextSetLineWidth(context, saMarkersLineWidth); 287 | 288 | //drawing start marker 289 | //[[circleColor colorWithAlphaComponent:drawInf.startMarkerAlpha] setFill]; 290 | [[UIColor whiteColor] setFill]; 291 | CGContextAddArc(context, drawInf.startMarkerCenter.x, drawInf.startMarkerCenter.y, drawInf.startMarkerRadius, 0.0, 6.28, 0); 292 | CGContextFillPath(context); 293 | 294 | //drawing end marker 295 | //[[circleColor colorWithAlphaComponent:drawInf.endMarkerAlpha] setFill]; 296 | [[UIColor whiteColor] setFill]; 297 | CGContextAddArc(context, drawInf.endMarkerCenter.x, drawInf.endMarkerCenter.y, drawInf.endMarkerRadius, 0.0, 6.28, 0); 298 | CGContextFillPath(context); 299 | 300 | //text on markers 301 | NSString *markerStrTemplate = [@"%.0f" stringByReplacingOccurrencesOfString:@"0" withString:[NSString stringWithFormat:@"%i", (int)self.numbersAfterPoint]]; 302 | NSString *startMarkerStr = [NSString stringWithFormat:markerStrTemplate, sector.startValue]; 303 | NSString *endMarkerStr = [NSString stringWithFormat:markerStrTemplate, sector.endValue]; 304 | 305 | //drawing start marker's text 306 | [self drawString:startMarkerStr 307 | withFont:[UIFont boldSystemFontOfSize:drawInf.startMarkerFontSize] 308 | color:[circleColor colorWithAlphaComponent:drawInf.startMarkerAlpha] 309 | withCenter:drawInf.startMarkerCenter]; 310 | 311 | //drawing end marker's text 312 | [self drawString:endMarkerStr 313 | withFont:[UIFont boldSystemFontOfSize:drawInf.endMarkerFontize] 314 | color:[circleColor colorWithAlphaComponent:drawInf.endMarkerAlpha] 315 | withCenter:drawInf.endMarkerCenter]; 316 | } 317 | 318 | 319 | - (SASectorDrawingInformation) sectorToDrawInf:(SAMultisectorSector *)sector position:(NSInteger)position{ 320 | SASectorDrawingInformation drawInf; 321 | 322 | drawInf.circleCenter = CGPointMake(self.bounds.size.width / 2, self.bounds.size.height /2); 323 | drawInf.radius = 90;//self.sectorsRadius * position; 324 | 325 | drawInf.fullLine = sector.maxValue - sector.minValue; 326 | drawInf.circleOffset = sector.startValue - sector.minValue; 327 | drawInf.circleLine = sector.endValue - sector.startValue; 328 | drawInf.circleEmpty = sector.maxValue - sector.endValue; 329 | 330 | drawInf.circleOffsetAngle = (drawInf.circleOffset/drawInf.fullLine) * M_PI * 2 + self.startAngle; 331 | drawInf.circleLineAngle = (drawInf.circleLine/drawInf.fullLine) * M_PI * 2 + drawInf.circleOffsetAngle; 332 | drawInf.circleEmptyAngle = M_PI * 2 + self.startAngle; 333 | 334 | 335 | drawInf.startMarkerCenter = polarToDecart(drawInf.circleCenter, drawInf.radius, drawInf.circleOffsetAngle); 336 | drawInf.endMarkerCenter = polarToDecart(drawInf.circleCenter, drawInf.radius, drawInf.circleLineAngle); 337 | 338 | CGFloat minMarkerRadius = self.sectorsRadius / 4.0; 339 | CGFloat maxMarkerRadius = self.sectorsRadius / 4.0; 340 | 341 | drawInf.startMarkerRadius = ((drawInf.circleOffsetAngle/(self.startAngle + 2*M_PI)) * (maxMarkerRadius - minMarkerRadius)) + minMarkerRadius; 342 | drawInf.endMarkerRadius = drawInf.startMarkerRadius; 343 | //drawInf.endMarkerRadius = ((drawInf.circleLineAngle/(self.startAngle + 2*M_PI)) * (maxMarkerRadius - minMarkerRadius)) + minMarkerRadius; 344 | 345 | CGFloat minFontSize = 12.0; 346 | CGFloat maxFontSize = 18.0; 347 | 348 | drawInf.startMarkerFontSize = ((drawInf.circleOffset/drawInf.fullLine) * (maxFontSize - minFontSize)) + minFontSize; 349 | drawInf.endMarkerFontize = ((drawInf.circleLine/drawInf.fullLine) * (maxFontSize - minFontSize)) + minFontSize; 350 | 351 | //CGFloat markersCentresSegmentLength = segmentLength(drawInf.startMarkerCenter, drawInf.endMarkerCenter); 352 | //CGFloat markersRadiusSumm = drawInf.startMarkerRadius + drawInf.endMarkerRadius; 353 | 354 | /*if(markersCentresSegmentLength < markersRadiusSumm){ 355 | 356 | drawInf.startMarkerAlpha = markersCentresSegmentLength / markersRadiusSumm; 357 | }else{ 358 | drawInf.startMarkerAlpha = 1.0; 359 | }*/ 360 | drawInf.startMarkerAlpha = 1.0; 361 | drawInf.endMarkerAlpha = 1.0; 362 | 363 | return drawInf; 364 | } 365 | 366 | - (void) drawString:(NSString *)s withFont:(UIFont *)font color:(UIColor *)color withCenter:(CGPoint)center{ 367 | /*CGSize a = [s sizeWithAttributes:@{NSFontAttributeName: font}]; 368 | CGSize b = CGSizeMake(ceilf(a.width), ceilf(a.height)); 369 | 370 | CGSize size = b;//[s sizeWithFont:font]; 371 | CGFloat x = center.x - (size.width / 2); 372 | CGFloat y = center.y - (size.height / 2); 373 | CGRect textRect = CGRectMake(x, y, size.width, size.height);*/ 374 | 375 | /*if(IS_OS_LOWER_7){ 376 | [color set]; 377 | [s drawInRect:textRect withFont:font]; 378 | }else{*/ 379 | /* NSMutableDictionary *attr = [NSMutableDictionary new]; 380 | attr[NSFontAttributeName] = font; 381 | attr[NSForegroundColorAttributeName] = color; 382 | [s drawInRect:textRect withAttributes:attr];*/ 383 | // } 384 | } 385 | 386 | 387 | @end 388 | 389 | 390 | 391 | 392 | 393 | @implementation SAMultisectorSector 394 | 395 | - (instancetype)init{ 396 | if(self = [super init]){ 397 | self.minValue = 0.0; 398 | self.maxValue = 100.0; 399 | self.startValue = 0.0; 400 | self.endValue = 50.0; 401 | self.tag = 0; 402 | self.color = [UIColor greenColor]; 403 | } 404 | return self; 405 | } 406 | 407 | + (instancetype) sector{ 408 | return [[SAMultisectorSector alloc] init]; 409 | } 410 | 411 | + (instancetype) sectorWithColor:(UIColor *)color{ 412 | SAMultisectorSector *sector = [self sector]; 413 | sector.color = color; 414 | return sector; 415 | } 416 | 417 | + (instancetype) sectorWithColor:(UIColor *)color maxValue:(double)maxValue{ 418 | SAMultisectorSector *sector = [self sectorWithColor:color]; 419 | sector.maxValue = maxValue; 420 | return sector; 421 | } 422 | 423 | + (instancetype) sectorWithColor:(UIColor *)color minValue:(double)minValue maxValue:(double)maxValue{ 424 | SAMultisectorSector *sector = [self sectorWithColor:color maxValue:maxValue]; 425 | sector.minValue = minValue; 426 | return sector; 427 | } 428 | 429 | @end 430 | -------------------------------------------------------------------------------- /ABButtonView.m: -------------------------------------------------------------------------------- 1 | #import "AppButton.h" 2 | 3 | @implementation ABButtonView 4 | - (id)initWithFrame:(CGRect)frame andButton:(AppButton *)button{ 5 | self=[super initWithFrame:frame]; 6 | if (self){ 7 | cachedColors=[[NSMutableDictionary alloc] init]; 8 | filteredFavBundles=[button favoriteBundles]; 9 | favoriteIcons=[button favoriteIcons]; 10 | 11 | lastAngle=1.57079633; 12 | abWin=[button window]; 13 | abutton=button; 14 | [self configureLayout]; 15 | [self setupIconView]; 16 | } 17 | return self; 18 | } 19 | 20 | // Sets up the initial button look 21 | - (void)configureLayout{ 22 | trayView=[[UIScrollView alloc] initWithFrame:CGRectMake(0,60,0,0)]; 23 | [trayView setUserInteractionEnabled:NO]; 24 | [self insertSubview:trayView atIndex:1]; 25 | 26 | // Cap tray height 27 | maxTrayHeight=0.0; 28 | 29 | if (![abutton getToggleForKey:@"blurEnabled"]){ 30 | if ([abutton getToggleForKey:@"blackButton"]){ 31 | [self setBackgroundColor:[UIColor blackColor]]; 32 | }else{ 33 | [self setBackgroundColor:[UIColor whiteColor]]; 34 | } 35 | } 36 | 37 | [self.layer setCornerRadius:30]; 38 | [self.layer setBorderColor:[UIColor blackColor].CGColor]; 39 | 40 | // Set style 41 | [self setAlpha:[abutton getFloatForKey:@"restingAlpha"]]; 42 | if ([abutton getFloatForKey:@"restingAlpha"]<=0.01){ 43 | [self.layer setBorderWidth:0.0]; 44 | }else{ 45 | [self.layer setBorderWidth:1.0]; 46 | } 47 | 48 | if (![abutton getToggleForKey:@"borderEnabled"]) [self.layer setBorderWidth:0.0]; 49 | 50 | [self setClipsToBounds:YES]; 51 | } 52 | 53 | // Sets up the imageview 54 | - (void)setupIconView{ 55 | iconImageView=[[UIImageView alloc] initWithFrame:CGRectMake(self.frame.origin.x+5,self.frame.origin.y+5,self.frame.size.width-10,self.frame.size.height-10)]; 56 | [iconImageView setContentMode:UIViewContentModeScaleToFill]; 57 | [iconImageView setClipsToBounds:YES]; 58 | [iconImageView.layer setCornerRadius:iconImageView.bounds.size.width/2]; 59 | [iconImageView.layer setMasksToBounds:YES]; 60 | [iconImageView.layer setBorderWidth:0.0]; 61 | [iconImageView.layer setBorderColor:[UIColor whiteColor].CGColor]; 62 | [iconImageView setTag:1337]; 63 | 64 | [self addSubview:iconImageView]; 65 | } 66 | 67 | // Handle touch began 68 | - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ 69 | willDestroyMultitasking=false; 70 | clearTrayWaiting=false; 71 | 72 | heightForScroll=0; 73 | [abutton stopNotificationCenter]; 74 | 75 | UITouch *touch=[[event allTouches] anyObject]; 76 | firstTouch=[touch locationInView:[abutton touchesView]]; 77 | didSomething=NO; 78 | 79 | [self setAlpha:[abutton getFloatForKey:@"activeAlpha"]]; 80 | [abutton cacheIcons]; 81 | [abutton cacheFavoriteIcons]; 82 | 83 | if ([abutton getFloatForKey:@"restingAlpha"]<0.1 && [abutton getToggleForKey:@"borderEnabled"]){ 84 | [self.layer setBorderWidth:1.0]; 85 | } 86 | 87 | if ([abutton getToggleForKey:@"swapControls"]){ 88 | [self unlockMove]; 89 | [self performSelector:@selector(unlockOpenTray) withObject:nil afterDelay:0.5]; 90 | }else{ 91 | [self unlockOpenTray]; 92 | [self performSelector:@selector(unlockMove) withObject:nil afterDelay:0.5]; 93 | } 94 | } 95 | 96 | - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event{ 97 | didSomething=YES; 98 | 99 | UITouch *touch=[[event allTouches] anyObject]; 100 | CGPoint touchLocation=[touch locationInView:[abutton touchesView]]; 101 | 102 | if (touchLocation.x>firstTouch.x+10 || touchLocation.xfirstTouch.y+10 || touchLocation.y touch distance 115 | int originToTouchY=floor(touchLocation.y-abWin.frame.origin.y); 116 | int originToTouchX=floor(touchLocation.x-abWin.frame.origin.x); 117 | 118 | // Calculate new height (pythagorean) 119 | float newHeight=sqrt(pow(originToTouchX,2)+pow(originToTouchY,2)); 120 | 121 | // Cap newHeight 122 | if (newHeight<60) newHeight=60; 123 | if (newHeight>maxTrayHeight) newHeight=maxTrayHeight; 124 | 125 | // Calculate angle from 90deg 126 | float initialAngle=1.57079633; 127 | float newAngle=atan2(originToTouchY,originToTouchX); 128 | if (newAngleDEGREES_TO_RADIANS(360)) startValue-=DEGREES_TO_RADIANS(360); 155 | if (endValue>DEGREES_TO_RADIANS(360)) endValue-=DEGREES_TO_RADIANS(360); 156 | 157 | BOOL didRelayout=NO; 158 | 159 | // Reload trays if needed 160 | if ((startValuestartValue && angleendValue && (angle>startValue || angleendValue) && currentView==1){ 162 | didRelayout=YES; 163 | [self clearTray]; 164 | [self layoutIcons:0]; 165 | currentView=0; 166 | } 167 | }else{ 168 | if (lastAngle>startValue || lastAngle=[[UIScreen mainScreen] bounds].size.width-60 && touchLocation.x>abWin.frame.origin.x) || (touchLocation.x<=60 && touchLocation.x=[[UIScreen mainScreen] bounds].size.height-60 && touchLocation.y>abWin.frame.origin.y) || (touchLocation.y<=60 && touchLocation.y0 && requestedHeight>capHeight){ 222 | heightForScroll=newHeight; 223 | if (!isExpanding){ 224 | [self stopScrolling]; 225 | [self scrollToEnd]; 226 | } 227 | }else if (newHeight<180){ 228 | if (!isShrinking){ 229 | [self stopScrolling]; 230 | [self scrollToBeginning]; 231 | } 232 | }else{ 233 | [self stopScrolling]; 234 | } 235 | } 236 | 237 | 238 | // Handle multitasking clear 239 | if ([abutton getToggleForKey:@"killApps"]){ 240 | if (currentView==0){ 241 | if ([abutton identifiers]!=nil && [[abutton identifiers] count]>0){ 242 | if ([abutton getToggleForKey:@"scrollEnabled"]){ 243 | if ((capHeight==-1 && newHeight>=maxTrayHeight) || (capHeight>-1 && trayView.contentOffset.y>=(maxTrayHeight-capHeight-100))){ 244 | if (!clearTrayWaiting){ 245 | clearTrayWaiting=YES; 246 | [self performSelector:@selector(triggerClearMultitaskingTray) withObject:nil afterDelay:1.5]; 247 | } 248 | }else{ 249 | clearTrayWaiting=NO; 250 | [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(triggerClearMultitaskingTray) object:nil]; 251 | 252 | if (willDestroyMultitasking){ 253 | [self clearMultitaskingTrigger]; 254 | } 255 | } 256 | }else{ 257 | if (newHeight>=maxTrayHeight){ 258 | if (!clearTrayWaiting){ 259 | clearTrayWaiting=YES; 260 | [self performSelector:@selector(triggerClearMultitaskingTray) withObject:nil afterDelay:1.5]; 261 | } 262 | }else{ 263 | clearTrayWaiting=NO; 264 | [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(triggerClearMultitaskingTray) object:nil]; 265 | 266 | if (willDestroyMultitasking){ 267 | [self clearMultitaskingTrigger]; 268 | } 269 | } 270 | } 271 | } 272 | }else{ 273 | if (clearTrayWaiting){ 274 | clearTrayWaiting=NO; 275 | [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(triggerClearMultitaskingTray) object:nil]; 276 | } 277 | 278 | if (willDestroyMultitasking){ 279 | [self clearMultitaskingTrigger]; 280 | } 281 | } 282 | } 283 | 284 | [self setFrame:CGRectMake(self.frame.origin.x,self.frame.origin.y,60,newHeight)]; 285 | 286 | CGPoint offset=trayView.contentOffset; 287 | if (offset.y>(maxTrayHeight-capHeight-60)) offset.y=maxTrayHeight-capHeight-60; 288 | if (didRelayout) offset.y=0; 289 | 290 | [trayView setFrame:CGRectMake(trayView.frame.origin.x,trayView.frame.origin.y,60,newHeight-60)]; 291 | [trayView setContentOffset:offset]; 292 | 293 | int iconNumber=[self calculateIconNumber]; 294 | for (UIView *theView in trayView.subviews){ 295 | if ([theView isKindOfClass:[UIImageView class]]){ 296 | //theView.transform=CGAffineTransformIdentity; 297 | 298 | if ([abutton getToggleForKey:@"highlightApp"]){ 299 | if (theView.tag!=100+iconNumber){ 300 | //[theView setFrame:CGRectMake(10,10+(theView.tag*55),40,40)]; 301 | //[theView.layer setCornerRadius:20]; 302 | [theView setAlpha:0.25]; 303 | }else{ 304 | //[theView setFrame:CGRectMake(5,5+(theView.tag*55),50,50)]; 305 | //[theView.layer setCornerRadius:25]; 306 | [theView setAlpha:1.0]; 307 | } 308 | } 309 | 310 | theView.transform=iconTransform; 311 | } 312 | } 313 | 314 | // Manipulate the icon view as well 315 | iconImageView.transform=CGAffineTransformIdentity; 316 | iconImageView.transform=iconTransform; 317 | 318 | }else{ 319 | [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(unlockOpenTray) object:nil]; 320 | 321 | CGRect newFrame=CGRectMake(touchLocation.x-30,touchLocation.y-30,60,60); 322 | 323 | // Handle dockToScreenEdge 324 | if ([abutton getToggleForKey:@"dockToEdge"]){ 325 | if (touchLocation.y<60){ // Top 326 | newFrame.origin.y=-30; 327 | }else if (touchLocation.y>[[UIScreen mainScreen] bounds].size.height-60){ // Bottom 328 | newFrame.origin.y=[[UIScreen mainScreen] bounds].size.height-30; 329 | }else if (touchLocation.x<[[UIScreen mainScreen] bounds].size.width/2){ // Left 330 | newFrame.origin.x=-30; 331 | }else{ // Default to right 332 | newFrame.origin.x=[[UIScreen mainScreen] bounds].size.width-30; 333 | } 334 | } 335 | 336 | // Save coordinates and set newFrame 337 | [abutton savePosition:newFrame.origin]; 338 | [abWin setFrame:newFrame]; 339 | } 340 | } 341 | 342 | - (void)triggerClearMultitaskingTray{ 343 | UILabel *theLabel; 344 | 345 | for (UIView *sub in trayView.subviews){ 346 | if ([sub isKindOfClass:[UILabel class]]){ 347 | theLabel=(UILabel *)sub; 348 | } 349 | } 350 | 351 | if (theLabel!=nil){ 352 | [UIView animateWithDuration:0.25 delay:0.0 options:(UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionAllowUserInteraction) animations:^{ 353 | //[theLabel setTextColor:[UIColor redColor]]; 354 | [theLabel setText:@"∅"]; 355 | } completion:^(BOOL finished){ 356 | willDestroyMultitasking=YES; 357 | }]; 358 | } 359 | } 360 | 361 | - (void)clearMultitaskingTrigger{ 362 | UILabel *theLabel; 363 | 364 | for (UIView *sub in trayView.subviews){ 365 | if ([sub isKindOfClass:[UILabel class]]){ 366 | theLabel=(UILabel *)sub; 367 | } 368 | } 369 | 370 | if (theLabel!=nil){ 371 | [UIView animateWithDuration:0.25 delay:0.0 options:(UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionAllowUserInteraction) animations:^{ 372 | //[theLabel setTextColor:[UIColor redColor]]; 373 | [theLabel setText:@"↑"]; 374 | } completion:^(BOOL finished){ 375 | willDestroyMultitasking=NO; 376 | }]; 377 | } 378 | } 379 | 380 | 381 | - (void)scrollToEnd{ 382 | if (trayView.contentOffset.y<(maxTrayHeight-capHeight-60)){ 383 | isExpanding=YES; 384 | [trayView setContentOffset:CGPointMake(0,trayView.contentOffset.y+2)]; 385 | [self performSelector:@selector(scrollToEnd) withObject:nil afterDelay:0.01]; 386 | } 387 | } 388 | 389 | - (void)scrollToBeginning{ 390 | if (trayView.contentOffset.y>0){ 391 | isShrinking=YES; 392 | [trayView setContentOffset:CGPointMake(0,trayView.contentOffset.y-2)]; 393 | [self performSelector:@selector(scrollToBeginning) withObject:nil afterDelay:0.01]; 394 | } 395 | } 396 | 397 | - (void)stopScrolling{ 398 | isExpanding=NO; 399 | isShrinking=NO; 400 | [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(scrollToEnd) object:nil]; 401 | [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(scrollToBeginning) object:nil]; 402 | } 403 | 404 | // Lost touches 405 | - (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event{ 406 | [self clearTray]; 407 | [self lockOpenTray]; 408 | isPositionable=NO; 409 | } 410 | 411 | - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event{ 412 | [abutton startNotificationCenter]; 413 | [NSObject cancelPreviousPerformRequestsWithTarget:self selector:@selector(unlockMove) object:nil]; 414 | 415 | if (!didSomething) [abutton simulateHomePress]; 416 | if (willDestroyMultitasking){ 417 | [self clearTray]; 418 | [abutton killAllRunningApplications]; 419 | } 420 | 421 | // Figure out if they selected an app 422 | if (isMovable && !isPositionable && !willDestroyMultitasking){ 423 | 424 | float maxHeight=self.frame.size.height+trayView.contentOffset.y-60; 425 | int iconNumber=[self calculateIconNumber]; 426 | 427 | if ((maxTrayHeight-maxHeight)<80 || maxHeight<=10 || iconNumber<0){ 428 | // Close tray, just ignore silently 429 | }else{ 430 | NSMutableArray *icons=[abutton icons]; 431 | if (currentView==1) icons=favoriteIcons; 432 | 433 | NSMutableArray *bundles=[abutton identifiers]; 434 | if (currentView==1) bundles=filteredFavBundles; 435 | 436 | if ([bundles count]-1>=iconNumber){ 437 | if ([icons count]-1>=iconNumber){ 438 | [iconImageView.layer setBorderWidth:1.0]; 439 | [iconImageView setImage:[icons objectAtIndex:iconNumber]]; 440 | }else{ 441 | NSLog(@"!--- Missing icons: %@",icons); 442 | } 443 | 444 | [UIView animateWithDuration:0.5 delay:0.0 options:(UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionAllowUserInteraction) animations:^{ 445 | [iconImageView.layer setBorderWidth:0.0]; 446 | [iconImageView setAlpha:0.0]; 447 | } completion:^(BOOL finished){ 448 | [iconImageView setImage:nil]; 449 | [iconImageView setAlpha:1.0]; 450 | }]; 451 | 452 | [abutton didPickApplication:[bundles objectAtIndex:iconNumber]]; 453 | } 454 | } 455 | 456 | [self clearTray]; 457 | } 458 | 459 | [self lockOpenTray]; 460 | isPositionable=NO; 461 | /*isMovable=NO; 462 | [self setBackgroundColor:[UIColor whiteColor]];*/ 463 | } 464 | 465 | - (int)calculateIconNumber{ 466 | // When 50%+ of an icon is showing, then do that action... 467 | float maxHeight=self.frame.size.height+trayView.contentOffset.y-60; 468 | int iconNumber=ceil(maxHeight/55); 469 | iconNumber--; 470 | 471 | // Find remainder 472 | int remainder=(int)maxHeight%55; 473 | if (remainder>30) iconNumber++; 474 | 475 | iconNumber--; 476 | 477 | if ([abutton getToggleForKey:@"sausageFingers"]) iconNumber--; 478 | 479 | return iconNumber; 480 | } 481 | 482 | - (void)unlockMove{ 483 | isPositionable=YES; 484 | if ([abutton getToggleForKey:@"blurEnabled"]){ 485 | if ([abutton getToggleForKey:@"blackButton"]){ 486 | [[abutton effectView] _setEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]]; 487 | }else{ 488 | [[abutton effectView] _setEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleExtraLight]]; 489 | } 490 | }else{ 491 | if ([abutton getToggleForKey:@"blackButton"]){ 492 | [self setBackgroundColor:[UIColor blackColor]]; 493 | }else{ 494 | [self setBackgroundColor:[UIColor whiteColor]]; 495 | } 496 | } 497 | } 498 | 499 | - (void)unlockOpenTray{ 500 | if ([abutton getToggleForKey:@"swapControls"]) isPositionable=NO; 501 | 502 | if ([abutton getToggleForKey:@"blurEnabled"]){ 503 | if ([abutton getToggleForKey:@"blackTray"]){ 504 | [[abutton effectView] _setEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]]; 505 | }else{ 506 | [[abutton effectView] _setEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleExtraLight]]; 507 | } 508 | }else{ 509 | if ([abutton getToggleForKey:@"blackTray"]){ 510 | [self setBackgroundColor:[UIColor blackColor]]; 511 | }else{ 512 | [self setBackgroundColor:[UIColor whiteColor]]; 513 | } 514 | } 515 | 516 | isMovable=YES; 517 | [self layoutIcons:0]; 518 | currentView=0; 519 | } 520 | 521 | - (void)layoutIcons:(int)type{ 522 | capHeight=-1; 523 | [self stopScrolling]; 524 | [trayView setContentOffset:CGPointZero animated:NO]; 525 | 526 | filteredFavBundles=[abutton favoriteBundles]; 527 | favoriteIcons=[abutton favoriteIcons]; 528 | 529 | NSMutableArray *buns=[abutton identifiers]; 530 | if (type==1) buns=[abutton favoriteBundles]; 531 | 532 | NSMutableArray *icons=[abutton icons]; 533 | if (type==1) icons=favoriteIcons; 534 | 535 | // Dump icons NAO 536 | int theIconNum=0; 537 | for (UIImage *theImage in icons){ 538 | // Try to reuse an existing image view 539 | UIImageView *theImageView=(UIImageView *)[self viewWithTag:100+theIconNum]; 540 | if (theImageView==nil){ 541 | theImageView=[[UIImageView alloc] initWithFrame:CGRectMake(5,5+(theIconNum*55),50,50)]; 542 | 543 | [theImageView setContentMode: UIViewContentModeScaleToFill]; 544 | 545 | [theImageView setClipsToBounds:YES]; 546 | [theImageView.layer setCornerRadius:theImageView.bounds.size.width/2]; 547 | [theImageView.layer setMasksToBounds:YES]; 548 | [theImageView setTag:100+theIconNum]; 549 | 550 | [trayView addSubview:theImageView]; 551 | } 552 | 553 | [theImageView.layer setBorderWidth:1.0]; 554 | 555 | if ([abutton getToggleForKey:@"highlightApp"]){ 556 | [theImageView setAlpha:0.25]; 557 | }else{ 558 | [theImageView setAlpha:1.0]; 559 | } 560 | 561 | 562 | [theImageView setImage:theImage]; 563 | 564 | if ([cachedColors objectForKey:[buns objectAtIndex:theIconNum]]==nil){ 565 | [cachedColors setObject:[theImage colorAtPixel:CGPointMake(50,10)] forKey:[buns objectAtIndex:theIconNum]]; 566 | } 567 | 568 | UIColor *iconColor=(UIColor *)[cachedColors objectForKey:[buns objectAtIndex:theIconNum]]; 569 | 570 | [theImageView.layer setBorderColor:iconColor.CGColor]; 571 | 572 | [theImageView.layer setShouldRasterize:YES]; 573 | 574 | theIconNum++; 575 | } 576 | 577 | // Clear up remaining UIViews 578 | /*for (UIView *theView in self.subviews){ 579 | if ([theView isKindOfClass:[UIImageView class]] && theView.tag>=100+theIconNum-1){ 580 | [theView removeFromSuperview]; 581 | } 582 | }*/ 583 | 584 | if ([abutton getToggleForKey:@"sausageFingers"]) theIconNum++; 585 | 586 | // Make close tray button 587 | UILabel *theCloseLabel=[[UILabel alloc] initWithFrame:CGRectMake(5,5+(theIconNum*55),50,50)]; 588 | [theCloseLabel setAlpha:0.5]; 589 | [theCloseLabel setFont:[UIFont systemFontOfSize:18]]; 590 | [theCloseLabel setTextAlignment:NSTextAlignmentCenter]; 591 | [theCloseLabel setText:@"↑"]; 592 | [theCloseLabel setTextColor:[UIColor lightGrayColor]]; 593 | [trayView addSubview:theCloseLabel]; 594 | 595 | // Set max tray height 596 | maxTrayHeight=65+(theIconNum*55)+55; 597 | } 598 | 599 | - (void)lockOpenTray{ 600 | isMovable=NO; 601 | 602 | [UIView animateWithDuration:0.25 delay:0.0 options:(UIViewAnimationOptionBeginFromCurrentState | UIViewAnimationOptionAllowUserInteraction) animations:^{ 603 | [trayView setContentOffset:CGPointZero]; 604 | [trayView setFrame:CGRectMake(trayView.frame.origin.x,trayView.frame.origin.y,60,60)]; 605 | [self setFrame:CGRectMake(self.frame.origin.x,self.frame.origin.y,60,60)]; 606 | 607 | if ([abutton getToggleForKey:@"blurEnabled"]){ 608 | //[blurView setFrame:CGRectMake(0,0,60,60)]; 609 | [[abutton effectView] setFrame:CGRectMake(0,0,60,60)]; 610 | }else{ 611 | if ([abutton getToggleForKey:@"blackButton"]){ 612 | [self setBackgroundColor:[UIColor blackColor]]; 613 | }else{ 614 | [self setBackgroundColor:[UIColor whiteColor]]; 615 | } 616 | } 617 | 618 | [self setAlpha:[abutton getFloatForKey:@"restingAlpha"]]; 619 | 620 | if ([abutton getFloatForKey:@"restingAlpha"]<=0.01){ 621 | [self.layer setBorderWidth:0.0]; 622 | }else{ 623 | [self.layer setBorderWidth:1.0]; 624 | } 625 | 626 | if (![abutton getToggleForKey:@"borderEnabled"]) [self.layer setBorderWidth:0.0]; 627 | } completion:^(BOOL finished){ 628 | // Un-transform! 629 | iconImageView.transform=CGAffineTransformIdentity; 630 | self.superview.transform=CGAffineTransformIdentity; 631 | 632 | // Fix muddled superview frame 633 | CGRect theFrame=self.superview.frame; 634 | theFrame.size.height=60; 635 | theFrame.size.width=60; 636 | [self.superview setFrame:theFrame]; 637 | 638 | if ([abutton getToggleForKey:@"blurEnabled"]){ 639 | if ([abutton getToggleForKey:@"blackButton"]){ 640 | [[abutton effectView] _setEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleDark]]; 641 | }else{ 642 | [[abutton effectView] _setEffect:[UIBlurEffect effectWithStyle:UIBlurEffectStyleExtraLight]]; 643 | } 644 | } 645 | }]; 646 | } 647 | 648 | - (void)clearTray{ 649 | // Remove all UIImageView's 650 | for (UIView *theView in trayView.subviews){ 651 | if ([theView isKindOfClass:[UIImageView class]]){ 652 | if (theView.tag!=1337){ 653 | // Make reusable 654 | [(UIImageView *)theView setImage:nil]; 655 | [theView.layer setShouldRasterize:NO]; 656 | [theView.layer setBorderWidth:0.0]; 657 | //[theView setAlpha:0.0]; 658 | } 659 | }else if ([theView isKindOfClass:[UILabel class]]){ 660 | [theView removeFromSuperview]; 661 | } 662 | } 663 | } 664 | 665 | - (UIView *)hitTest:(CGPoint)point withEvent:(UIEvent *)event{ 666 | if ([self alpha]<0.1){ 667 | return self; 668 | }else{ 669 | return [super hitTest:point withEvent:event]; 670 | } 671 | } 672 | @end --------------------------------------------------------------------------------