Test also for mac install with uname for Darwin

This commit is contained in:
Cédric Krier committed 2008-08-19 19:04:38 +02:00
1 parent 1b7448ddcf
commit 5777bab1a5
3 files changed
+3 -3

No files matched your search

+1 -1
View File
@@ -242,7 +242,7 @@ def file_open(filename, type, parent, print_p=False):
# Try without operation, it is not supported on version < 2.5
os.startfile(os.path.normpath(filename))
return
elif os.name == 'mac':
elif os.name == 'mac' or os.uname()[0] == 'Darwin':
pid = os.fork()
if not pid:
pid = os.fork()
+1 -1
View File
@@ -191,7 +191,7 @@ class Main(object):
self.glade.get_widget(signals[signal][2]).set_active(
int(bool(CONFIG[signals[signal][1]])))
if os.name in ('nt', 'mac'):
if os.name in ('nt', 'mac') or os.uname()[0] == 'Darwin':
# Disable actions, on win32 we use os.startfile
# and on mac we use /usr/bin/open
self.glade.get_widget('actions').set_sensitive(False)
+1 -1
View File
@@ -167,7 +167,7 @@ def setlang(lang=None):
if os.name == 'nt':
lang2 = _LOCALE2WIN32.get(lang, lang)
os.environ['LANG'] = lang
elif os.name == 'mac':
elif os.name == 'mac' or os.uname()[0] == 'Darwin':
encoding = 'UTF-8'
locale.setlocale(locale.LC_ALL, str(lang2 + '.' + encoding))
except: