Skip to content

Commit 4578fff

Browse files
committed
Fix #130: Mac 32-bit option still enabled on NW.js >= 0.13.X
1 parent c34fdf0 commit 4578fff

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

files/settings.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,7 @@ linux_64_dir_prefix = 'node-webkit-v{}-linux-x64'
226226
type='list'
227227
button='Update'
228228
button_callback='update_nw_versions'
229+
action='refresh_export'
229230
[[[sdk_build]]]
230231
display_name='SDK build'
231232
default_value=False
@@ -255,6 +256,7 @@ linux_64_dir_prefix = 'node-webkit-v{}-linux-x64'
255256
default_value=False
256257
type='check'
257258
url='%(base_url)s%(mac_32_dir_prefix)s.zip'
259+
description='Only works on NW.js < 0.13.X'
258260
[[mac-x64]]
259261
default_value=False
260262
type='check'

main.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1242,6 +1242,19 @@ def set_kiosk_emulation_options(self, is_checked):
12421242
resizable_field = self.find_child_by_name('resizable')
12431243
resizable_field.setChecked(not is_checked)
12441244

1245+
def refresh_export(self):
1246+
versions = self.get_version_tuple()
1247+
major_ver = versions[0]
1248+
minor_ver = versions[1]
1249+
1250+
mac = self.find_child_by_name('mac-x32')
1251+
if (major_ver > 0 or minor_ver >= 13):
1252+
if mac:
1253+
mac.setEnabled(False)
1254+
else:
1255+
if mac:
1256+
mac.setEnabled(True)
1257+
12451258
def setting_changed(self, obj, setting, *args, **kwargs):
12461259
if (setting.type == 'string' or
12471260
setting.type == 'file' or

0 commit comments

Comments
 (0)