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

« back to all changes in this revision

Viewing changes to www/apps/browser/__init__.py

  • Committer: dcoles
  • Date: 2008-07-14 01:08:59 UTC
  • Revision ID: svn-v3-trunk0:2b9c9e99-6f39-0410-b283-7f802c844ae2:trunk:850
Console: Moved console up into dispatch. Now any application can, in theory, 
have it's own console just by adding 'useconsole = True' to the app settings.
Note: There are some cases where this may not be a good idea - ie. The full 
console app, public applications, etc. Removed the old single instances of 
console and made apps init functions use the new scripts_init section.

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
 
28
28
import os.path
29
29
import cgi
30
 
import plugins.console
31
30
 
32
31
from common import (util, studpath)
33
32
 
61
60
    ]
62
61
    req.scripts_init = [
63
62
        "browser_init",
64
 
        "console_init",
65
63
    ]
66
 
    # Let the console plugin insert its own styles and scripts
67
 
    plugins.console.insert_scripts_styles(req.scripts, req.styles)
68
64
 
69
65
    req.write_html_head_foot = True     # Have dispatch print head and foot
70
66
    # The page title should contain the name of the file being browsed
105
101
</div>
106
102
<!-- End body -->
107
103
""")
108
 
    # Console
109
 
    plugins.console.present(req, windowpane=True)
110
104
 
111
105
def presentpath(req, path, isdir):
112
106
    """