/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/__init__.py

  • Committer: Alexander Belchenko
  • Date: 2006-10-25 08:34:09 UTC
  • mto: (91.1.8 trunk) (66.2.10 trunk)
  • mto: This revision was merged to the branch mainline in revision 104.
  • Revision ID: bialix@ukr.net-20061025083409-8131f3c270158eed
detecting name of glade file doing in separate module (olive.gladefile)

This fix problem with gcommit (Bug 68127: glade file not found)

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
# Olive GTK UI version
39
39
__version__ = '0.11.0'
40
40
 
41
 
# Load the glade file
42
 
if sys.platform == 'win32':
43
 
    gladefile = os.path.dirname(sys.executable) + "/share/olive/olive.glade"
44
 
else:
45
 
    gladefile = "/usr/share/olive/olive.glade"
46
 
 
47
 
if not os.path.exists(gladefile):
48
 
    # Load from sources directory if not installed
49
 
    dir_ = os.path.split(os.path.dirname(__file__))[0]
50
 
    gladefile = os.path.join(dir_, "olive.glade")
51
 
    # Check again
52
 
    if not os.path.exists(gladefile):
53
 
        # Fail
54
 
        print _('Glade file cannot be found.')
55
 
        sys.exit(1)
56
 
 
57
41
from dialog import error_dialog, info_dialog
 
42
from gladefile import GLADEFILENAME
58
43
 
59
44
# import this classes only once
60
45
try:
74
59
    program. """
75
60
    
76
61
    def __init__(self):
77
 
        self.toplevel = gtk.glade.XML(gladefile, 'window_main', 'olive-gtk')
 
62
        self.toplevel = gtk.glade.XML(GLADEFILENAME, 'window_main', 'olive-gtk')
78
63
        
79
64
        self.window = self.toplevel.get_widget('window_main')
80
65