3089: clipboard drop broken in Mac port

svn: r12767
This commit is contained in:
Benny Malengier 2009-07-06 17:36:36 +00:00
parent 56762c8444
commit 494311f234
2 changed files with 42 additions and 1 deletions

View File

@ -50,7 +50,7 @@ import gen.lib
import Errors
from QuestionDialog import WarningDialog, ErrorDialog
from const import TEMP_DIR, USER_HOME
from const import TEMP_DIR, USER_HOME, WINDOWS, MACOS, LINUX
import shutil
#-------------------------------------------------------------------------
@ -256,6 +256,37 @@ def add_menuitem(menu, msg, obj, func):
item.show()
menu.append(item)
#-------------------------------------------------------------------------
#
# Platform determination functions
#
#-------------------------------------------------------------------------
def lin():
"""
Return True if a linux system
Note: Normally do as linux in else statement of a check !
"""
if platform.system() in LINUX:
return True
return False
def mac():
"""
Return True if a Macintosh system
"""
if platform.system() in MACOS:
return True
return False
def win():
"""
Return True if a windows system
"""
if platform.system() in WINDOWS:
return True
return False
#-------------------------------------------------------------------------
#
#

View File

@ -193,6 +193,16 @@ XMLFILE = "data.gramps"
NO_SURNAME = "(%s)" % _("none")
NO_GIVEN = "(%s)" % _("none")
#-------------------------------------------------------------------------
#
# Platforms
# Never test on LINUX, handle Linux in the else statement as default
#
#-------------------------------------------------------------------------
LINUX = ["Linux", "linux"]
MACOS = ["Darwin", "darwin"]
WINDOWS = ["Windows", "win32"]
#-------------------------------------------------------------------------
#
# Options Constants