Changeset 575:a54baa5b89c3


Ignore:
Timestamp:
12/07/14 15:07:24 (10 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Extracted some of the common imports into a non-GUI-specific module

Location:
src/mlx
Files:
1 added
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/gui/common.py

    r554 r575  
     1
     2from mlx.common import *
    13
    24import mlx.const as _const
     
    2628appIndicator = False
    2729
    28 if os.name=="nt" or "FORCE_PYGTK" in os.environ:
     30if not pygobject:
    2931    print "Using PyGTK"
    3032    pygobject = False
     
    3234    import gtk.gdk as gdk
    3335    import gtk
    34     import gobject
    3536    import pango
     37
    3638    try:
    3739        import appindicator
     
    105107        return str(text)
    106108
    107 else:
    108     print "Using PyGObject"
    109     pygobject = True
     109else: # pygobject
    110110    from gi.repository import Gdk as gdk
    111111    from gi.repository import GdkPixbuf as gdkPixbuf
    112112    from gi.repository import Gtk as gtk
    113     from gi.repository import GObject as gobject
    114113    from gi.repository import AppIndicator3 as appindicator
    115114    from gi.repository import Pango as pango
     115
    116116    appIndicator = True
     117
    117118
    118119    MESSAGETYPE_ERROR = gtk.MessageType.ERROR
Note: See TracChangeset for help on using the changeset viewer.