/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: Jelmer Vernooij
  • Date: 2008-07-01 21:54:21 UTC
  • mfrom: (523.3.2 trunk)
  • Revision ID: jelmer@samba.org-20080701215421-50g2c59zx9vcn7j5
Share code between context and main revision menu.

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 data_path, icon_path
 
30
from bzrlib.plugins.gtk import icon_path
31
31
 
32
32
 
33
33
def read_license():
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()
 
34
    license_file = os.path.join(os.path.dirname(__file__), "COPYING")
 
35
    if os.path.exists(license_file):
 
36
        return file(license_file).read()
38
37
    # Fall back to just license name if we can't find the file
39
38
    return "GPLv2 or later"
40
39
 
42
41
def load_credits():
43
42
    import pickle
44
43
    try:
45
 
        credits = pickle.load(file(data_path("credits.pickle")))
 
44
        credits = pickle.load(file("credits.pickle"))
46
45
    except IOError:
47
46
        credits = None
48
47
    return credits