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

  • Committer: Jelmer Vernooij
  • Date: 2008-07-04 08:05:17 UTC
  • mto: This revision was merged to the branch mainline in revision 547.
  • Revision ID: jelmer@samba.org-20080704080517-o6othv35xmid6in6
Try harder to find license and credits files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
103
103
    bzrlib.ui.ui_factory = GtkUIFactory()
104
104
 
105
105
 
106
 
def data_path():
107
 
    return os.path.dirname(__file__)
108
 
 
109
 
 
110
 
def icon_path(*args):
111
 
    basedirs = [os.path.join(data_path()),
 
106
def data_basedirs():
 
107
    return [os.path.dirname(__file__),
112
108
             "/usr/share/bzr-gtk", 
113
109
             "/usr/local/share/bzr-gtk"]
114
 
    for basedir in basedirs:
115
 
        path = os.path.join(basedir, 'icons', *args)
 
110
 
 
111
 
 
112
def data_path(*args):
 
113
    for basedir in data_basedirs():
 
114
        path = os.path.join(basedir, *args)
116
115
        if os.path.exists(path):
117
116
            return path
118
117
    return None
119
118
 
120
119
 
 
120
def icon_path(*args):
 
121
    return data_path(os.path.join('icons', *args))
 
122
 
 
123
 
121
124
def open_display():
122
125
    pygtk = import_pygtk()
123
126
    try: