Merge lp:~james-w/launchpad/drop-default-skin into lp:launchpad

Proposed by James Westby
Status: Merged
Merged at revision: 11213
Proposed branch: lp:~james-w/launchpad/drop-default-skin
Merge into: lp:launchpad
Diff against target: 50 lines (+3/-15)
3 files modified
lib/canonical/configure.zcml (+0/-11)
lib/canonical/launchpad/webapp/servers.py (+3/-1)
override-configure.zcml (+0/-3)
To merge this branch: bzr merge lp:~james-w/launchpad/drop-default-skin
Reviewer Review Type Date Requested Status
Gary Poster (community) Approve
Review via email: mp+30763@code.launchpad.net

Commit message

Instead of defining a defaultSkin, we now have LaunchpadBrowserRequest implement LaunchpadLayer.

Description of the change

We are working on adding a new layer to Launchpad for "vostok".

For this layer we want to have a custom navigation, but use the
existing objects.

For this we will register navigations for our layer, but unless
those registrations are more specific than the default ones, they
won't necessarily get used.

Gary suggested ways to acomplish this, the first being
to have our Request subclass the Launchpad one, which may leak
things in future.

The second was to remove the default skin statement and instead
have LaunchpadBrowserRequest implement LaunchpadLayer.

There should be no behaviour change from this change.

To post a comment you must log in.
Revision history for this message
Gary Poster (gary) wrote :

Cool. Nice to remove unneeded indirection. Thank you.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/canonical/configure.zcml'
2--- lib/canonical/configure.zcml 2010-07-22 02:41:43 +0000
3+++ lib/canonical/configure.zcml 2010-07-23 12:55:25 +0000
4@@ -27,17 +27,6 @@
5 <include package="lazr.uri" />
6 <include package="canonical.librarian" />
7
8- <interface
9- name="launchpad"
10- interface="canonical.launchpad.layers.LaunchpadLayer"
11- type="zope.publisher.interfaces.browser.IBrowserSkinType"
12- />
13-
14- <!-- Set via overrides -->
15-
16- <browser:defaultSkin
17- name="launchpad" />
18-
19 <!-- The default Zope 3 configuration of the SimpleComponentTraverser is
20 that it applies to any object that provides Interface.
21 This excludes objects that we're using just as instances of classes
22
23=== modified file 'lib/canonical/launchpad/webapp/servers.py'
24--- lib/canonical/launchpad/webapp/servers.py 2010-07-22 02:41:43 +0000
25+++ lib/canonical/launchpad/webapp/servers.py 2010-07-23 12:55:25 +0000
26@@ -568,7 +568,9 @@
27 launchpad request class.
28 """
29
30- implements(ILaunchpadBrowserApplicationRequest, ISynchronizer)
31+ implements(
32+ ILaunchpadBrowserApplicationRequest, ISynchronizer,
33+ canonical.launchpad.layers.LaunchpadLayer)
34
35 retry_max_count = 5 # How many times we're willing to retry
36
37
38=== modified file 'override-configure.zcml'
39--- override-configure.zcml 2009-07-17 00:26:05 +0000
40+++ override-configure.zcml 2010-07-23 12:55:25 +0000
41@@ -5,9 +5,6 @@
42 <configure xmlns="http://namespaces.zope.org/zope"
43 xmlns:browser="http://namespaces.zope.org/browser">
44
45- <!-- Change the default skin from Rotterdam -->
46- <browser:defaultSkin name="launchpad" />
47-
48 <include files="override-includes/*-configure.zcml" />
49
50 <include file="+config-overrides.zcml" />