/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: Mikkel Kamstrup Erlandsen
  • Date: 2011-09-28 07:45:39 UTC
  • mto: This revision was merged to the branch mainline in revision 740.
  • Revision ID: mikkel.kamstrup@gmail.com-20110928074539-qxl1yn1bkjel6ir0
Add X-GNOME-Autostart-Delay=30 to bzr-notify.desktop

Show diffs side-by-side

added added

removed removed

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