/b-gtk/fix-viz

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/b-gtk/fix-viz

« back to all changes in this revision

Viewing changes to olive-gtk

  • Committer: John Arbash Meinel
  • Date: 2007-04-19 21:30:38 UTC
  • mto: This revision was merged to the branch mainline in revision 195.
  • Revision ID: john@arbash-meinel.com-20070419213038-80g223n0050jmphn
Update code to properly handle loading failures.
And do more searching to find the glade and .ui files.
In 'olive-gtk' the '_' function was not defined, so it would die when
trying to report startup failures.
In 'olive/guifiles.py' it now searches around for olive.glade
rather than only looking in 2 places. Once it finds olive.glade,
it assumes that cmenu.ui will be nearby.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
                os.execvp(python, [python] + sys.argv)
38
38
            except OSError:
39
39
                pass
40
 
    print >>sys.stderr, _('bzr: error: cannot find a suitable python interpreter (need %d.%d or later)') % NEED_VERS
 
40
    print >>sys.stderr, ('bzr: error: cannot find a suitable python interpreter'
 
41
                         ' (need %d.%d or later)'
 
42
                        ) % NEED_VERS
41
43
    sys.exit(1)
42
44
 
43
45
try:
44
 
        import pygtk
45
 
        pygtk.require("2.0")
 
46
    import pygtk
 
47
    pygtk.require("2.0")
46
48
except:
47
 
        pass
 
49
    pass
 
50
 
48
51
try:
49
 
        import gtk
50
 
        import gtk.glade
 
52
    import gtk
 
53
    import gtk.glade
51
54
except:
52
 
    print >>sys.stderr, _('You need to install python-glade2 and/or pygtk2 (gtk2) or set your PYTHONPATH correctly.\ntry: export PYTHONPATH=/usr/local/lib/python2.4/site-packages/')
 
55
    print >>sys.stderr, ('You need to install python-glade2 and/or pygtk2 (gtk2)'
 
56
                         ' or set your PYTHONPATH correctly.\n'
 
57
                         'try: export PYTHONPATH=/usr/local/lib/python2.4/site-packages/'
 
58
                        )
53
59
    sys.exit(1)
54
60
 
55
61
# gettext support