Skip to content

Commit

Permalink
Merge pull request #9 from zetxek/upgrade-target
Browse files Browse the repository at this point in the history
Release 1.1.1: Upgrade target
  • Loading branch information
zetxek authored Jan 9, 2023
2 parents 86c095c + e00bb8d commit ce17680
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 683 deletions.
Binary file added Release/MenuBarTranslate-1.1.app.zip
Binary file not shown.
Binary file removed Release/Translate Menu.app.zip
Binary file not shown.
25 changes: 16 additions & 9 deletions Translate Menu.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,13 @@
attributes = {
LastSwiftMigration = 0720;
LastSwiftUpdateCheck = 0720;
LastUpgradeCheck = 1240;
ORGANIZATIONNAME = "Razeware LLC";
LastUpgradeCheck = 1420;
ORGANIZATIONNAME = "Adrian Moreno Peña";
TargetAttributes = {
78A6BBCA1ADCB5EE00554D13 = {
CreatedOnToolsVersion = 6.3;
ProvisioningStyle = Manual;
DevelopmentTeam = 2VZWF2E5YD;
ProvisioningStyle = Automatic;
};
};
};
Expand Down Expand Up @@ -185,6 +186,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
Expand Down Expand Up @@ -242,6 +244,7 @@
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
CODE_SIGN_IDENTITY = "-";
COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand All @@ -265,12 +268,14 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = "";
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 2VZWF2E5YD;
INFOPLIST_FILE = "Translate Menu/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MARKETING_VERSION = 1.1;
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
MARKETING_VERSION = 1.1.1;
PRODUCT_BUNDLE_IDENTIFIER = "info.adrianmoreno.Translate-Menu";
PRODUCT_NAME = "Translate Menu";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand All @@ -283,12 +288,14 @@
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
DEVELOPMENT_TEAM = "";
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_TEAM = 2VZWF2E5YD;
INFOPLIST_FILE = "Translate Menu/Info.plist";
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/../Frameworks";
MARKETING_VERSION = 1.1;
MACOSX_DEPLOYMENT_TARGET = "$(RECOMMENDED_MACOSX_DEPLOYMENT_TARGET)";
MARKETING_VERSION = 1.1.1;
PRODUCT_BUNDLE_IDENTIFIER = "info.adrianmoreno.Translate-Menu";
PRODUCT_NAME = "Translate Menu";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
4 changes: 3 additions & 1 deletion Translate Menu/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ class AppDelegate: NSObject, NSApplicationDelegate {
showPopover(sender: sender)
}
} else if (secondaryDown) {
self.statusItem.popUpMenu(self.statusMenu)
statusItem.menu = self.statusMenu
statusItem.button?.performClick(nil)
statusItem.menu = nil
}
}

Expand Down
2 changes: 1 addition & 1 deletion Translate Menu/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
<key>LSUIElement</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2016 Adrián Moreno Peña</string>
<string>Copyright © 2023 Adrián Moreno Peña</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
Expand Down
655 changes: 2 additions & 653 deletions Translate Menu/MainMenu.xib

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Translate Menu/TranslateViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import Cocoa
import WebKit

class TranslateViewController: NSViewController {
@IBOutlet var webView: WebView!
@IBOutlet var webView: WKWebView!
@IBOutlet var popOverViewController: NSPopover!

var urlLoaded = false
Expand All @@ -37,14 +37,14 @@ class TranslateViewController: NSViewController {
if (!self.urlLoaded) {
NSLog("TranslateViewController: loadURL")
self.urlLoaded = true
webView.mainFrame.load(NSURLRequest(url: NSURL(string: defaultUrl)! as URL) as URLRequest)
webView.load(NSURLRequest(url: NSURL(string: defaultUrl)! as URL) as URLRequest)
}
}

public func loadText(text: String){
NSLog("TranslateViewController, Loading text: " + text)
if (webView != nil){
webView.mainFrame.load(getTranslateURL(textToTranslate: text))
webView.load(getTranslateURL(textToTranslate: text))
}
}

Expand Down
27 changes: 11 additions & 16 deletions Translate Menu/TranslateViewController.xib
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="14868" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="21507" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="14868"/>
<plugIn identifier="com.apple.WebKitIBPlugin" version="14868"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="21507"/>
<plugIn identifier="com.apple.WebKit2IBPlugin" version="21507"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="TranslateViewController" customModule="Translate_Menu" customModuleProvider="target">
<connections>
<outlet property="view" destination="Hz6-mo-xeY" id="0bl-1N-x8E"/>
<outlet property="webView" destination="PBX-MI-nbE" id="ah7-vx-6cY"/>
<outlet property="webView" destination="1Pe-3f-qfo" id="I0r-Gt-9a6"/>
</connections>
</customObject>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
Expand All @@ -19,19 +18,15 @@
<rect key="frame" x="0.0" y="0.0" width="800" height="400"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<subviews>
<webView translatesAutoresizingMaskIntoConstraints="NO" id="PBX-MI-nbE">
<wkWebView wantsLayer="YES" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="1Pe-3f-qfo">
<rect key="frame" x="0.0" y="0.0" width="800" height="400"/>
<webPreferences key="preferences" defaultFontSize="16" defaultFixedFontSize="13" minimumFontSize="0">
<nil key="identifier"/>
</webPreferences>
</webView>
<autoresizingMask key="autoresizingMask"/>
<wkWebViewConfiguration key="configuration">
<audiovisualMediaTypes key="mediaTypesRequiringUserActionForPlayback" none="YES"/>
<wkPreferences key="preferences"/>
</wkWebViewConfiguration>
</wkWebView>
</subviews>
<constraints>
<constraint firstItem="PBX-MI-nbE" firstAttribute="top" secondItem="Hz6-mo-xeY" secondAttribute="top" id="E0p-bF-9CY"/>
<constraint firstItem="PBX-MI-nbE" firstAttribute="leading" secondItem="Hz6-mo-xeY" secondAttribute="leading" id="lIu-D4-0Iy"/>
<constraint firstAttribute="bottom" secondItem="PBX-MI-nbE" secondAttribute="bottom" id="lK7-I8-OcA"/>
<constraint firstAttribute="trailing" secondItem="PBX-MI-nbE" secondAttribute="trailing" id="q7O-QQ-ZhJ"/>
</constraints>
<point key="canvasLocation" x="139" y="154"/>
</customView>
</objects>
Expand Down

0 comments on commit ce17680

Please sign in to comment.