Skip to content

Commit

Permalink
Add preference for edit mode initiation
Browse files Browse the repository at this point in the history
  • Loading branch information
eswick committed Feb 3, 2015
1 parent f7d359c commit ef5ae6a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 4 additions & 0 deletions Preferences.def
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ GROUP("", "Show Yosemite-style black dot below running apps.", )

PREF(NSNumber*, showStateIndicator, @(false), @"Show App State Dot", PSSwitchCell, )

GROUP("", "Slide up to initiate edit mode.", )

PREF(NSNumber*, initiateEditMode, @(false), @"Initiate Edit Mode", PSSwitchCell, )

GROUP("", "For compatibility issues.", )

PREF(NSNumber*, useNormalBackground, @(false), @"Use Normal Dock Background", PSSwitchCell, )
Expand Down
3 changes: 1 addition & 2 deletions Tweak.m
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,7 @@ - (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
iconView = [self.viewMap mappedIconViewForIcon:self.model.icons[[self columnAtX:self.focusPoint]]];
} @catch (NSException *e) { }

if ((in_landscape ? [[touches anyObject] locationInView:self].x : [[touches anyObject] locationInView:self].y) < 0 && ![[objc_getClass("SBIconController") sharedInstance] grabbedIcon] && iconView) {

if ((in_landscape ? [[touches anyObject] locationInView:self].x : [[touches anyObject] locationInView:self].y) < 0 && (![[objc_getClass("SBIconController") sharedInstance] grabbedIcon] && iconView) && ((![[objc_getClass("SBIconController") sharedInstance] isEditing] && [[prefs getinitiateEditMode] boolValue]) || [[objc_getClass("SBIconController") sharedInstance] isEditing]) ) {
// get origin, remove transform, restore origin
CGPoint origin = iconView.origin;
iconView.transform = CGAffineTransformIdentity;
Expand Down

0 comments on commit ef5ae6a

Please sign in to comment.