Changeset 994:e71fbf2ee978 for src/mlx/common.py
- Timestamp:
- 07/04/19 17:29:58 (5 years ago)
- Branch:
- python3
- hg-Phase:
- (<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/common.py
r955 r994 7 7 # Common definitions to be used by both the GUI and possible other parts 8 8 # 9 # The main purpose of this module is to import Gtk+2 or 3 and related modules10 # and provide common names for them. There is a similator module in the GUI11 # part (\ref mlx.gui.common), which contains the GUI-specific names. This one12 # 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 is14 # \c True, Gtk+ 3 is used via the PyGObject interface. Otherwise Gtk+ 2 is15 # used, which is the default on Windows or when the \c FORCE_PYGTK environment16 # variable is set.17 18 9 #--------------------------------------------------------------------------------------- 19 10 … … 22 13 #------------------------------------------------------------------------------- 23 14 24 if "FORCE_PYGTK" in os.environ: 25 print("Using PyGTK") 26 pygobject = False 27 import gobject 28 else: 29 print("Using PyGObject") 30 pygobject = True 31 32 from gi.repository import GObject as gobject 15 from gi.repository import GObject as gobject 33 16 34 17 #-------------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.