Make use of new module constfunc.
svn: r14282
This commit is contained in:
parent
ee18fd7c69
commit
99b95c547d
@ -45,7 +45,8 @@ from gen.ggettext import gettext as _
|
|||||||
import logging
|
import logging
|
||||||
LOG = logging.getLogger(".DbManager")
|
LOG = logging.getLogger(".DbManager")
|
||||||
|
|
||||||
if os.sys.platform == "win32":
|
import constfunc
|
||||||
|
if constfunc.win():
|
||||||
_RCS_FOUND = os.system("rcs -V >nul 2>nul") == 0
|
_RCS_FOUND = os.system("rcs -V >nul 2>nul") == 0
|
||||||
if _RCS_FOUND and "TZ" not in os.environ:
|
if _RCS_FOUND and "TZ" not in os.environ:
|
||||||
# RCS requires the "TZ" variable be set.
|
# RCS requires the "TZ" variable be set.
|
||||||
@ -77,6 +78,7 @@ from glade import Glade
|
|||||||
from gen.db.backup import restore
|
from gen.db.backup import restore
|
||||||
from gen.db.exceptions import DbException
|
from gen.db.exceptions import DbException
|
||||||
|
|
||||||
|
|
||||||
_RETURN = gtk.gdk.keyval_from_name("Return")
|
_RETURN = gtk.gdk.keyval_from_name("Return")
|
||||||
_KP_ENTER = gtk.gdk.keyval_from_name("KP_Enter")
|
_KP_ENTER = gtk.gdk.keyval_from_name("KP_Enter")
|
||||||
|
|
||||||
|
@ -48,6 +48,7 @@ from gen.ggettext import gettext as _
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import gen.lib
|
import gen.lib
|
||||||
import Errors
|
import Errors
|
||||||
|
import constfunc
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -255,13 +256,13 @@ def open_file_with_default_application( file_path ):
|
|||||||
ErrorDialog(_("Error Opening File"), _("File does not exist"))
|
ErrorDialog(_("Error Opening File"), _("File does not exist"))
|
||||||
return
|
return
|
||||||
|
|
||||||
if os.sys.platform == 'win32':
|
if constfunc.win():
|
||||||
try:
|
try:
|
||||||
os.startfile(norm_path)
|
os.startfile(norm_path)
|
||||||
except WindowsError, msg:
|
except WindowsError, msg:
|
||||||
ErrorDialog(_("Error Opening File"), str(msg))
|
ErrorDialog(_("Error Opening File"), str(msg))
|
||||||
else:
|
else:
|
||||||
if os.sys.platform == 'darwin':
|
if constfunc.mac():
|
||||||
utility = 'open'
|
utility = 'open'
|
||||||
else:
|
else:
|
||||||
utility = 'xdg-open'
|
utility = 'xdg-open'
|
||||||
|
Loading…
Reference in New Issue
Block a user