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

  • Committer: Jasper Groenewegen
  • Date: 2008-07-27 12:01:40 UTC
  • mfrom: (576.3.2 improve-merge)
  • mto: This revision was merged to the branch mainline in revision 579.
  • Revision ID: colbrac@xs4all.nl-20080727120140-1agdlzkc9fumjk5f
Merge merge dialog improvements

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
from bzrlib.errors import NotBranchError, NoRepositoryPresent
28
28
from bzrlib.trace import mutter
29
29
 
30
 
from bzrlib.plugins.gtk import icon_path
 
30
from bzrlib.plugins.gtk import data_path, icon_path
31
31
 
32
32
 
33
33
def read_license():
34
 
    license_file = os.path.join(os.path.dirname(__file__), "COPYING")
35
 
    if os.path.exists(license_file):
36
 
        return file(license_file).read()
 
34
    license_paths = [data_path("COPYING"), "/usr/share/common-licenses/GPL-2"]
 
35
    for license_file in license_paths:
 
36
        if license_file is not None and os.path.exists(license_file):
 
37
            return file(license_file).read()
37
38
    # Fall back to just license name if we can't find the file
38
39
    return "GPLv2 or later"
39
40
 
41
42
def load_credits():
42
43
    import pickle
43
44
    try:
44
 
        credits = pickle.load(file("credits.pickle"))
 
45
        credits = pickle.load(file(data_path("credits.pickle")))
45
46
    except IOError:
46
47
        credits = None
47
48
    return credits