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 22693f6a28 * added missing Tile.Style instance for aqua winsystem
- pruned some dead code from macosx app support


git-svn-id: https://pysolfc.svn.sourceforge.net/svnroot/pysolfc/PySolFC/trunk@136 39dd0a4e-7c14-0410-91b3-c4f2d318f732
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)