Bug 452313: add first run page for fennec, r=mfinkle

This commit is contained in:
Gavin Sharp 2008-10-02 17:33:29 -04:00
Родитель 5d8f2aea25
Коммит 9089aa4cd5
13 изменённых файлов: 216 добавлений и 4 удалений

Просмотреть файл

@ -42,6 +42,6 @@ VPATH = @srcdir@
include $(DEPTH)/config/autoconf.mk
DIRS = chrome locales app components
DIRS = chrome locales components app
include $(topsrcdir)/config/rules.mk

Просмотреть файл

@ -40,7 +40,7 @@ pref("toolkit.defaultChromeURI", "chrome://browser/content/browser.xul");
pref("general.useragent.extra.mobile", "@APP_UA_NAME@/@APP_VERSION@");
pref("browser.chromeURL", "chrome://browser/content/");
pref("browser.startup.homepage", "http://www.mozilla.org/");
pref("browser.startup.homepage", "about:firstrun");
pref("browser.ui.cursor", false);
pref("browser.ui.panning.kinetic", true);

Просмотреть файл

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd" [
<!ENTITY % firstrunDTD SYSTEM "chrome://firstrun/locale/firstrun.dtd" >
%firstrunDTD;
]>
<!-- ***** BEGIN LICENSE BLOCK *****
- Version: MPL 1.1/GPL 2.0/LGPL 2.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 (the "License"); you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is fennec code.
-
- The Initial Developer of the Original Code is
- Mozilla Corporation.
- Portions created by the Initial Developer are Copyright (C) 2008
- the Initial Developer. All Rights Reserved.
-
- Contributor(s):
- Gavin Sharp <gavin@gavinsharp.com>
-
- Alternatively, the contents of this file may be used under the terms of
- either the GNU General Public License Version 2 or later (the "GPL"), or
- the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
- in which case the provisions of the GPL or the LGPL are applicable instead
- of those above. If you wish to allow use of your version of this file only
- under the terms of either the GPL or the LGPL, and not to allow others to
- use your version of this file under the terms of the MPL, indicate your
- decision by deleting the provisions above and replace them with the notice
- and other provisions required by the LGPL or the GPL. If you do not delete
- the provisions above, a recipient may use your version of this file under
- the terms of any one of the MPL, the GPL or the LGPL.
-
- ***** END LICENSE BLOCK ***** -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>&content.title;</title>
<link rel="stylesheet" href="chrome://firstrun/content/firstrun.css" type="text/css"/>
</head>
<body>
<div id="splash"><center><img src="chrome://firstrun/content/firstrun_splash.png"/></center></div>
<img id="arrowright" src="chrome://firstrun/content/firstrun_arrow_r.png"/>
<div id="dragright">&dragRight.label;</div>
<img id="arrowleft" src="chrome://firstrun/content/firstrun_arrow_l.png"/>
<div id="dragleft">&dragLeft.label;</div>
</body>
</html>

Просмотреть файл

@ -1,5 +1,14 @@
#filter substitution
firstrun.jar:
% content firstrun %content/ contentaccessible=yes
content/firstrun_splash.png (skin/firstrun/firstrun_splash.png)
content/firstrun_arrow_r.png (skin/firstrun/firstrun_arrow_r.png)
content/firstrun_arrow_l.png (skin/firstrun/firstrun_arrow_l.png)
content/firstrun_background.jpg (skin/firstrun/firstrun_background.jpg)
content/firstrun.css (skin/firstrun/firstrun.css)
content/firstrun.xhtml (content/firstrun/firstrun.xhtml)
browser.jar:
% content browser %content/
* content/browser.xul (content/browser.xul)

Просмотреть файл

@ -0,0 +1,63 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is fennec code.
*
* The Initial Developer of the Original Code is
* Mozilla Corporation.
* Portions created by the Initial Developer are Copyright (C) 2008
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Gavin Sharp <gavin@gavinsharp.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
body {
font-family: "Nokia Sans", sans-serif;
font-size: 14pt;
font-weight: bold;
color: #858585;
margin: 0;
padding: 0;
background: url(chrome://firstrun/content/firstrun_background.jpg) repeat-x;
}
#arrowleft,
#dragleft {
float: right;
-moz-margin-end: 20px;
text-align: right;
}
#arrowright,
#dragright {
float: left;
-moz-margin-start: 20px;
}
#dragleft, #dragright {
width: 130px;
}

