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

« back to all changes in this revision

Viewing changes to www/plugins/console/__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:
29
29
from common import util
30
30
import cgi
31
31
 
32
 
def insert_scripts_styles(scripts, styles):
 
32
def insert_scripts_styles(scripts, styles, scripts_init):
33
33
    """Given 2 lists of strings: scripts and styles. These lists are lists of
34
34
    pathnames, as expected on the "scripts" and "styles" attributes of a
35
35
    Request object.
43
43
        "media/console/console.js")
44
44
    _append_if_absent(styles,
45
45
        "media/console/console.css")
 
46
    _append_if_absent(scripts_init,
 
47
        "console_init")
46
48
 
47
49
def present(req, windowpane=False):
48
50
    """Writes the HTML for this plugin into a request stream.