/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: Szilveszter Farkas (Phanatic)
  • Date: 2006-07-25 12:38:56 UTC
  • mto: (0.14.1 main) (93.1.1 win32.bialix)
  • mto: This revision was merged to the branch mainline in revision 83.
  • Revision ID: Szilveszter.Farkas@gmail.com-20060725123856-f7b3018de9dc669f
2006-07-25  Szilveszter Farkas <Szilveszter.Farkas@gmail.com>

    * olive-gtk: display error if python 2.4 not available (Mario Đanić)
      (Fixed: #54014)
    * olive-gtk: display error if pygtk2 (and glade) not available (Mario Đanić)
      (Fixed: #54013)

2006-07-24  Szilveszter Farkas <Szilveszter.Farkas@gmail.com>

    * olive/frontend/gtk/push.py: display number of pushed revisions

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
# along with this program; if not, write to the Free Software
17
17
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
18
18
 
 
19
import os
19
20
import sys
 
21
 
 
22
try:
 
23
    version_info = sys.version_info
 
24
except AttributeError:
 
25
    version_info = 1, 5 # 1.5 or older
 
26
 
 
27
REINVOKE = "__BZR_REINVOKE"
 
28
NEED_VERS = (2, 4)
 
29
KNOWN_PYTHONS = ('python2.4',)
 
30
 
 
31
if version_info < NEED_VERS:
 
32
    if not os.environ.has_key(REINVOKE):
 
33
        # mutating os.environ doesn't work in old Pythons
 
34
        os.putenv(REINVOKE, "1")
 
35
        for python in KNOWN_PYTHONS:
 
36
            try:
 
37
                os.execvp(python, [python] + sys.argv)
 
38
            except OSError:
 
39
                pass
 
40
    print >>sys.stderr, "bzr: error: cannot find a suitable python interpreter"
 
41
    print >>sys.stderr, " (need %d.%d or later)" % NEED_VERS
 
42
    sys.exit(1)
 
43
 
20
44
try:
21
45
        import pygtk
22
46
        pygtk.require("2.0")
24
48
        pass
25
49
try:
26
50
        import gtk
 
51
        import gtk.glade
27
52
except:
28
 
        sys.exit(1)
29
 
        
 
53
    print >>sys.stderr, "You need to install python-glade2 and/or pygtk2",
 
54
    print >>sys.stderr, "(gtk2) or set your PYTHONPATH correctly."
 
55
    print >>sys.stderr, "try: export PYTHONPATH=",
 
56
    print >>sys.stderr, "/usr/local/lib/python2.4/site-packages/"
 
57
    sys.exit(1)
 
58
 
30
59
from olive.frontend.gtk import OliveGtk
31
60
 
32
61
app = OliveGtk()