3089: clipboard drop broken in Mac port
svn: r12767
This commit is contained in:
33
src/Utils.py
33
src/Utils.py
@ -50,7 +50,7 @@ import gen.lib
|
|||||||
import Errors
|
import Errors
|
||||||
from QuestionDialog import WarningDialog, ErrorDialog
|
from QuestionDialog import WarningDialog, ErrorDialog
|
||||||
|
|
||||||
from const import TEMP_DIR, USER_HOME
|
from const import TEMP_DIR, USER_HOME, WINDOWS, MACOS, LINUX
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
@ -256,6 +256,37 @@ def add_menuitem(menu, msg, obj, func):
|
|||||||
item.show()
|
item.show()
|
||||||
menu.append(item)
|
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
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
@ -193,6 +193,16 @@ XMLFILE = "data.gramps"
|
|||||||
NO_SURNAME = "(%s)" % _("none")
|
NO_SURNAME = "(%s)" % _("none")
|
||||||
NO_GIVEN = "(%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
|
# Options Constants
|
||||||
|
Reference in New Issue
Block a user