~azzar1/unity/add-show-desktop-key

« back to all changes in this revision

Viewing changes to lib/conf/apps.py

  • Committer: wagrant
  • Date: 2008-08-01 09:02:59 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:971
makeuser: Clean up unused imports and a strange sys.path mangler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
enable_debuginfo = False
8
8
 
9
9
# Allow App objects
10
 
# Note: icon is a string of a file basename. The icon files are found in
 
10
# Notes:
 
11
# desc is a full description for the front page. It isn't required
 
12
# unless this app is in apps_on_home_page.
 
13
# icon is a string of a file basename. The icon files are found in
11
14
# app_icon_dir, defined below.
12
15
class App:
13
 
    def __init__(self, dir, name, icon = None, requireauth = True,
14
 
        hashelp = False):
 
16
    def __init__(self, dir, name, desc=None, icon = None,
 
17
        useconsole = False, requireauth = True, hashelp = False):
15
18
        self.dir = dir
16
19
        self.name = name
 
20
        self.desc = desc
17
21
        self.icon = icon
 
22
        self.useconsole = useconsole
18
23
        self.requireauth = requireauth
19
24
        self.hashelp = hashelp
20
25
    def __repr__(self):
21
 
        return ("App(dir=" + repr(self.dir) + ", name=" + repr(self.name) +
22
 
            ", icon=" + repr(self.icon) +
23
 
            ", requireauth=" + repr(self.requireauth) + ", hashelp="
24
 
            + repr(self.hashelp) + ")")
 
26
        return ("App(dir=%s, name=%s, desc=%s, icon=%s, requireauth=%s, "
 
27
                "hashelp=%s)" % (repr(self.dir), repr(self.name),
 
28
                repr(self.desc), repr(self.icon), repr(self.requireauth),
 
29
                repr(self.hashelp)))
25
30
 
26
31
# Directory where app icons are stored, relative to the IVLE root.
27
32
app_icon_dir = "media/images/apps"
40
45
# Application definitions
41
46
 
42
47
app_browser =   App(dir = "browser",
43
 
                    name = "File Browser",
 
48
                    name = "Files",
 
49
                    desc = "Gives you access to all of your files and lets "
 
50
                           "you download, upload, edit and run them.",
44
51
                    icon = "browser.png",
45
 
                    requireauth = True,
46
 
                    hashelp = True)
47
 
 
48
 
app_editor =   App(dir = "editor",
49
 
                    name = "Text Editor",
50
 
                    icon = "editor.png",
 
52
                    useconsole = True,
51
53
                    requireauth = True,
52
54
                    hashelp = True)
53
55
 
58
60
 
59
61
app_console =     App(dir = "console",
60
62
                    name = "Console",
 
63
                    desc = "A Python console where you can try out code "
 
64
                           "without having to save and run it.",
61
65
                    icon = "console.png",
 
66
                    useconsole = False, # We use a full console in this app
62
67
                    requireauth = True,
63
68
                    hashelp = True)
64
69
 
68
73
                    hashelp = False)
69
74
 
70
75
app_tutorial =     App(dir = "tutorial",
71
 
                    name = "Tutorial",
 
76
                    name = "Worksheets",
 
77
                    desc = "Online tutorials and exercises for lab work.",
72
78
                    icon = "tutorial.png",
 
79
                    useconsole = True,
73
80
                    requireauth = True,
74
81
                    hashelp = True)
75
82
 
90
97
 
91
98
app_help =      App(dir = "help",
92
99
                    name = "Help",
 
100
                    desc = "IVLE help pages",
93
101
                    icon = "help.png",
94
102
                    requireauth = True,
95
103
                    hashelp = False)
101
109
 
102
110
app_forum = App(dir = "forum",
103
111
                    name = "Forum",
 
112
                    desc = "Discussion boards for material relating to "
 
113
                           "Informatics, IVLE and Python.",
104
114
                    icon = "forum.png",
105
115
                    requireauth = True,
106
116
                    hashelp = False)
110
120
                    requireauth = False,
111
121
                    hashelp = False)
112
122
 
 
123
app_settings = App(dir = "settings",
 
124
                    name = "Account Settings",
 
125
                    icon = "settings.png",
 
126
                    requireauth = True,
 
127
                    hashelp = True)
 
128
 
 
129
app_groups = App(dir = "groups",
 
130
                    name = "Group Management",
 
131
                    icon = "groups.png",
 
132
                    requireauth = True,
 
133
                    hashelp = True)
 
134
 
113
135
app_userservice = App(dir = "userservice",
114
136
                    name = "User Management Service",
115
137
                    requireauth = False,
116
138
                    hashelp = False)
117
139
 
 
140
app_diff = App(dir = "diff",
 
141
                    name = "Diff",
 
142
                    #icon = "forum.png",
 
143
                    requireauth = True,
 
144
                    hashelp = False)
 
145
 
 
146
app_svnlog = App(dir = "svnlog",
 
147
                    name = "Subversion Log",
 
148
                    requireauth = True,
 
149
                    hashelp = False)
 
150
 
 
151
app_subjects = App(dir = "subjects",
 
152
                    name = "Subjects",
 
153
                    desc = "Announcements and information about the subjects "
 
154
                           "you are enrolled in.",
 
155
                    icon = "subjects.png",
 
156
                    requireauth = False,
 
157
                    hashelp = False)
 
158
 
 
159
app_home = App(dir = "home",
 
160
                    name = "Home",
 
161
                    desc = "IVLE home page",
 
162
                    icon = "home.png",
 
163
                    requireauth = True,
 
164
                    hashelp = False)
 
165
 
118
166
# Mapping URL names to apps
119
167
 
120
168
app_url = {
121
169
    "files" : app_browser,
122
 
    "edit" : app_editor,
123
170
    "fileservice" : app_fileservice,
124
171
    "console" : app_console,
125
172
    "consoleservice" : app_consoleservice,
130
177
    "help" : app_help,
131
178
    "forum" : app_forum,
132
179
    "tos" : app_tos,
 
180
    "settings" : app_settings,
 
181
    "groups" : app_groups,
133
182
    "userservice" : app_userservice,
 
183
    "diff" : app_diff,
 
184
    "svnlog" : app_svnlog,
 
185
    "subjects" : app_subjects,
 
186
    "home" : app_home,
134
187
}
135
188
if enable_debuginfo:
136
189
    app_url["debuginfo"] = app_debuginfo
139
192
# (The others are hidden unless they are linked to)
140
193
# Note: The values in this list are the URL names as seen in app_url.
141
194
 
142
 
apps_in_tabs = ["files", "edit", "console", "tutorial", "forum", "help"]
 
195
apps_in_tabs = ["files", "tutorial", "console",
 
196
                "forum", "subjects", "help"]
 
197
 
 
198
# List of apps that go in the list on the home page
 
199
apps_on_home_page = ["subjects", "files", "tutorial", "console", "forum"]