Skip to content

Commit

Permalink
Bug 821296 - Allow single files to be packaged as shared resources an…
Browse files Browse the repository at this point in the history
…d make applications using shared images import only the ones they require
  • Loading branch information
gabrielesvelto committed Dec 27, 2012
1 parent 71e0294 commit 1452b86
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions apps/browser/index.html
Expand Up @@ -18,7 +18,8 @@
<script type="application/javascript" defer src="shared/js/gesture_detector.js"></script>

<!-- Resources -->
<link rel="resource" type="image/png" href="shared/resources/branding/"/>
<link rel="resource" type="image/png" href="shared/resources/branding/Browser.png"/>
<link rel="resource" type="image/png" href="shared/resources/branding/about_logo.png"/>
</head>

<body class="page-screen" role="application">
Expand Down Expand Up @@ -243,4 +244,3 @@ <h2 data-l10n-id="privacy-and-security">Privacy & Security</h2>
</body>

</html>

5 changes: 3 additions & 2 deletions apps/communications/ftu/index.html
Expand Up @@ -20,7 +20,9 @@
<title>Welcome to Browser OS</title>

<!-- Localization -->
<link rel="resource" type="image/png" href="/shared/resources/branding/"/>
<link rel="resource" type="image/png" href="/shared/resources/branding/logosmall.png"/>
<link rel="resource" type="image/png" href="/shared/resources/branding/powered.png"/>
<link rel="resource" type="image/png" href="/shared/resources/branding/privacy_sprite.png"/>
<link rel="resource" type="application/l10n" href="/shared/locales/branding.ini"/>
<link rel="resource" type="application/l10n" href="/ftu/locales/locales.ini"/>
<link rel="resource" type="application/l10n" href="/shared/locales/date.ini"/>
Expand Down Expand Up @@ -488,4 +490,3 @@ <h1 data-l10n-id='offline-dialog-title'>You must be connected to the Internet to
<iframe id="fb-extensions"></iframe>
</body>
</html>

3 changes: 2 additions & 1 deletion apps/system/index.html
Expand Up @@ -33,7 +33,8 @@

<!-- Include shared resources
<link rel="resource" type="application/json" href="shared/resources/apn.json"/>
<link rel="resource" type="image/png" href="shared/resources/branding/"/>
<link rel="resource" type="image/png" href="shared/resources/branding/initlogo.png"/>
<link rel="resource" type="image/png" href="shared/resources/branding/splash_screen_generic.png"/>
-->

<!-- applications.js must not be deferred
Expand Down
4 changes: 3 additions & 1 deletion build/webapp-zip.js
Expand Up @@ -254,6 +254,9 @@ Gaia.webapps.forEach(function(webapp) {
file.append('resources');
path.split('/').forEach(function(segment) {
file.append(segment);
if (isSubjectToBranding(file.path)) {
file.append((OFFICIAL == 1) ? 'official' : 'unofficial');
}
});
if (!file.exists()) {
throw new Error('Using inexistent shared resource: ' + path +
Expand Down Expand Up @@ -281,4 +284,3 @@ Gaia.webapps.forEach(function(webapp) {

zip.close();
});

0 comments on commit 1452b86

Please sign in to comment.