Двоичные данные
mobile/chrome/skin/firstrun/firstrun_arrow_l.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.7 KiB

Двоичные данные
mobile/chrome/skin/firstrun/firstrun_arrow_r.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 1.9 KiB

Двоичные данные
mobile/chrome/skin/firstrun/firstrun_background.jpg Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 43 KiB

Двоичные данные
mobile/chrome/skin/firstrun/firstrun_splash.png Normal file

Двоичный файл не отображается.

После

Ширина:  |  Высота:  |  Размер: 173 KiB

Просмотреть файл

@ -48,8 +48,9 @@ XPIDL_MODULE = browsercompsbase
#XPIDLSRCS = \
# $(NULL)
#EXTRA_PP_COMPONENTS = \
# $(NULL)
EXTRA_COMPONENTS = \
aboutFirstrun.js \
$(NULL)
DIRS = protocols \
$(NULL)

Просмотреть файл

@ -0,0 +1,74 @@
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS" basis,
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
* for the specific language governing rights and limitations under the
* License.
*
* The Original Code is About:FirstRun.
*
* The Initial Developer of the Original Code is Mozilla Foundation.
* Portions created by the Initial Developer are Copyright (C) 2008
* the Initial Developer. All Rights Reserved.
*
* Contributor(s):
* Ryan Flint <rflint@mozilla.com>
* Justin Dolske <dolske@mozilla.com>
* Gavin Sharp <gavin@gavinsharp.com>
*
* Alternatively, the contents of this file may be used under the terms of
* either the GNU General Public License Version 2 or later (the "GPL"), or
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
* in which case the provisions of the GPL or the LGPL are applicable instead
* of those above. If you wish to allow use of your version of this file only
* under the terms of either the GPL or the LGPL, and not to allow others to
* use your version of this file under the terms of the MPL, indicate your
* decision by deleting the provisions above and replace them with the notice
* and other provisions required by the GPL or the LGPL. If you do not delete
* the provisions above, a recipient may use your version of this file under
* the terms of any one of the MPL, the GPL or the LGPL.
*
* ***** END LICENSE BLOCK ***** */
const Cc = Components.classes;
const Ci = Components.interfaces;
Components.utils.import("resource://gre/modules/XPCOMUtils.jsm");
function AboutFirstRun() {}
AboutFirstRun.prototype = {
classDescription: "About FirstRun",
contractID: "@mozilla.org/network/protocol/about;1?what=firstrun",
classID: Components.ID("{077ea23e-0f22-4168-a744-8e444b560197}"),
QueryInterface: XPCOMUtils.generateQI([Ci.nsIAboutModule]),
getURIFlags: function(aURI) {
return (Ci.nsIAboutModule.ALLOW_SCRIPT |
Ci.nsIAboutModule.URI_SAFE_FOR_UNTRUSTED_CONTENT);
},
newChannel: function(aURI) {
var ios = Cc["@mozilla.org/network/io-service;1"].
getService(Ci.nsIIOService);
var secMan = Cc["@mozilla.org/scriptsecuritymanager;1"].
getService(Ci.nsIScriptSecurityManager);
var channel = ios.newChannel("chrome://firstrun/content/firstrun.xhtml",
null, null);
var principal = secMan.getCodebasePrincipal(aURI);
channel.originalURI = aURI;
channel.owner = principal;
return channel;
}
};
function NSGetModule(compMgr, fileSpec)
XPCOMUtils.generateModule([AboutFirstRun]);

Просмотреть файл

@ -0,0 +1,3 @@
<!ENTITY content.title "Welcome to Fennec">
<!ENTITY dragRight.label "drag this way for your tabs">
<!ENTITY dragLeft.label "drag this way for controls">

Просмотреть файл

@ -1,5 +1,9 @@
#filter substitution
firstrun.jar:
% locale firstrun @AB_CD@ %locale/@AB_CD@/firstrun/
locale/@AB_CD@/firstrun/firstrun.dtd (%chrome/firstrun/firstrun.dtd)
@AB_CD@.jar:
% locale browser @AB_CD@ %locale/@AB_CD@/browser/
locale/@AB_CD@/browser/browser.dtd (%chrome/browser.dtd)