This file is indexed.

/usr/share/pyshared/cviewer/action/help.py is in connectomeviewer 2.1.0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
"""Actions for the help menu """
# Copyright (C) 2009-2010, Ecole Polytechnique Federale de Lausanne (EPFL) and
# University Hospital Center and University of Lausanne (UNIL-CHUV)
#
# Modified BSD License

# Enthought library imports
from pyface.action.api import Action
from traitsui.api import auto_close_message
from mayavi.preferences.api import preference_manager
from pyface.image_resource import ImageResource

# Connectome Viewer imports
from common import IMAGE_PATH

def browser_open(url, decorated = False):
    import os
    import sys
    if sys.platform == 'darwin':
            os.system('open %s &' % url)
    else:
        import webbrowser
        if webbrowser._iscommand('firefox') and \
                        preference_manager.root.open_help_in_light_browser:
            # Firefox is installed, let's use it, we know how to make it
            # chromeless.
            if decorated:
                webbrowser.open(url, autoraise=1)
            else:
                firefox = webbrowser.get('firefox')
                firefox._invoke(['-chrome', url], remote=False, autoraise=True)
        else:
            webbrowser.open(url, autoraise=1)


class Bugfix(Action):
    """ An action that pop up the bugfix GitHub page in a browser. """

    name = "Bugfixes"
    tooltip       = "Bug Fixes ..."
    description   = "Bug Fixes ..."
    image = ImageResource("bug.png", search_path=[IMAGE_PATH])

    ###########################################################################
    # 'Action' interface.
    ###########################################################################

    def perform(self, event):
        """ Performs the action. """
        browser_open(url='http://github.com/LTS5/connectomeviewer/issues', decorated = True)

class Keybindings(Action):
    """ An action that creates a temporary html file to show the key bindings.. """

    name = "Key Bindings"
    tooltip       = "Show Key Bindings in Browser"
    description   = "Key Bindings"
    image = ImageResource("keyboard.png", search_path=[IMAGE_PATH])

    ###########################################################################
    # 'Action' interface.
    ###########################################################################

    def perform(self, event):
        """ Performs the action. """
        import os.path
        browser_open(url=os.path.join(IMAGE_PATH, '..', 'keybindings', 'index.html'), decorated = True)


######################################################################
# `HelpIndex` class.
######################################################################
class HelpIndex(Action):
    """ An action that pop up the help in a browser. """

    name = "Help"
    tooltip       = "The Connectome Viewer User Guide"
    description   = "The Connectome Viewer User Guide"
    image = ImageResource("help-browser.png", search_path=[IMAGE_PATH])

    ###########################################################################
    # 'Action' interface.
    ###########################################################################

    def perform(self, event):
        """ Performs the action. """
        auto_close_message("Opening help in web browser...")
        browser_open(url='http://www.connectomeviewer.org/documentation', decorated = True)