1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00
PySolFC/pysollib/macosx/appSupport.py
brianl d82c425043 * added missing Tile.Style instance for aqua winsystem
- pruned some dead code from macosx app support


git-svn-id: file:///home/shlomif/Backup/svn-dumps/PySolFC/svnsync-repos/pysolfc/PySolFC/trunk@136 efabe8c0-fbe8-4139-b769-b5e6d273206e
2007-02-01 09:56:20 +00:00

23 lines
613 B
Python

"""
A number of function that enhance PySol on MacOSX when it used as a normal
GUI application (as opposed to an X11 application).
"""
import sys
from Tkinter import Menu, Text, TclError
def runningAsOSXApp():
""" Returns True iff running from the PySol.app bundle on OSX """
return (sys.platform == 'darwin' and 'PySol.app' in sys.argv[0])
def hideTkConsole(root):
try:
root.tk.call('console', 'hide')
except TclError:
pass
def setupApp(app):
"""
Perform setup for the OSX application bundle.
"""
if not runningAsOSXApp(): return
hideTkConsole(app.top)