Skip to content

Commit 4f7d346

Browse files
author
clowwindy
committed
fix window crash
1 parent d6081a0 commit 4f7d346

File tree

4 files changed

+15
-25
lines changed

4 files changed

+15
-25
lines changed

ShadowsocksX/QRCodeWindow.xib

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6245" systemVersion="13F34" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
2+
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6250" systemVersion="14A389" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
33
<dependencies>
4-
<deployment defaultVersion="1070" identifier="macosx"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6245"/>
6-
<plugIn identifier="com.apple.WebKitIBPlugin" version="6245"/>
4+
<deployment identifier="macosx"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6250"/>
6+
<plugIn identifier="com.apple.WebKitIBPlugin" version="6250"/>
77
</dependencies>
88
<objects>
99
<customObject id="-2" userLabel="File's Owner" customClass="SWBQRCodeWindowController">
@@ -17,7 +17,7 @@
1717
<window title="QR Code" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" restorable="NO" oneShot="NO" animationBehavior="default" id="QvC-M9-y7g">
1818
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" texturedBackground="YES"/>
1919
<rect key="contentRect" x="196" y="240" width="320" height="320"/>
20-
<rect key="screenRect" x="0.0" y="0.0" width="1280" height="778"/>
20+
<rect key="screenRect" x="0.0" y="0.0" width="1280" height="777"/>
2121
<view key="contentView" id="EiT-Mj-1SZ">
2222
<rect key="frame" x="0.0" y="0.0" width="320" height="320"/>
2323
<autoresizingMask key="autoresizingMask"/>

ShadowsocksX/SWBAppDelegate.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -230,6 +230,9 @@ - (void)showHelp {
230230
}
231231

