Line | |
---|
1 | import os
|
---|
2 |
|
---|
3 | #-----------------------------------------------------------------------------
|
---|
4 |
|
---|
5 | ## @package mlx.common
|
---|
6 | #
|
---|
7 | # Common definitions to be used by both the GUI and possible other parts
|
---|
8 | #
|
---|
9 | # The main purpose of this module is to import Gtk+2 or 3 and related modules
|
---|
10 | # and provide common names for them. There is a similator module in the GUI
|
---|
11 | # part (\ref mlx.gui.common), which contains the GUI-specific names. This one
|
---|
12 | # contains only what is used by other modules as well.
|
---|
13 | # The variable \c pygobject tells which version of Gtk is being used. If it is
|
---|
14 | # \c True, Gtk+ 3 is used via the PyGObject interface. Otherwise Gtk+ 2 is
|
---|
15 | # used, which is the default on Windows or when the \c FORCE_PYGTK environment
|
---|
16 | # variable is set.
|
---|
17 |
|
---|
18 | #---------------------------------------------------------------------------------------
|
---|
19 |
|
---|
20 | #MAVA_BASE_URL = os.environ.get("MAVA_BASE_URL", "http://virtualairlines.hu")
|
---|
21 | MAVA_BASE_URL = os.environ.get("MAVA_BASE_URL", "http://oldmava.mavasystems.hu")
|
---|
22 |
|
---|
23 | #-------------------------------------------------------------------------------
|
---|
24 |
|
---|
25 | # Due to CEF, PyGTK is the default
|
---|
26 | if "FORCE_PYGOBJECT" not in os.environ:
|
---|
27 | print "Using PyGTK"
|
---|
28 | pygobject = False
|
---|
29 | import gobject
|
---|
30 | else:
|
---|
31 | print "Using PyGObject"
|
---|
32 | pygobject = True
|
---|
33 |
|
---|
34 | from gi.repository import GObject as gobject
|
---|
Note:
See
TracBrowser
for help on using the repository browser.