From b5a1839c400a2675646d17d6bc5a094b4e8b2aa2 Mon Sep 17 00:00:00 2001 From: insanj Date: Wed, 12 Mar 2014 22:13:44 -0400 Subject: [PATCH] 1.0, replaces Edit with individual swipes --- .gitignore | 5 +++++ EditClocks.plist | 5 +++++ EditClocks.xm | 23 +++++++++++++++++++++++ Makefile | 14 ++++++++++++++ README.md | 33 +++++++++++++++++++++++++++++++++ control | 9 +++++++++ 6 files changed, 89 insertions(+) create mode 100644 .gitignore create mode 100644 EditClocks.plist create mode 100644 EditClocks.xm create mode 100644 Makefile create mode 100644 README.md create mode 100644 control diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..602f5fe --- /dev/null +++ b/.gitignore @@ -0,0 +1,5 @@ +.theos +theos +obj +_ +debs diff --git a/EditClocks.plist b/EditClocks.plist new file mode 100644 index 0000000..0bd04d1 --- /dev/null +++ b/EditClocks.plist @@ -0,0 +1,5 @@ +{ + Filter = { + Bundles = ( "com.apple.mobiletimer" ); + }; +} diff --git a/EditClocks.xm b/EditClocks.xm new file mode 100644 index 0000000..aad538e --- /dev/null +++ b/EditClocks.xm @@ -0,0 +1,23 @@ +#import + +@interface TableViewController : UIViewController +@end + +@interface WorldClockViewController : TableViewController +@end + +%hook WorldClockViewController + +-(UIBarButtonItem *)editButtonItem{ + return nil; +} + +-(BOOL)tableView:(UITableView *)arg1 canEditRowAtIndexPath:(NSIndexPath *)arg2{ + return YES; +} + +-(UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath { + return UITableViewCellEditingStyleDelete; +} + +%end diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..446ffee --- /dev/null +++ b/Makefile @@ -0,0 +1,14 @@ +THEOS_PACKAGE_DIR_NAME = debs +TARGET = :clang +ARCHS = armv7 arm64 + +include theos/makefiles/common.mk + +TWEAK_NAME = EditClocks +EditClocks_FILES = EditClocks.xm +EditAlarms_FRAMEWORKS = UIKit + +include $(THEOS_MAKE_PATH)/tweak.mk + +internal-after-install:: + install.exec "killall -9 backboardd" diff --git a/README.md b/README.md new file mode 100644 index 0000000..077ab56 --- /dev/null +++ b/README.md @@ -0,0 +1,33 @@ +Edit Clocks +======================= + +Swipe to delete clocks. + +--------------------------------------- + Simplified BSD License + Copyright (c) 2014, Julian Weiss + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR + ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + The views and conclusions contained in the software and documentation are those + of the authors and should not be interpreted as representing official policies, + either expressed or implied, of the FreeBSD Project. diff --git a/control b/control new file mode 100644 index 0000000..86813ef --- /dev/null +++ b/control @@ -0,0 +1,9 @@ +Package: com.insanj.editclocks +Name: Edit Clocks +Depends: mobilesubstrate +Version: 1.0 +Architecture: iphoneos-arm +Description: Swipe to delete clocks. +Maintainer: Julian Weiss +Author: Julian (insanj) Weiss +Section: Tweaks