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
=== modified file 'lib/canonical/configure.zcml'
--- lib/canonical/configure.zcml 2010-07-22 02:41:43 +0000
+++ lib/canonical/configure.zcml 2010-07-23 12:55:25 +0000
@@ -27,17 +27,6 @@
27 <include package="lazr.uri" />27 <include package="lazr.uri" />
28 <include package="canonical.librarian" />28 <include package="canonical.librarian" />
2929
30 <interface
31 name="launchpad"
32 interface="canonical.launchpad.layers.LaunchpadLayer"
33 type="zope.publisher.interfaces.browser.IBrowserSkinType"
34 />
35
36 <!-- Set via overrides -->
37
38 <browser:defaultSkin
39 name="launchpad" />
40
41 <!-- The default Zope 3 configuration of the SimpleComponentTraverser is30 <!-- The default Zope 3 configuration of the SimpleComponentTraverser is
42 that it applies to any object that provides Interface.31 that it applies to any object that provides Interface.
43 This excludes objects that we're using just as instances of classes32 This excludes objects that we're using just as instances of classes
4433
=== modified file 'lib/canonical/launchpad/webapp/servers.py'
--- lib/canonical/launchpad/webapp/servers.py 2010-07-22 02:41:43 +0000
+++ lib/canonical/launchpad/webapp/servers.py 2010-07-23 12:55:25 +0000
@@ -568,7 +568,9 @@
568 launchpad request class.568 launchpad request class.
569 """569 """
570570
571 implements(ILaunchpadBrowserApplicationRequest, ISynchronizer)571 implements(
572 ILaunchpadBrowserApplicationRequest, ISynchronizer,
573 canonical.launchpad.layers.LaunchpadLayer)
572574
573 retry_max_count = 5 # How many times we're willing to retry575 retry_max_count = 5 # How many times we're willing to retry
574576
575577
=== modified file 'override-configure.zcml'
--- override-configure.zcml 2009-07-17 00:26:05 +0000
+++ override-configure.zcml 2010-07-23 12:55:25 +0000
@@ -5,9 +5,6 @@
5<configure xmlns="http://namespaces.zope.org/zope"5<configure xmlns="http://namespaces.zope.org/zope"
6 xmlns:browser="http://namespaces.zope.org/browser">6 xmlns:browser="http://namespaces.zope.org/browser">
77
8 <!-- Change the default skin from Rotterdam -->
9 <browser:defaultSkin name="launchpad" />
10
11 <include files="override-includes/*-configure.zcml" />8 <include files="override-includes/*-configure.zcml" />
129
13 <include file="+config-overrides.zcml" />10 <include file="+config-overrides.zcml" />