232232
- (void)showConfigWindow {
233+
if (configWindowController) {
234+
[configWindowController close];
235+
}
233236
configWindowController = [[SWBConfigWindowController alloc] initWithWindowNibName:@"ConfigWindow"];
234237
configWindowController.delegate = self;
235238
[configWindowController showWindow:self];

ShadowsocksX/en.lproj/ConfigWindow.xib

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
</customObject>
2121
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
2222
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
23-
<window title="Server Preferences" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" visibleAtLaunch="NO" animationBehavior="default" id="T6g-01-Wgb">
23+
<window title="Server Preferences" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" restorable="NO" oneShot="NO" animationBehavior="default" id="T6g-01-Wgb">
2424
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
2525
<rect key="contentRect" x="500" y="350" width="516" height="303"/>
2626
<rect key="screenRect" x="0.0" y="0.0" width="1280" height="777"/>

ShadowsocksX/zh-Hans.lproj/ConfigWindow.xib

Lines changed: 6 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2-
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="5053" systemVersion="13C64" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
2+
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="6250" systemVersion="14A389" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
33
<dependencies>
4-
<deployment defaultVersion="1070" identifier="macosx"/>
5-
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="5053"/>
4+
<deployment identifier="macosx"/>
5+
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="6250"/>
66
</dependencies>
77
<objects>
88
<customObject id="-2" userLabel="File's Owner" customClass="SWBConfigWindowController">
@@ -19,18 +19,17 @@
1919
</connections>
2020
</customObject>
2121
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
22-
<customObject id="-3" userLabel="Application"/>
23-
<window title="服务器设定" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" oneShot="NO" visibleAtLaunch="NO" animationBehavior="default" id="T6g-01-Wgb">
22+
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
23+
<window title="服务器设定" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" restorable="NO" oneShot="NO" animationBehavior="default" id="T6g-01-Wgb">
2424
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES"/>
2525
<rect key="contentRect" x="500" y="350" width="329" height="243"/>
26-
<rect key="screenRect" x="0.0" y="0.0" width="1280" height="778"/>
26+
<rect key="screenRect" x="0.0" y="0.0" width="1280" height="777"/>
2727
<view key="contentView" id="ayx-Re-7gF">
2828
<rect key="frame" x="0.0" y="0.0" width="329" height="243"/>
2929
<autoresizingMask key="autoresizingMask"/>
3030
<subviews>
3131
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="F8H-oW-FNh">
3232
<rect key="frame" x="51" y="206" width="47" height="17"/>
33-
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
3433
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="服务器:" id="Wri-dt-aMn">
3534
<font key="font" metaFont="system"/>
3635
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -39,7 +38,6 @@
3938
</textField>
4039
<matrix horizontalHuggingPriority="546" verticalHuggingPriority="629" ambiguous="YES" misplaced="YES" allowsEmptySelection="NO" autorecalculatesCellSize="YES" translatesAutoresizingMaskIntoConstraints="NO" id="cgp-41-caB">
4140
<rect key="frame" x="104" y="205" width="162" height="18"/>
42-
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
4341
<constraints>
4442
<constraint firstAttribute="width" constant="162" id="xWv-n2-o3S"/>
4543
</constraints>
@@ -70,7 +68,6 @@
7068
</matrix>
7169
<button verticalHuggingPriority="750" ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="HTJ-tt-Aqd">
7270
<rect key="frame" x="223" y="13" width="92" height="32"/>
73-
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
7471
<constraints>
7572
<constraint firstAttribute="width" constant="80" id="Bim-KQ-4KF"/>
7673
</constraints>
@@ -87,7 +84,6 @@ DQ
8784
</button>
8885
<button verticalHuggingPriority="750" ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="bnF-KP-shG">
8986
<rect key="frame" x="131" y="13" width="92" height="32"/>
90-
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
9187
<buttonCell key="cell" type="push" title="取消" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="S9c-CP-iCV">
9288
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
9389
<font key="font" size="13" name="STHeitiSC-Light"/>
@@ -101,14 +97,12 @@ Gw
10197
</button>
10298
<box autoresizesSubviews="NO" fixedFrame="YES" title="服务器设置" borderType="line" translatesAutoresizingMaskIntoConstraints="NO" id="SFP-YW-lUM">
10399
<rect key="frame" x="17" y="57" width="294" height="125"/>
104-
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
105100
<view key="contentView">
106101
<rect key="frame" x="1" y="1" width="292" height="109"/>
107102
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
108103
<subviews>
109104
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="CKe-Xh-5J5">
110105
<rect key="frame" x="26" y="80" width="43" height="17"/>
111-
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
112106
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="地址:" id="AIN-Yd-PgS">
113107
<font key="font" size="13" name="STHeitiSC-Light"/>
114108
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -117,7 +111,6 @@ Gw
117111
</textField>
118112
<textField verticalHuggingPriority="750" ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Yqv-0U-e9E">
119113
<rect key="frame" x="75" y="75" width="122" height="22"/>
120-
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
121114
<constraints>
122115
<constraint firstAttribute="width" constant="122" id="ufR-gZ-eLC"/>
123116
</constraints>
@@ -129,7 +122,6 @@ Gw
129122
</textField>
130123
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="K0h-Oa-Cle">
131124
<rect key="frame" x="203" y="80" width="9" height="17"/>
132-
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
133125
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title=":" id="5jj-NR-Vup">
134126
<font key="font" metaFont="system"/>
135127
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -138,7 +130,6 @@ Gw
138130
</textField>
139131
<textField verticalHuggingPriority="750" ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="xMg-kR-Jg1">
140132
<rect key="frame" x="217" y="75" width="46" height="22"/>
141-
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
142133
<constraints>
143134
<constraint firstAttribute="width" constant="46" id="MgD-IC-WSY"/>
144135
</constraints>
@@ -153,7 +144,6 @@ Gw
153144
</textField>
154145
<comboBox verticalHuggingPriority="750" ambiguous="YES" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="BON-H1-lGZ">
155146
<rect key="frame" x="75" y="43" width="191" height="26"/>
156-
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
157147
<constraints>
158148
<constraint firstAttribute="width" constant="188" id="KVl-2z-4lw"/>
159149
</constraints>
@@ -165,7 +155,6 @@ Gw
165155
</comboBox>
166156
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="QJ8-B9-i9a">
167157
<rect key="frame" x="26" y="49" width="43" height="17"/>
168-
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
169158
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="加密:" id="sjh-Vq-yVk">
170159
<font key="font" size="13" name="STHeitiSC-Light"/>
171160
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -174,7 +163,6 @@ Gw
174163
</textField>
175164
<textField horizontalHuggingPriority="251" verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="1N9-q9-NCn">
176165
<rect key="frame" x="26" y="20" width="43" height="17"/>
177-
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
178166
<textFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" sendsActionOnEndEditing="YES" title="密码:" id="JCW-VK-e6O">
179167
<font key="font" size="13" name="STHeitiSC-Light"/>
180168
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
@@ -183,7 +171,6 @@ Gw
183171
</textField>
184172
<secureTextField verticalHuggingPriority="750" fixedFrame="YES" translatesAutoresizingMaskIntoConstraints="NO" id="WEx-Nh-Ean">
185173
<rect key="frame" x="75" y="17" width="188" height="22"/>
186-
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
187174
<secureTextFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" sendsActionOnEndEditing="YES" borderStyle="bezel" drawsBackground="YES" usesSingleLineMode="YES" id="Tb5-0w-ubb">
188175
<font key="font" metaFont="system"/>
189176
<color key="textColor" name="textColor" catalog="System" colorSpace="catalog"/>

0 commit comments

Comments
 (0)