Skip to content

Commit

Permalink
1.7.6
Browse files Browse the repository at this point in the history
  • Loading branch information
opa334 committed Oct 6, 2019
1 parent dee456f commit 20e2486
Show file tree
Hide file tree
Showing 300 changed files with 16,698 additions and 10,054 deletions.
695 changes: 21 additions & 674 deletions LICENSE.md

Large diffs are not rendered by default.

5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ export DEBUG_LOGGING ?= 0
export NO_CEPHEI ?= 0
export NO_ROCKETBOOTSTRAP ?= 0
export NO_LIBCSCOLORPICKER ?= 0
export NO_LIBBULLETIN ?= 0

ifeq ($(ROOTLESS),1)
export NO_DEPENDENCIES = 1
Expand All @@ -14,7 +13,6 @@ endif
ifeq ($(SIMJECT),1)
export NO_CEPHEI = 1
export NO_ROCKETBOOTSTRAP = 1
export NO_LIBBULLETIN = 1
export TARGET = simulator:clang:12.1:8.0
export ARCHS = x86_64 i386
else
Expand All @@ -26,7 +24,6 @@ ifeq ($(NO_DEPENDENCIES),1)
export NO_CEPHEI = 1
export NO_ROCKETBOOTSTRAP = 1
export NO_LIBCSCOLORPICKER = 1
export NO_LIBBULLETIN = 1
endif

export INCLUDES = $(THEOS_PROJECT_DIR)/Shared
Expand All @@ -35,7 +32,7 @@ include $(THEOS)/makefiles/common.mk

include $(THEOS_MAKE_PATH)/tweak.mk

SUBPROJECTS += MobileSafari
SUBPROJECTS += MobileSafari WebContent

ifeq ($(NO_ROCKETBOOTSTRAP),0)
SUBPROJECTS += SpringBoard
Expand Down
25 changes: 0 additions & 25 deletions MobileSafari/Classes/AVActivityButton.h

This file was deleted.

86 changes: 0 additions & 86 deletions MobileSafari/Classes/AVActivityButton.xm

This file was deleted.

34 changes: 19 additions & 15 deletions MobileSafari/Classes/SPCacheManager.h
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
// SPCacheManager.h
// (c) 2017 - 2019 opa334

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// Copyright (c) 2017-2019 Lars Fröder

// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:

// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.

// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

@interface SPCacheManager : NSObject
{
Expand Down
85 changes: 44 additions & 41 deletions MobileSafari/Classes/SPCacheManager.mm
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
// SPCacheManager.mm
// (c) 2017 - 2019 opa334

// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.

// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// Copyright (c) 2017-2019 Lars Fröder

// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:

// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.

// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

#import "SPCacheManager.h"

Expand Down Expand Up @@ -148,15 +152,18 @@ - (NSDictionary*)loadDownloadCache

- (void)saveDownloadCache:(NSDictionary*)downloadCache
{
NSURL* downloadCacheURL = [_cacheURL URLByAppendingPathComponent:@"downloads.plist"];
@synchronized(self)
{
NSURL* downloadCacheURL = [_cacheURL URLByAppendingPathComponent:@"downloads.plist"];

//Create archived data from pendingDownloads
NSData *data = [NSKeyedArchiver archivedDataWithRootObject:downloadCache];
//Create archived data from pendingDownloads
NSData *data = [NSKeyedArchiver archivedDataWithRootObject:downloadCache];

//Write data to file
[data writeToURL:downloadCacheURL atomically:YES];
//Write data to file
[data writeToURL:downloadCacheURL atomically:YES];

[self updateExcludedFromBackup];
[self updateExcludedFromBackup];
}
}

//Clear the download cache by removing the plist file
Expand Down Expand Up @@ -224,7 +231,6 @@ - (BOOL)desktopButtonStateForUUID:(NSUUID*)UUID
[self loadDesktopButtonStates];
}


if(UUID)
{
return [[_desktopButtonStates objectForKey:UUID] boolValue];
Expand All @@ -247,13 +253,6 @@ - (void)loadTabStateAdditions
{
_tabStateAdditions = [NSMutableDictionary new];
}
else
{
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^
{
[self cleanUpTabStateAdditions];
});
}
}

- (void)saveTabStateAdditions
Expand Down Expand Up @@ -285,12 +284,16 @@ - (BOOL)isTabWithUUIDLocked:(NSUUID*)UUID

- (void)setLocked:(BOOL)locked forTabWithUUID:(NSUUID*)UUID
{
if(!_tabStateAdditions)
{
[self loadTabStateAdditions];
}

NSMutableSet* lockedTabs = [_tabStateAdditions objectForKey:@"lockedTabs"];

if(!lockedTabs)
{
lockedTabs = [NSMutableSet new];
[_tabStateAdditions setObject:lockedTabs forKey:@"lockedTabs"];
}

if(locked)
Expand All @@ -302,10 +305,8 @@ - (void)setLocked:(BOOL)locked forTabWithUUID:(NSUUID*)UUID
[lockedTabs removeObject:UUID];
}

dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^
{
[self saveTabStateAdditions];
});
[_tabStateAdditions setObject:lockedTabs forKey:@"lockedTabs"];
[self saveTabStateAdditions];
}

- (void)cleanUpTabStateAdditions
Expand All @@ -317,17 +318,19 @@ - (void)cleanUpTabStateAdditions

NSMutableSet* lockedTabs = [[_tabStateAdditions objectForKey:@"lockedTabs"] mutableCopy];

for(NSUUID* UUID in [lockedTabs copy])
if(lockedTabs)
{
if(![self tabExistsWithUUID:UUID])
for(NSUUID* UUID in [lockedTabs copy])
{
//NSLog(@"cleaned tab with UUID:%@", UUID);
[lockedTabs removeObject:UUID];
if(![self tabExistsWithUUID:UUID])
{
[lockedTabs removeObject:UUID];
}
}
}

[_tabStateAdditions setObject:lockedTabs forKey:@"lockedTabs"];
[self saveTabStateAdditions];
[_tabStateAdditions setObject:lockedTabs forKey:@"lockedTabs"];
[self saveTabStateAdditions];
}
}

- (BOOL)tabExistsWithUUID:(NSUUID*)UUID
Expand Down
33 changes: 33 additions & 0 deletions MobileSafari/Classes/SPCellButtonsView.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
// Copyright (c) 2017-2019 Lars Fröder

// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:

// The above copyright notice and this permission notice shall be included in all
// copies or substantial portions of the Software.

// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.

@interface SPCellButtonsView : UIView
{
NSArray<NSLayoutConstraint*>* _oneButtonConstraints;
NSArray<NSLayoutConstraint*>* _allButtonsConstraints;
NSArray<NSLayoutConstraint*>* _sharedConstraints;
}

@property (nonatomic) BOOL displaysBottomButton;

@property (nonatomic) UIButton* topButton;
@property (nonatomic) UIButton* bottomButton;

@end
Loading

0 comments on commit 20e2486

Please sign in to comment.