Skip to content

Commit 91fd4e3

Browse files
committed
1.89 (faster bookmark launching)
1 parent d08678d commit 91fd4e3

10 files changed

Lines changed: 16 additions & 567 deletions

File tree

Gestr.xcodeproj/project.pbxproj

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@
6262
D040287719CA591100E372E7 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D040287619CA591100E372E7 /* CoreServices.framework */; };
6363
D040287919CA591500E372E7 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D040287819CA591500E372E7 /* Carbon.framework */; };
6464
D040287B19CA591900E372E7 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D040287A19CA591900E372E7 /* Cocoa.framework */; };
65-
D040287D19CA597200E372E7 /* ScriptingBridge.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D040287C19CA597200E372E7 /* ScriptingBridge.framework */; };
6665
D05227061A33BBEE00AAF6FD /* NSImage+M5Darkable.m in Sources */ = {isa = PBXBuildFile; fileRef = D05227051A33BBEE00AAF6FD /* NSImage+M5Darkable.m */; };
6766
/* End PBXBuildFile section */
6867

@@ -98,7 +97,6 @@
9897
0029FDAB18557DE600BDBA25 /* AppTextFieldCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppTextFieldCell.h; sourceTree = "<group>"; };
9998
0029FDAC18557DE600BDBA25 /* AppTextFieldCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppTextFieldCell.m; sourceTree = "<group>"; };
10099
0029FDAE18557DE600BDBA25 /* background2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = background2.png; sourceTree = "<group>"; };
101-
0029FDAF18557DE600BDBA25 /* Chrome.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Chrome.h; sourceTree = "<group>"; };
102100
0029FDB018557DE600BDBA25 /* ChromePage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChromePage.h; sourceTree = "<group>"; };
103101
0029FDB118557DE600BDBA25 /* ChromePage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChromePage.m; sourceTree = "<group>"; };
104102
0029FDB218557DE600BDBA25 /* Gestr-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "Gestr-Info.plist"; sourceTree = "<group>"; };
@@ -156,7 +154,6 @@
156154
0029FDE618557DE600BDBA25 /* NSStatusItemPrioritizer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NSStatusItemPrioritizer.m; sourceTree = "<group>"; };
157155
0029FDE718557DE600BDBA25 /* RepeatedImageView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RepeatedImageView.h; sourceTree = "<group>"; };
158156
0029FDE818557DE600BDBA25 /* RepeatedImageView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RepeatedImageView.m; sourceTree = "<group>"; };
159-
0029FDE918557DE600BDBA25 /* Safari.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Safari.h; sourceTree = "<group>"; };
160157
0029FDEA18557DE600BDBA25 /* SafariPage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SafariPage.h; sourceTree = "<group>"; };
161158
0029FDEB18557DE600BDBA25 /* SafariPage.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SafariPage.m; sourceTree = "<group>"; };
162159
0029FDEC18557DE600BDBA25 /* ShadowTextFieldCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ShadowTextFieldCell.h; sourceTree = "<group>"; };
@@ -190,7 +187,6 @@
190187
isa = PBXFrameworksBuildPhase;
191188
buildActionMask = 2147483647;
192189
files = (
193-
D040287D19CA597200E372E7 /* ScriptingBridge.framework in Frameworks */,
194190
D040287B19CA591900E372E7 /* Cocoa.framework in Frameworks */,
195191
D040287919CA591500E372E7 /* Carbon.framework in Frameworks */,
196192
D040287719CA591100E372E7 /* CoreServices.framework in Frameworks */,
@@ -258,8 +254,6 @@
258254
isa = PBXGroup;
259255
children = (
260256
0037430F1885E30600F9B53A /* Images.xcassets */,
261-
0029FDAF18557DE600BDBA25 /* Chrome.h */,
262-
0029FDE918557DE600BDBA25 /* Safari.h */,
263257
0029FDEF18557DE600BDBA25 /* tableCellBack.png */,
264258
0029FDF018557DE600BDBA25 /* trackpadBackground.png */,
265259
0029FDB218557DE600BDBA25 /* Gestr-Info.plist */,
@@ -637,7 +631,7 @@
637631
CODE_SIGN_ENTITLEMENTS = Gestr/Gestr.entitlements;
638632
CODE_SIGN_IDENTITY = "Mac Developer";
639633
COMBINE_HIDPI_IMAGES = YES;
640-
CURRENT_PROJECT_VERSION = 1.88;
634+
CURRENT_PROJECT_VERSION = 1.89;
641635
DEVELOPMENT_TEAM = EGQME33F5E;
642636
ENABLE_HARDENED_RUNTIME = YES;
643637
FRAMEWORK_SEARCH_PATHS = (
@@ -648,7 +642,7 @@
648642
GCC_PRECOMPILE_PREFIX_HEADER = YES;
649643
GCC_PREFIX_HEADER = "Gestr/Gestr-Prefix.pch";
650644
INFOPLIST_FILE = "Gestr/Gestr-Info.plist";
651-
MARKETING_VERSION = 1.88;
645+
MARKETING_VERSION = 1.89;
652646
OTHER_CODE_SIGN_FLAGS = "--deep";
653647
PRODUCT_BUNDLE_IDENTIFIER = "com.mhuusko5.${PRODUCT_NAME:rfc1034identifier}";
654648
PRODUCT_NAME = Gestr;
@@ -665,7 +659,7 @@
665659
CODE_SIGN_ENTITLEMENTS = Gestr/Gestr.entitlements;
666660
CODE_SIGN_IDENTITY = "Mac Developer";
667661
COMBINE_HIDPI_IMAGES = YES;
668-
CURRENT_PROJECT_VERSION = 1.88;
662+
CURRENT_PROJECT_VERSION = 1.89;
669663
DEVELOPMENT_TEAM = EGQME33F5E;
670664
ENABLE_HARDENED_RUNTIME = YES;
671665
FRAMEWORK_SEARCH_PATHS = (
@@ -676,7 +670,7 @@
676670
GCC_PRECOMPILE_PREFIX_HEADER = YES;
677671
GCC_PREFIX_HEADER = "Gestr/Gestr-Prefix.pch";
678672
INFOPLIST_FILE = "Gestr/Gestr-Info.plist";
679-
MARKETING_VERSION = 1.88;
673+
MARKETING_VERSION = 1.89;
680674
OTHER_CODE_SIGN_FLAGS = "--deep";
681675
PRODUCT_BUNDLE_IDENTIFIER = "com.mhuusko5.${PRODUCT_NAME:rfc1034identifier}";
682676
PRODUCT_NAME = Gestr;

Gestr/Chrome.h

Lines changed: 0 additions & 190 deletions
This file was deleted.

Gestr/ChromePage.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,7 @@
1-
#import <ScriptingBridge/ScriptingBridge.h>
2-
#import "Chrome.h"
31
#import "WebPage.h"
42

53
@interface ChromePage : WebPage
64

75
- (id)initWithDisplayName:(NSString *)displayName icon:(NSImage *)icon url:(NSString *)url;
8-
- (void)launch;
96

107
@end

Gestr/ChromePage.m

Lines changed: 1 addition & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -3,48 +3,7 @@
33
@implementation ChromePage
44

55
- (id)initWithDisplayName:(NSString *)displayName icon:(NSImage *)icon url:(NSString *)url {
6-
self = [super initWithDisplayName:displayName icon:icon url:url targetBrowserId:@"com.google.Chrome"];
7-
8-
return self;
9-
}
10-
11-
- (void)launch {
12-
ChromeApplication *chrome = [SBApplication applicationWithBundleIdentifier:@"com.google.Chrome"];
13-
[chrome activate];
14-
15-
if (chrome.windows.count == 0) {
16-
[chrome.windows addObject:[[[chrome classForScriptingClass:@"window"] alloc] init]];
17-
((ChromeWindow *)chrome.windows[0]).activeTab.URL = self.url;
18-
}
19-
else {
20-
BOOL tabExists = NO;
21-
int tabIndex = -1;
22-
ChromeWindow *window = nil;
23-
for (window in chrome.windows) {
24-
for (int i = 0; i < window.tabs.count; i++) {
25-
ChromeTab *tab = window.tabs[i];
26-
if ([[[self class] stripUrl:tab.URL] isEqualToString:[[self class] stripUrl:self.url]]) {
27-
tabIndex = i;
28-
tabExists = YES;
29-
break;
30-
}
31-
}
32-
if (tabExists) {
33-
break;
34-
}
35-
}
36-
37-
if (tabExists) {
38-
window.activeTabIndex = tabIndex + 1;
39-
window.index = 1;
40-
}
41-
else {
42-
ChromeTab *newTab = [[[chrome classForScriptingClass:@"tab"] alloc] initWithProperties:@{ @"URL": self.url }];
43-
window = chrome.windows[0];
44-
[window.tabs addObject:newTab];
45-
window.index = 1;
46-
}
47-
}
6+
return (self = [super initWithDisplayName:displayName icon:icon url:url targetBrowserId:@"com.google.Chrome"]);
487
}
498

509
@end

0 commit comments

Comments
 (0)