Browse Source

Fixed license headers

matthew.gertner@gmail.com 13 years ago
parent
commit
4f87520bf4
77 changed files with 1559 additions and 909 deletions
  1. 38 23
      chrome/content/about.js
  2. 40 0
      chrome/content/about.xul
  3. 0 19
      chrome/content/overlays/inspector.xul
  4. 38 0
      chrome/content/overrides/contentAreaUtils.js
  5. 38 0
      chrome/content/preferences/preferences.js
  6. 39 0
      chrome/content/preferences/selectBookmark.xul
  7. 40 0
      chrome/content/unknownContentType.xul
  8. 45 28
      chrome/content/webrunner.js
  9. 41 24
      chrome/content/webrunner.xul
  10. 38 0
      client/application.ini
  11. 0 22
      client/extensions/inspector@mozilla.org/chrome.manifest
  12. BIN
      client/extensions/inspector@mozilla.org/chrome/inspector.jar
  13. 0 179
      client/extensions/inspector@mozilla.org/components/inspector-cmdline.js
  14. 0 26
      client/extensions/inspector@mozilla.org/install.rdf
  15. 0 41
      client/extensions/inspector@mozilla.org/platform/Linux/chrome/icons/default/winInspectorMain.xpm
  16. 0 25
      client/extensions/inspector@mozilla.org/platform/Linux/chrome/icons/default/winInspectorMain16.xpm
  17. BIN
      client/extensions/inspector@mozilla.org/platform/OS2/chrome/icons/default/winInspectorMain.ico
  18. BIN
      client/extensions/inspector@mozilla.org/platform/WINNT/chrome/icons/default/winInspectorMain.ico
  19. 222 190
      client/winbuild/UAC.nsh
  20. 32 0
      client/winbuild/regprot.nsi
  21. 39 25
      common/modules/WebAppProperties.jsm
  22. 2 2
      components/public/nsIApplicationIcon.idl
  23. 1 1
      components/public/nsIDesktopEnvironment.idl
  24. 2 2
      components/public/nsINativeIcon.idl
  25. 1 1
      components/public/nsINativeMenu.idl
  26. 28 0
      components/public/nsIPlatformGlue.idl
  27. 2 1
      components/src/Makefile.in
  28. 11 4
      components/src/linux/nsDesktopEnvironmentLinux.cpp
  29. 6 3
      components/src/linux/nsDesktopEnvironmentLinux.h
  30. 221 0
      components/src/linux/nsSystemTray.cpp
  31. 67 47
      components/src/linux/nsSystemTray.h
  32. 1 1
      components/src/mac/DOMEventListenerWrapper.h
  33. 0 0
      components/src/mac/Makefile.in
  34. 1 1
      components/src/mac/nsCocoaMenu.h
  35. 1 1
      components/src/mac/nsDesktopEnvironmentMac.h
  36. 1 1
      components/src/mac/nsDockTile.h
  37. 1 1
      components/src/mac/nsICNSEncoder.h
  38. 38 23
      components/src/nsCommandLineHandler.js
  39. 1 1
      components/src/nsDOMMenuBar.h
  40. 10 0
      components/src/nsPlatformGlue.js
  41. 1 1
      components/src/nsPlatformGlueSingleton.cpp
  42. 1 1
      components/src/nsPlatformGlueSingleton.h
  43. 0 0
      components/src/windows/Makefile.in
  44. 1 1
      components/src/windows/nsDesktopEnvironmentWin.cpp
  45. 1 1
      components/src/windows/nsDesktopEnvironmentWin.h
  46. 2 2
      components/src/windows/nsICOEncoder.cpp
  47. 2 2
      components/src/windows/nsICOEncoder.h
  48. 1 1
      components/src/windows/nsNativeMenu.cpp
  49. 1 1
      components/src/windows/nsNativeMenu.h
  50. 42 37
      components/src/windows/nsNotificationArea.cpp
  51. 0 0
      components/src/windows/nsOSIntegrationModule.cpp
  52. 1 1
      components/src/windows/nsSystemMenu.cpp
  53. 1 1
      components/src/windows/nsSystemMenu.h
  54. 1 1
      confvars.sh
  55. 38 0
      defaults/preferences/preferences.js
  56. 1 1
      extension/chrome/content/refractor-overlay.xul
  57. BIN
      install/profiles/facebook.webapp
  58. BIN
      install/profiles/ganalytics.webapp
  59. BIN
      install/profiles/gcalendar.webapp
  60. BIN
      install/profiles/gdocs.webapp
  61. BIN
      install/profiles/gmail.webapp
  62. BIN
      install/profiles/greader.webapp
  63. BIN
      install/profiles/groups.webapp
  64. BIN
      install/profiles/gtalk.webapp
  65. BIN
      install/profiles/twitter.webapp
  66. 0 43
      install/webrunner.iss
  67. 38 23
      newapp/chrome/content/install-advanced.js
  68. 42 0
      newapp/chrome/content/install-advanced.xul
  69. 39 26
      newapp/chrome/content/install-shortcut.js
  70. 42 0
      newapp/chrome/content/install-shortcut.xul
  71. 35 24
      newapp/modules/FaviconDownloader.jsm
  72. 36 25
      newapp/modules/ImageUtils.jsm
  73. 36 25
      newapp/modules/WebAppInstall.jsm
  74. 38 0
      newapp/modules/arch/LinuxShortcutCreator.jsm
  75. 38 0
      newapp/modules/arch/MacOSShortcutCreator.jsm
  76. 38 0
      newapp/modules/arch/WinShortcutCreator.jsm
  77. 38 0
      newapp/modules/consts.jsm

+ 38 - 23
chrome/content/about.js

@@ -1,26 +1,41 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.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 WebRunner.
- *
- * The Initial Developer of the Original Code is Mozilla Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2007
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Mark Finkle, <mark.finkle@gmail.com>, <mfinkle@mozilla.com>
- *
- * ***** END LICENSE BLOCK ***** */
+/*
+# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# ***** 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 Mozilla Prism.
+#
+# The Initial Developer of the Original Code is
+# Mark Finkle.
+#
+# Contributor(s):
+# Matthew Gertner, <matthew.gertner@gmail.com>
+# Mark Finkle, <mark.finkle@gmail.com>, <mfinkle@mozilla.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;

+ 40 - 0
chrome/content/about.xul

@@ -1,5 +1,45 @@
 <?xml version="1.0"?>
 
+<!--
+# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# ***** 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 Mozilla Prism.
+#
+# The Initial Developer of the Original Code is
+# Ben Goodger.
+# Portions created by the Initial Developer are Copyright (C) 2005
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#   Matthew Gertner <matthew.gertner@gmail.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 *****
+-->
+
 <?xml-stylesheet href="chrome://webrunner/skin/about.css" type="text/css"?>
 
 <!DOCTYPE window SYSTEM "chrome://webrunner/locale/about.dtd">

+ 0 - 19
chrome/content/overlays/inspector.xul

@@ -1,19 +0,0 @@
-<?xml version="1.0"?>
-
-<?xml-stylesheet href="chrome://webrunner/skin/webrunner.css" type="text/css"?>
-
-<!DOCTYPE overlay SYSTEM "chrome://inspector/locale/tasksOverlay.dtd" >
-
-<overlay id="overlay_inspector" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
-
-  <script type="application/x-javascript" src="chrome://inspector/content/hooks.js"/>
-
-  <commandset id="cmdset_app">
-    <command id="cmd_inspector" label="&inspectorTaskCmd.label;" oncommand="inspectDOMDocument(content.document);"/>
-  </commandset>
-
-  <menupopup id="popup_tools">
-    <menuitem id="menuitem_inspector" accesskey="&inspectorTaskCmd.accesskey.ff;" command="cmd_inspector" insertafter="menuitem_console"/>
-  </menupopup>
-
-</overlay>

+ 38 - 0
chrome/content/overrides/contentAreaUtils.js

@@ -1,4 +1,42 @@
 #filter substitution
+/*
+# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# ***** 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 Mozilla Prism.
+#
+# The Initial Developer of the Original Code is
+# Mark Finkle.
+#
+# Contributor(s):
+# Matthew Gertner, <matthew.gertner@gmail.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 *****
+*/
+
 #includesubst @TOPSRCDIR@/toolkit/content/contentAreaUtils.js
 
 function openURL(aURL)

+ 38 - 0
chrome/content/preferences/preferences.js

@@ -1,3 +1,41 @@
+/*
+# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# ***** 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 Mozilla Prism.
+#
+# The Initial Developer of the Original Code is
+# Mark Finkle.
+#
+# Contributor(s):
+# Matthew Gertner, <matthew.gertner@gmail.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;
 

+ 39 - 0
chrome/content/preferences/selectBookmark.xul

@@ -1,5 +1,44 @@
 <?xml version="1.0"?>
 
+<!--
+# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# ***** 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 the Firefox Preferences System.
+#
+# The Initial Developer of the Original Code is
+# Ben Goodger.
+# Portions created by the Initial Developer are Copyright (C) 2005
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#
+# 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 *****
+-->
+
 <?xml-stylesheet href="chrome://browser/content/places/places.css"?>
 
 <?xml-stylesheet href="chrome://global/skin/"?>

+ 40 - 0
chrome/content/unknownContentType.xul

@@ -1,5 +1,45 @@
 <?xml version="1.0"?>
 
+<!--
+# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# ***** 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 Mozilla Prism
+#
+# The Initial Developer of the Original Code is
+# Ben Goodger.
+# Portions created by the Initial Developer are Copyright (C) 2005
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#   Matthew Gertner <matthew.gertner@gmail.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 *****
+-->
+
 <overlay id="overlay_unknownContentType" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
 
 <groupBox id="normalBox">

+ 45 - 28
chrome/content/webrunner.js

@@ -1,31 +1,44 @@
 #filter substitution
-
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.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 WebRunner.
- *
- * The Initial Developer of the Original Code is Mozilla Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2007
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Mark Finkle, <mark.finkle@gmail.com>, <mfinkle@mozilla.com>
- *   Wladimir Palant <trev@adblockplus.org>
- *   Sylvain Pasche <sylvain.pasche@gmail.com>
- *   Matthew Gertner <matthew.gertner@gmail.com>
- *
- * ***** END LICENSE BLOCK ***** */
+/*
+# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# ***** 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 Mozilla Prism.
+#
+# The Initial Developer of the Original Code is
+# Mark Finkle.
+#
+# Contributor(s):
+# Matthew Gertner, <matthew.gertner@gmail.com>
+# Mark Finkle, <mark.finkle@gmail.com>, <mfinkle@mozilla.com>
+# Wladimir Palant <trev@adblockplus.org>
+# Sylvain Pasche <sylvain.pasche@gmail.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;
@@ -778,10 +791,14 @@ var WebRunner = {
   },
 
   shutdownQuery : function() {
+    var platform = Cc["@mozilla.org/platform-web-api;1"].createInstance(Ci.nsIPlatformGlue);
+    if (!platform.invokeShutdownCallback())
+      return false;
+
     if (WebAppProperties.script.shutdown && !WebAppProperties.script.shutdown()) {
       return false;
     }
-
+    
     this._saveSettings();
 
     return true;

+ 41 - 24
chrome/content/webrunner.xul

@@ -1,29 +1,46 @@
 <?xml version="1.0"?>
 
-<!-- ***** BEGIN LICENSE BLOCK *****
-   - Version: MPL 1.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 WebRunner.
-   -
-   - The Initial Developer of the Original Code is Mozilla Corporation
-   - Portions created by the Initial Developer are Copyright (C) 2007
-   - the Initial Developer. All Rights Reserved.
-   -
-   - Contributor(s):
-   -    Mark Finkle, <mark.finkle@gmail.com>, <mfinkle@mozilla.com>
-   -    Wladimir Palant <trev@adblockplus.org>
-   -
-   - ***** END LICENSE BLOCK ***** -->
+<!--
+# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# ***** 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 Mozilla Prism
+#
+# The Initial Developer of the Original Code is
+# Ben Goodger.
+# Portions created by the Initial Developer are Copyright (C) 2005
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#   Matthew Gertner <matthew.gertner@gmail.com>
+#   Mark Finkle, <mark.finkle@gmail.com>, <mfinkle@mozilla.com>
+#   Wladimir Palant <trev@adblockplus.org>
+#
+# 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 *****
+-->
 
 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
 <?xml-stylesheet href="chrome://webrunner/skin/" type="text/css"?>

+ 38 - 0
client/application.ini

@@ -1,3 +1,41 @@
+; ***** 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 Mozilla Prism.
+;
+; The Initial Developer of the Original Code is
+; Mark Finkle, <mark.finkle@gmail.com>, <mfinkle@mozilla.com>
+;
+; Portions created by the Initial Developer are Copyright (C) 2006
+; the Mozilla Foundation <http://www.mozilla.org/>. All Rights Reserved.
+;
+; Contributor(s):
+; Matthew Gertner, <matthew.gertner@gmail.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 *****
+
 #filter substitution
 [App]
 Name=@APP_NAME@

+ 0 - 22
client/extensions/inspector@mozilla.org/chrome.manifest

@@ -1,22 +0,0 @@
-locale inspector en-US jar:chrome/inspector.jar!/locale/en-US/inspector/
-locale inspector pl jar:chrome/inspector.jar!/locale/pl/inspector/
-locale inspector fr jar:chrome/inspector.jar!/locale/fr/inspector/
-locale inspector nb-NO jar:chrome/inspector.jar!/locale/nb-NO/inspector/
-locale inspector ru jar:chrome/inspector.jar!/locale/ru/inspector/
-overlay chrome://inspector/content/inspector.xul chrome://browser/content/baseMenuOverlay.xul application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
-overlay chrome://inspector/content/commandOverlay.xul chrome://inspector/content/viewers/styleRules/commandOverlay.xul
-overlay chrome://inspector/content/popupOverlay.xul chrome://inspector/content/viewers/dom/popupOverlay.xul
-overlay chrome://inspector/content/inspector.xul chrome://communicator/content/utilityOverlay.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
-overlay chrome://inspector/content/commandOverlay.xul chrome://inspector/content/viewers/dom/commandOverlay.xul
-overlay chrome://inspector/content/keysetOverlay.xul chrome://inspector/content/viewers/dom/keysetOverlay.xul
-overlay chrome://communicator/content/pref/preftree.xul chrome://inspector/content/prefs/prefsOverlay.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
-overlay chrome://browser/content/browser.xul chrome://inspector/content/tasksOverlay-ff.xul application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
-content inspector jar:chrome/inspector.jar!/content/inspector/ xpcnativewrappers=no
-overlay chrome://inspector/content/inspector.xul chrome://communicator/content/tasksOverlay.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
-overlay chrome://inspector/content/popupOverlay.xul chrome://inspector/content/viewers/styleRules/popupOverlay.xul
-skin inspector classic/1.0 jar:chrome/inspector.jar!/skin/classic/inspector/
-overlay chrome://browser/content/macBrowserOverlay.xul chrome://inspector/content/tasksOverlay-ff.xul application={ec8030f7-c20a-464f-9b0e-13a3a9e97384}
-skin inspector modern/1.0 jar:chrome/inspector.jar!/skin/modern/inspector/
-overlay chrome://calendar/content/calendar.xul chrome://inspector/content/tasksOverlay-sb.xul application={718e30fb-e89b-41dd-9da7-e25a45638b28}
-overlay chrome://communicator/content/tasksOverlay.xul chrome://inspector/content/tasksOverlay.xul application={92650c4d-4b8e-4d2a-b7eb-24ecf4f6b63a}
-overlay chrome://messenger/content/mailWindowOverlay.xul chrome://inspector/content/tasksOverlay-tb.xul application={3550f703-e582-4d05-9a08-453d09bdfdc6}

BIN
client/extensions/inspector@mozilla.org/chrome/inspector.jar


+ 0 - 179
client/extensions/inspector@mozilla.org/components/inspector-cmdline.js

@@ -1,179 +0,0 @@
-/* ***** 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 DOM Inspector.
- *
- * The Initial Developer of the Original Code is
- * Christopher A. Aillon <christopher@aillon.com>.
- * Portions created by the Initial Developer are Copyright (C) 2003
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Christopher A. Aillon <christopher@aillon.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 ***** */
-
-// NOTE: this file implements both the seamonkey nsICmdLineHandler and
-// the toolkit nsICommandLineHandler, using runtime detection.
-
-const INSPECTOR_CMDLINE_CONTRACTID = "@mozilla.org/commandlinehandler/general-startup;1?type=inspector";
-const INSPECTOR_CMDLINE_CLSID      = Components.ID('{38293526-6b13-4d4f-a075-71939435b408}');
-const CATMAN_CONTRACTID            = "@mozilla.org/categorymanager;1";
-const nsISupports                  = Components.interfaces.nsISupports;
-
-const nsICategoryManager           = Components.interfaces.nsICategoryManager;
-const nsICmdLineHandler            = Components.interfaces.nsICmdLineHandler;
-const nsICommandLine               = Components.interfaces.nsICommandLine;
-const nsICommandLineHandler        = Components.interfaces.nsICommandLineHandler;
-const nsIComponentRegistrar        = Components.interfaces.nsIComponentRegistrar;
-const nsISupportsString            = Components.interfaces.nsISupportsString;
-const nsIWindowWatcher             = Components.interfaces.nsIWindowWatcher;
-
-function InspectorCmdLineHandler() {}
-InspectorCmdLineHandler.prototype =
-{
-  /* nsISupports */
-  QueryInterface : function handler_QI(iid) {
-    if (iid.equals(nsISupports))
-      return this;
-
-    if (nsICmdLineHandler && iid.equals(nsICmdLineHandler))
-      return this;
-
-    if (nsICommandLineHandler && iid.equals(nsICommandLineHandler))
-      return this;
-
-    throw Components.results.NS_ERROR_NO_INTERFACE;
-  },
-
-  /* nsICmdLineHandler */
-  commandLineArgument : "-inspector",
-  prefNameForStartup : "general.startup.inspector",
-  chromeUrlForTask : "chrome://inspector/content/inspector.xul",
-  helpText : "Start with the DOM Inspector.",
-  handlesArgs : true,
-  defaultArgs : "",
-  openWindowWithArgs : true,
-
-  /* nsICommandLineHandler */
-  handle : function handler_handle(cmdLine) {
-    var args = Components.classes["@mozilla.org/supports-string;1"]
-                         .createInstance(nsISupportsString);
-    try {
-      var uristr = cmdLine.handleFlagWithParam("inspector", false);
-      if (uristr == null)
-        return;
-      try {
-        args.data = cmdLine.resolveURI(uristr).spec;
-      }
-      catch (e) {
-        return;
-      }
-    }
-    catch (e) {
-      cmdLine.handleFlag("inspector", true);
-    }
-
-    var wwatch = Components.classes["@mozilla.org/embedcomp/window-watcher;1"]
-                           .getService(nsIWindowWatcher);
-    wwatch.openWindow(null, "chrome://inspector/content/", "_blank",
-                      "chrome,dialog=no,all", args);
-    cmdLine.preventDefault = true;
-  },
-
-  helpInfo : "  -inspector <url>     Open the DOM inspector.\n"
-};
-
-
-var InspectorCmdLineFactory =
-{
-  createInstance : function(outer, iid)
-  {
-    if (outer != null) {
-      throw Components.results.NS_ERROR_NO_AGGREGATION;
-    }
-
-    return new InspectorCmdLineHandler().QueryInterface(iid);
-  }
-};
-
-
-var InspectorCmdLineModule =
-{
-  registerSelf : function(compMgr, fileSpec, location, type)
-  {
-    compMgr = compMgr.QueryInterface(nsIComponentRegistrar);
-
-    compMgr.registerFactoryLocation(INSPECTOR_CMDLINE_CLSID,
-                                    "DOM Inspector CommandLine Service",
-                                    INSPECTOR_CMDLINE_CONTRACTID,
-                                    fileSpec,
-                                    location,
-                                    type);
-
-    var catman = Components.classes[CATMAN_CONTRACTID].getService(nsICategoryManager);
-    catman.addCategoryEntry("command-line-argument-handlers",
-                            "inspector command line handler",
-                            INSPECTOR_CMDLINE_CONTRACTID, true, true);
-    catman.addCategoryEntry("command-line-handler",
-                            "m-inspector",
-                            INSPECTOR_CMDLINE_CONTRACTID, true, true);
-  },
-
-  unregisterSelf : function(compMgr, fileSpec, location)
-  {
-    compMgr = compMgr.QueryInterface(nsIComponentRegistrar);
-
-    compMgr.unregisterFactoryLocation(INSPECTOR_CMDLINE_CLSID, fileSpec);
-    catman = Components.classes[CATMAN_CONTRACTID].getService(nsICategoryManager);
-    catman.deleteCategoryEntry("command-line-argument-handlers",
-                               "inspector command line handler", true);
-    catman.deleteCategoryEntry("command-line-handler",
-                               "m-inspector", true);
-  },
-
-  getClassObject : function(compMgr, cid, iid)
-  {
-    if (cid.equals(INSPECTOR_CMDLINE_CLSID)) {
-      return InspectorCmdLineFactory;
-    }
-
-    if (!iid.equals(Components.interfaces.nsIFactory)) {
-      throw Components.results.NS_ERROR_NOT_IMPLEMENTED;
-    }
-
-    throw Components.results.NS_ERROR_NO_INTERFACE;
-  },
-
-  canUnload : function(compMgr)
-  {
-    return true;
-  }
-};
-
-
-function NSGetModule(compMgr, fileSpec) {
-  return InspectorCmdLineModule;
-}

+ 0 - 26
client/extensions/inspector@mozilla.org/install.rdf

@@ -1,26 +0,0 @@
-<?xml version="1.0"?>
-
-<RDF xmlns="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
-     xmlns:em="http://www.mozilla.org/2004/em-rdf#">
-  <Description about="urn:mozilla:install-manifest">
-    <em:id>inspector@mozilla.org</em:id>
-    <em:version>1.9a9pre</em:version>
-
-    <em:targetApplication>
-      <!-- Prism -->
-      <Description>
-        <em:id>prism@developer.mozilla.org</em:id>
-        <em:minVersion>0.4</em:minVersion>
-        <em:maxVersion>1.0.0.*</em:maxVersion>
-      </Description>
-    </em:targetApplication>
-
-    <em:appManaged>true</em:appManaged>
-
-    <!-- front-end metadata -->
-    <em:name>DOM Inspector</em:name>
-    <em:description>Inspects the structure and properties of a window and its contents.</em:description>
-    <em:creator>mozilla.org</em:creator>
-    <em:homepageURL>http://www.mozilla.org/projects/inspector/</em:homepageURL>
-  </Description>
-</RDF>

+ 0 - 41
client/extensions/inspector@mozilla.org/platform/Linux/chrome/icons/default/winInspectorMain.xpm

@@ -1,41 +0,0 @@
-/* XPM */
-static char * winInspectorMain_xpm[] = {
-"32 32 6 1",
-" 	c None",
-".	c #000000",
-"+	c #FFB300",
-"@	c #FF7500",
-"#	c #FF8C00",
-"$	c #FF0000",
-"................................",
-"................................",
-"..++++++++++++++++++++++++++++..",
-"..++++++++++++++++++++++++++++..",
-"..++++++++++........++++++++++..",
-"..++++++++++........++++++++++..",
-"..++++++....@@@@@@@@....++++++..",
-"..++++++....@@@@@@@@....++++++..",
-"..++++++..@@@@@@@@@@@@..++++++..",
-"..++++++..@@@@@@@@@@@@..++++++..",
-"..++++..@@@@@@@@@@@@@@@@..++++..",
-"..++++..@@@@@@@@@@@@@@@@..++++..",
-"..++++..@@@@@@@@@@@@@@@@..++++..",
-"..++++..@@@@@@@@@@@@@@@@..++++..",
-"..++++..@@@@@@@@@@@@##@@..++++..",
-"..++++..@@@@@@@@@@@@##@@..++++..",
-"..++++..@@@@@@@@@@@@##@@..++++..",
-"..++++..@@@@@@@@@@@@##@@..++++..",
-"..++++++..@@@@@@####$$..++++++..",
-"..++++++..@@@@@@####$$..++++++..",
-"..++++++....@@@@@@@@......++++..",
-"..++++++....@@@@@@@@......++++..",
-"..++++++++++........++......++..",
-"..++++++++++........++......++..",
-"..++++++++++++++++++++++........",
-"..++++++++++++++++++++++........",
-"..++++++++++++++++++++++++......",
-"..++++++++++++++++++++++++......",
-"..++++++++++++++++++++++++++....",
-"..++++++++++++++++++++++++++....",
-"................................",
-"................................"};

+ 0 - 25
client/extensions/inspector@mozilla.org/platform/Linux/chrome/icons/default/winInspectorMain16.xpm

@@ -1,25 +0,0 @@
-/* XPM */
-static char * winInspectorMain16_xpm[] = {
-"16 16 6 1",
-" 	c None",
-".	c #000000",
-"+	c #FFAD00",
-"@	c #FF6D00",
-"#	c #FF8500",
-"$	c #FF0000",
-"................",
-".++++++++++++++.",
-".+++++....+++++.",
-".+++..@@@@..+++.",
-".+++.@@@@@@.+++.",
-".++.@@@@@@@@.++.",
-".++.@@@@@@@@.++.",
-".++.@@@@@@#@.++.",
-".++.@@@@@@#@.++.",
-".+++.@@@##$.+++.",
-".+++..@@@@...++.",
-".+++++....+...+.",
-".+++++++++++....",
-".++++++++++++...",
-".+++++++++++++..",
-"................"};

BIN
client/extensions/inspector@mozilla.org/platform/OS2/chrome/icons/default/winInspectorMain.ico


BIN
client/extensions/inspector@mozilla.org/platform/WINNT/chrome/icons/default/winInspectorMain.ico


+ 222 - 190
client/winbuild/UAC.nsh

@@ -1,191 +1,223 @@
-/*
-=======================
-UAC helper include file
-.......................
-
-Macros starting with UAC.I should only be called from the installer and vice versa for UAC.U macros.
-
-*/
-!ifndef UAC_HDR__INC
-!define UAC_HDR__INC
-!include LogicLib.nsh
-
-!define UAC.RunElevatedAndProcessMessages 'UAC::RunElevated '
-!define UAC.Unload 'UAC::Unload '
-!define UAC.StackPush 'UAC::StackPush '
-
-/*!macro _UAC.BuildOnInitElevationFunc _funcprefix
-Function ${_funcprefix}onInit
-!ifmacrodef
-FunctionEnd
-!macroend*/
-
-!macro _UAC.GenerateSimpleFunction _funcprefix _funcName _funcCode
-Function ${_funcprefix}${_funcName}
-${_funcCode}
-#messagebox mb_ok "${_funcprefix}${_funcName}"
-FunctionEnd
-!macroend
-
-!macro _UAC.TryDef _d _v
-!ifndef ${_d}
-!define ${_d} "${_v}"
-!endif
-!macroend
-
-!macro _UAC.InitStrings _modeprefix
-!insertmacro _UAC.TryDef UACSTR.UnDataFile "UAC.dat"
-!insertmacro _UAC.TryDef UACSTR.${_modeprefix}ElvWinErr "Unable to elevate , error $0"
-!ifNdef __UNINSTALL__
-	!insertmacro _UAC.TryDef UACSTR.${_modeprefix}ElvAbortReqAdmin "This installer requires admin access, aborting!"
-	!insertmacro _UAC.TryDef UACSTR.${_modeprefix}ElvMustTryAgain "This installer requires admin access, try again"
-	!else
-	!insertmacro _UAC.TryDef UACSTR.${_modeprefix}ElvAbortReqAdmin "This uninstaller requires admin access, aborting!"
-	!insertmacro _UAC.TryDef UACSTR.${_modeprefix}ElvMustTryAgain "This uninstaller requires admin access, try again"
-	!endif
-!macroend
-
-!ifmacroNdef _UAC.GenerateUninstallerTango
-!macro _UAC.GenerateUninstallerTango UninstallerFileName
-!ifdef __GLOBAL__
-	!error "UAC: Needs to be called inside a function"
-	!endif
-!ifNdef __UNINSTALL__
-	!error "UAC: _UAC.GenerateUninstallerTango should only be called by uninstaller, see http://forums.winamp.com/showthread.php?threadid=280330"
-	!endif
-!ifNdef UAC_UNINSTALLERTANGOFORALLPLATFORMS
-	!include WinVer.nsh
-	!endif
-!insertmacro _UAC.InitStrings 'U.'
-ReadIniStr $0 "$ExeDir\${UACSTR.UnDataFile}" UAC "Un.Ready"
-${IF} $0 != 1
-!ifNdef UAC_UNINSTALLERTANGOFORALLPLATFORMS
-${AndIf} ${AtLeastWinVista}
-!endif
-	InitPluginsDir
-	WriteIniStr "$PluginsDir\${UACSTR.UnDataFile}" UAC "Un.Ready" 1
-	CopyFiles /SILENT "$EXEPATH" "$PluginsDir\${UninstallerFileName}"
-	StrCpy $0 ""
-	${IfThen} ${Silent} ${|} StrCpy $0 "/S " ${|}
-	ExecWait '"$PluginsDir\${UninstallerFileName}" $0/NCRC _?=$INSTDIR' $0
-	SetErrorLevel $0
-	Quit
-	${EndIf}
-!macroend
-!endif
-
-!ifmacroNdef _UAC.GenerateOnInitElevationCode
-!macro _UAC.GenerateOnInitElevationCode _modeprefix
-!ifndef __FUNCTION__
-	!error "UAC: Needs to be called inside a function"
-	!endif
-!insertmacro _UAC.InitStrings ${_modeprefix}
-!define _UAC.GOIECUniq L${__LINE__}
-UAC_Elevate_${_UAC.GOIECUniq}:
-UAC::RunElevated 
-StrCmp 1223 $0 UAC_ElevationAborted_${_UAC.GOIECUniq} ; UAC dialog aborted by user?
-StrCmp 0 $0 0 UAC_Err_${_UAC.GOIECUniq} ; Error?
-StrCmp 1 $1 0 UAC_Success_${_UAC.GOIECUniq} ;Are we the real deal or just the wrapper?
-Quit
-UAC_Err_${_UAC.GOIECUniq}:
-MessageBox mb_iconstop "${UACSTR.${_modeprefix}ElvWinErr}"
-Abort
-UAC_ElevationAborted_${_UAC.GOIECUniq}:
-MessageBox mb_iconstop "${UACSTR.${_modeprefix}ElvAbortReqAdmin}"
-Abort
-UAC_Success_${_UAC.GOIECUniq}:
-# if $0==0 && $3==1, we are a member of the admin group (Any OS)
-# if $0==0 && $1==0, UAC not supported (Probably <NT6), run as normal?
-# if $0==0 && $1==3, we can try to elevate again
-StrCmp 1 $3 /*+4*/ UAC_Done_${_UAC.GOIECUniq} ;Admin?
-StrCmp 3 $1 0 UAC_ElevationAborted_${_UAC.GOIECUniq} ;Try again or abort?
-MessageBox mb_iconexclamation "${UACSTR.${_modeprefix}ElvMustTryAgain}" ;Inform user...
-goto UAC_Elevate_${_UAC.GOIECUniq} ;...lets try again
-UAC_Done_${_UAC.GOIECUniq}:
-!undef _UAC.GOIECUniq
-!macroend
-!endif
-
-!define UAC.I.Elevate.AdminOnly '!insertmacro UAC.I.Elevate.AdminOnly '
-!macro UAC.I.Elevate.AdminOnly
-!insertmacro _UAC.GenerateOnInitElevationCode 'I.'
-!macroend
-
-!define UAC.U.Elevate.AdminOnly '!insertmacro UAC.U.Elevate.AdminOnly '
-!macro UAC.U.Elevate.AdminOnly _UninstallerName
-!ifNdef UAC_DISABLEUNINSTALLERTANGO
-	!insertmacro _UAC.GenerateUninstallerTango "${_UninstallerName}"
-	!endif
-!insertmacro _UAC.GenerateOnInitElevationCode 'U.'
-!macroend
-
-!define UAC.AutoCodeUnload '!insertmacro UAC.AutoCodeUnload '
-!macro UAC.AutoCodeUnload _HasUninstaller
-!insertmacro _UAC.GenerateSimpleFunction "" .OnInstFailed '${UAC.Unload}'
-!insertmacro _UAC.GenerateSimpleFunction "" .OnInstSuccess '${UAC.Unload}'
-!ifNdef MUI_INCLUDED
-	!insertmacro _UAC.GenerateSimpleFunction "" .onUserAbort '${UAC.Unload}'
-	!else
-	!ifNdef MUI_CUSTOMFUNCTION_ABORT
-		!error "UAC: must call $$ {UAC.Unload} in MUI_CUSTOMFUNCTION_ABORT!"
-		!endif
-	!endif
-!if "${_HasUninstaller}" != ""
-	!insertmacro _UAC.GenerateSimpleFunction "un" .onUninstFailed '${UAC.Unload}'
-	!insertmacro _UAC.GenerateSimpleFunction "un" .onUninstSuccess '${UAC.Unload}'
-	!ifNdef MUI_INCLUDED
-		!insertmacro _UAC.GenerateSimpleFunction "un" .onUserAbort '${UAC.Unload}'
-		!else
-		!ifNdef MUI_CUSTOMFUNCTION_ABORT
-			!error "UAC: must call $$ {UAC.Unload} in MUI_CUSTOMFUNCTION_(UN)ABORT!"
-			!endif
-		!endif
-	!endif
-!macroend
-
-!define UAC.FastCallFunctionAsUser '!insertmacro UAC.FastCallFunctionAsUser '
-!macro UAC.FastCallFunctionAsUser _func _var
-GetFunctionAddress ${_var} ${_func}
-UAC::ExecCodeSegment ${_var}
-!macroend
-!define UAC.CallFunctionAsUser '!insertmacro UAC.CallFunctionAsUser '
-!macro UAC.CallFunctionAsUser _func
-push $R9
-!insertmacro UAC.FastCallFunctionAsUser ${_func} $R9
-pop $R9
-!macroend
-
-!define UAC.FastCallGetOuterInstanceHwndParent UAC::GetOuterHwnd
-!define UAC.GetOuterInstanceHwndParent '!insertmacro UAC.GetOuterInstanceHwndParent '
-!macro UAC.GetOuterInstanceHwndParent _var
-push $0
-${UAC.FastCallGetOuterInstanceHwndParent}
-Exch $0
-Pop ${_var}
-!macroend
-
-
-
-!macro _UAC.DumpEx _disp _f _fp _v
-${_f} ${_fp}
-DetailPrint "${_disp}=${_v}"
-!macroend
-!macro _UAC.Dump _f _fp _v
-!insertmacro _UAC.DumpEx `${_f}` `${_f}` `${_fp}` `${_v}`
-!macroend
-!macro _UAC.DbgDetailPrint
-push $0
-push $1
-System::Call /NoUnload "advapi32::GetUserName(t.r0,*i${NSIS_MAX_STRLEN})"
-System::Call "Kernel32::GetComputerName(t.r1,*i${NSIS_MAX_STRLEN})"
-DetailPrint "$1\$0"
-;!insertmacro _UAC.DumpEx "User" System::Call "advapi32::GetUserName(t.r0,*i${NSIS_MAX_STRLEN})" $0
-!insertmacro _UAC.DumpEx "CmdLine" "" "" "$CmdLine"
-!insertmacro _UAC.Dump UAC::IsAdmin "" $0
-!insertmacro _UAC.Dump UAC::SupportsUAC "" $0
-!insertmacro _UAC.Dump UAC::GetElevationType "" $0
-pop $1
-pop $0
-!macroend
-
+; ***** 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 Mozilla Prism.
+;
+; Contributor(s):
+; Matthew Gertner, <matthew.gertner@gmail.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 *****
+
+/*
+=======================
+UAC helper include file
+.......................
+
+Macros starting with UAC.I should only be called from the installer and vice versa for UAC.U macros.
+
+*/
+!ifndef UAC_HDR__INC
+!define UAC_HDR__INC
+!include LogicLib.nsh
+
+!define UAC.RunElevatedAndProcessMessages 'UAC::RunElevated '
+!define UAC.Unload 'UAC::Unload '
+!define UAC.StackPush 'UAC::StackPush '
+
+/*!macro _UAC.BuildOnInitElevationFunc _funcprefix
+Function ${_funcprefix}onInit
+!ifmacrodef
+FunctionEnd
+!macroend*/
+
+!macro _UAC.GenerateSimpleFunction _funcprefix _funcName _funcCode
+Function ${_funcprefix}${_funcName}
+${_funcCode}
+#messagebox mb_ok "${_funcprefix}${_funcName}"
+FunctionEnd
+!macroend
+
+!macro _UAC.TryDef _d _v
+!ifndef ${_d}
+!define ${_d} "${_v}"
+!endif
+!macroend
+
+!macro _UAC.InitStrings _modeprefix
+!insertmacro _UAC.TryDef UACSTR.UnDataFile "UAC.dat"
+!insertmacro _UAC.TryDef UACSTR.${_modeprefix}ElvWinErr "Unable to elevate , error $0"
+!ifNdef __UNINSTALL__
+	!insertmacro _UAC.TryDef UACSTR.${_modeprefix}ElvAbortReqAdmin "This installer requires admin access, aborting!"
+	!insertmacro _UAC.TryDef UACSTR.${_modeprefix}ElvMustTryAgain "This installer requires admin access, try again"
+	!else
+	!insertmacro _UAC.TryDef UACSTR.${_modeprefix}ElvAbortReqAdmin "This uninstaller requires admin access, aborting!"
+	!insertmacro _UAC.TryDef UACSTR.${_modeprefix}ElvMustTryAgain "This uninstaller requires admin access, try again"
+	!endif
+!macroend
+
+!ifmacroNdef _UAC.GenerateUninstallerTango
+!macro _UAC.GenerateUninstallerTango UninstallerFileName
+!ifdef __GLOBAL__
+	!error "UAC: Needs to be called inside a function"
+	!endif
+!ifNdef __UNINSTALL__
+	!error "UAC: _UAC.GenerateUninstallerTango should only be called by uninstaller, see http://forums.winamp.com/showthread.php?threadid=280330"
+	!endif
+!ifNdef UAC_UNINSTALLERTANGOFORALLPLATFORMS
+	!include WinVer.nsh
+	!endif
+!insertmacro _UAC.InitStrings 'U.'
+ReadIniStr $0 "$ExeDir\${UACSTR.UnDataFile}" UAC "Un.Ready"
+${IF} $0 != 1
+!ifNdef UAC_UNINSTALLERTANGOFORALLPLATFORMS
+${AndIf} ${AtLeastWinVista}
+!endif
+	InitPluginsDir
+	WriteIniStr "$PluginsDir\${UACSTR.UnDataFile}" UAC "Un.Ready" 1
+	CopyFiles /SILENT "$EXEPATH" "$PluginsDir\${UninstallerFileName}"
+	StrCpy $0 ""
+	${IfThen} ${Silent} ${|} StrCpy $0 "/S " ${|}
+	ExecWait '"$PluginsDir\${UninstallerFileName}" $0/NCRC _?=$INSTDIR' $0
+	SetErrorLevel $0
+	Quit
+	${EndIf}
+!macroend
+!endif
+
+!ifmacroNdef _UAC.GenerateOnInitElevationCode
+!macro _UAC.GenerateOnInitElevationCode _modeprefix
+!ifndef __FUNCTION__
+	!error "UAC: Needs to be called inside a function"
+	!endif
+!insertmacro _UAC.InitStrings ${_modeprefix}
+!define _UAC.GOIECUniq L${__LINE__}
+UAC_Elevate_${_UAC.GOIECUniq}:
+UAC::RunElevated 
+StrCmp 1223 $0 UAC_ElevationAborted_${_UAC.GOIECUniq} ; UAC dialog aborted by user?
+StrCmp 0 $0 0 UAC_Err_${_UAC.GOIECUniq} ; Error?
+StrCmp 1 $1 0 UAC_Success_${_UAC.GOIECUniq} ;Are we the real deal or just the wrapper?
+Quit
+UAC_Err_${_UAC.GOIECUniq}:
+MessageBox mb_iconstop "${UACSTR.${_modeprefix}ElvWinErr}"
+Abort
+UAC_ElevationAborted_${_UAC.GOIECUniq}:
+MessageBox mb_iconstop "${UACSTR.${_modeprefix}ElvAbortReqAdmin}"
+Abort
+UAC_Success_${_UAC.GOIECUniq}:
+# if $0==0 && $3==1, we are a member of the admin group (Any OS)
+# if $0==0 && $1==0, UAC not supported (Probably <NT6), run as normal?
+# if $0==0 && $1==3, we can try to elevate again
+StrCmp 1 $3 /*+4*/ UAC_Done_${_UAC.GOIECUniq} ;Admin?
+StrCmp 3 $1 0 UAC_ElevationAborted_${_UAC.GOIECUniq} ;Try again or abort?
+MessageBox mb_iconexclamation "${UACSTR.${_modeprefix}ElvMustTryAgain}" ;Inform user...
+goto UAC_Elevate_${_UAC.GOIECUniq} ;...lets try again
+UAC_Done_${_UAC.GOIECUniq}:
+!undef _UAC.GOIECUniq
+!macroend
+!endif
+
+!define UAC.I.Elevate.AdminOnly '!insertmacro UAC.I.Elevate.AdminOnly '
+!macro UAC.I.Elevate.AdminOnly
+!insertmacro _UAC.GenerateOnInitElevationCode 'I.'
+!macroend
+
+!define UAC.U.Elevate.AdminOnly '!insertmacro UAC.U.Elevate.AdminOnly '
+!macro UAC.U.Elevate.AdminOnly _UninstallerName
+!ifNdef UAC_DISABLEUNINSTALLERTANGO
+	!insertmacro _UAC.GenerateUninstallerTango "${_UninstallerName}"
+	!endif
+!insertmacro _UAC.GenerateOnInitElevationCode 'U.'
+!macroend
+
+!define UAC.AutoCodeUnload '!insertmacro UAC.AutoCodeUnload '
+!macro UAC.AutoCodeUnload _HasUninstaller
+!insertmacro _UAC.GenerateSimpleFunction "" .OnInstFailed '${UAC.Unload}'
+!insertmacro _UAC.GenerateSimpleFunction "" .OnInstSuccess '${UAC.Unload}'
+!ifNdef MUI_INCLUDED
+	!insertmacro _UAC.GenerateSimpleFunction "" .onUserAbort '${UAC.Unload}'
+	!else
+	!ifNdef MUI_CUSTOMFUNCTION_ABORT
+		!error "UAC: must call $$ {UAC.Unload} in MUI_CUSTOMFUNCTION_ABORT!"
+		!endif
+	!endif
+!if "${_HasUninstaller}" != ""
+	!insertmacro _UAC.GenerateSimpleFunction "un" .onUninstFailed '${UAC.Unload}'
+	!insertmacro _UAC.GenerateSimpleFunction "un" .onUninstSuccess '${UAC.Unload}'
+	!ifNdef MUI_INCLUDED
+		!insertmacro _UAC.GenerateSimpleFunction "un" .onUserAbort '${UAC.Unload}'
+		!else
+		!ifNdef MUI_CUSTOMFUNCTION_ABORT
+			!error "UAC: must call $$ {UAC.Unload} in MUI_CUSTOMFUNCTION_(UN)ABORT!"
+			!endif
+		!endif
+	!endif
+!macroend
+
+!define UAC.FastCallFunctionAsUser '!insertmacro UAC.FastCallFunctionAsUser '
+!macro UAC.FastCallFunctionAsUser _func _var
+GetFunctionAddress ${_var} ${_func}
+UAC::ExecCodeSegment ${_var}
+!macroend
+!define UAC.CallFunctionAsUser '!insertmacro UAC.CallFunctionAsUser '
+!macro UAC.CallFunctionAsUser _func
+push $R9
+!insertmacro UAC.FastCallFunctionAsUser ${_func} $R9
+pop $R9
+!macroend
+
+!define UAC.FastCallGetOuterInstanceHwndParent UAC::GetOuterHwnd
+!define UAC.GetOuterInstanceHwndParent '!insertmacro UAC.GetOuterInstanceHwndParent '
+!macro UAC.GetOuterInstanceHwndParent _var
+push $0
+${UAC.FastCallGetOuterInstanceHwndParent}
+Exch $0
+Pop ${_var}
+!macroend
+
+
+
+!macro _UAC.DumpEx _disp _f _fp _v
+${_f} ${_fp}
+DetailPrint "${_disp}=${_v}"
+!macroend
+!macro _UAC.Dump _f _fp _v
+!insertmacro _UAC.DumpEx `${_f}` `${_f}` `${_fp}` `${_v}`
+!macroend
+!macro _UAC.DbgDetailPrint
+push $0
+push $1
+System::Call /NoUnload "advapi32::GetUserName(t.r0,*i${NSIS_MAX_STRLEN})"
+System::Call "Kernel32::GetComputerName(t.r1,*i${NSIS_MAX_STRLEN})"
+DetailPrint "$1\$0"
+;!insertmacro _UAC.DumpEx "User" System::Call "advapi32::GetUserName(t.r0,*i${NSIS_MAX_STRLEN})" $0
+!insertmacro _UAC.DumpEx "CmdLine" "" "" "$CmdLine"
+!insertmacro _UAC.Dump UAC::IsAdmin "" $0
+!insertmacro _UAC.Dump UAC::SupportsUAC "" $0
+!insertmacro _UAC.Dump UAC::GetElevationType "" $0
+pop $1
+pop $0
+!macroend
+
 !endif /* ifndef UAC_HDR__INC */

+ 32 - 0
client/winbuild/regprot.nsi

@@ -1,3 +1,35 @@
+; ***** 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 Mozilla Prism.
+;
+; Contributor(s):
+; Matthew Gertner, <matthew.gertner@gmail.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 *****
+
 OutFile "regprot.exe"
 
 RequestExecutionLevel user

+ 39 - 25
common/modules/WebAppProperties.jsm

@@ -1,29 +1,43 @@
 #filter substitution
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.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 WebRunner.
- *
- * The Initial Developer of the Original Code is Mozilla Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2007
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Mark Finkle <mark.finkle@gmail.com>, <mfinkle@mozilla.com>
- *   Cesar Oliveira <a.sacred.line@gmail.com>
- *   Matthew Gertner <matthew@allpeers.com>
- *
- * ***** END LICENSE BLOCK ***** */
+/*
+# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# ***** 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 Mozilla Prism.
+#
+# The Initial Developer of the Original Code is
+# Mark Finkle.
+#
+# Contributor(s):
+# Mark Finkle, <mark.finkle@gmail.com>, <mfinkle@mozilla.com>
+# Matthew Gertner, <matthew.gertner@gmail.com>
+# Cesar Oliveira <a.sacred.line@gmail.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;

+ 2 - 2
components/public/nsIApplicationIcon.idl

@@ -12,7 +12,7 @@
  * for the specific language governing rights and limitations under the
  * License.
  *
- * The Original Code is WebRunner
+ * The Original Code is Mozilla Prism
  *
  * The Initial Developer of the Original Code is
  * Matthew Gertner.
@@ -20,7 +20,7 @@
  * the Initial Developer. All Rights Reserved.
  *
  * Contributor(s):
- *   Matthew Gertner <matthew@allpeers.com> (Original author)
+ *   Matthew Gertner <matthe.gertner@gmail.com> (Original author)
  *
  * 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

+ 1 - 1
components/public/nsIDesktopEnvironment.idl

@@ -12,7 +12,7 @@
  * for the specific language governing rights and limitations under the
  * License.
  *
- * The Original Code is WebRunner
+ * The Original Code is Mozilla Prism
  *
  * The Initial Developer of the Original Code is
  * Matthew Gertner.

+ 2 - 2
components/public/nsINativeIcon.idl

@@ -12,7 +12,7 @@
  * for the specific language governing rights and limitations under the
  * License.
  *
- * The Original Code is WebRunner
+ * The Original Code is Mozilla Prism
  *
  * The Initial Developer of the Original Code is
  * Matthew Gertner.
@@ -20,7 +20,7 @@
  * the Initial Developer. All Rights Reserved.
  *
  * Contributor(s):
- *   Matthew Gertner <matthew@allpeers.com> (Original author)
+ *   Matthew Gertner <matthew.gertner@gmail.com> (Original author)
  *
  * 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

+ 1 - 1
components/public/nsINativeMenu.idl

@@ -12,7 +12,7 @@
  * for the specific language governing rights and limitations under the
  * License.
  *
- * The Original Code is WebRunner
+ * The Original Code is Mozilla Prism
  *
  * The Initial Developer of the Original Code is
  * Matthew Gertner.

+ 28 - 0
components/public/nsIPlatformGlue.idl

@@ -88,6 +88,20 @@ interface nsIPlatformNotificationListener : nsISupports
   void onFinished();
 };
 
+/**
+ * Interface that web content can use to prevent shutdown
+ */
+[scriptable, function, uuid(c609b327-e889-4560-9bcd-04d502436288)]
+interface nsIPlatformShutdownCallback : nsISupports
+{
+  /**
+   * Callback executed before shutdown.
+   *
+   * @returns True if the app can shutdown, false to prevent
+   */
+  boolean canShutdown();
+};
+
 /**
  * Interface that gives simplified access to platform functionality
  */
@@ -219,4 +233,18 @@ interface nsIPlatformGlue : nsISupports
    * Clear private data (cache, history, etc.).
    */
   void clearPrivateData();
+
+  /**
+   * Register a callback from web content that can prevent app shutdown.
+   *
+   * @param Callback interface (function) returns true to allow shutdown, false to prevent
+   */
+  void registerShutdownCallback(in nsIPlatformShutdownCallback callback);
+  
+  /**
+   * Invokes the shutdown callback, if any.
+   *
+   * @returns True if it is okay to shutdown (including if there is no callback), false otherwise
+  */
+  boolean invokeShutdownCallback();
 };

+ 2 - 1
components/src/Makefile.in

@@ -98,7 +98,8 @@ endif
 
 ifeq ($(OS_ARCH),Linux)
 CPPSRCS += \
-  linux/nsDesktopEnvironmentLinux.cpp
+  linux/nsDesktopEnvironmentLinux.cpp \
+  linux/nsSystemTray.cpp
 endif
 
 EXTRA_PP_COMPONENTS = \

+ 11 - 4
components/src/linux/nsDesktopEnvironmentLinux.cpp

@@ -12,7 +12,7 @@
  * for the specific language governing rights and limitations under the
  * License.
  *
- * The Original Code is WebRunner
+ * The Original Code is Mozilla Prism
  *
  * The Initial Developer of the Original Code is
  * Matthew Gertner.
@@ -43,6 +43,7 @@
 #include "nsIGConfService.h"
 #include "nsIFile.h"
 #include "nsServiceManagerUtils.h"
+#include "nsSystemTray.h"
 
 #include <sys/types.h>
 #include <unistd.h>
@@ -85,7 +86,7 @@ private:
 
 NS_IMPL_ISUPPORTS2(nsDesktopEnvironment, nsIDesktopEnvironment, nsIWebProtocolService)
 
-nsDesktopEnvironment::nsDesktopEnvironment()
+nsDesktopEnvironment::nsDesktopEnvironment(): m_trayArea(NULL)
 {
   //
 }
@@ -121,8 +122,14 @@ NS_IMETHODIMP nsDesktopEnvironment::HideDirectory(const nsAString & path)
 NS_IMETHODIMP nsDesktopEnvironment::GetApplicationIcon(nsIDOMWindow *window,
                                                       nsIApplicationIcon **_retval NS_OUTPARAM)
 {
-  NS_ENSURE_ARG(_retval);
-  *_retval = nsnull;
+  NS_ENSURE_ARG(window);
+
+  if (!m_trayArea) {
+    m_trayArea = new nsSystemTray(window);
+    NS_ENSURE_TRUE(m_trayArea, NS_ERROR_OUT_OF_MEMORY);
+  }
+
+  NS_ADDREF(*_retval = m_trayArea);
   return NS_OK;
 }
 

+ 6 - 3
components/src/linux/nsDesktopEnvironmentLinux.h

@@ -12,7 +12,7 @@
  * for the specific language governing rights and limitations under the
  * License.
  *
- * The Original Code is WebRunner
+ * The Original Code is Mozilla Prism
  *
  * The Initial Developer of the Original Code is
  * Matthew Gertner.
@@ -38,7 +38,7 @@
 
 #include "nsIDesktopEnvironment.h"
 #include "nsIWebProtocolService.h"
-
+#include "nsCOMPtr.h"
 #include "nsStringAPI.h"
 #include "nsClassHashtable.h"
 
@@ -51,6 +51,8 @@
 }
 #define NS_DESKTOPENVIRONMENT_CONTRACTID "@mozilla.org/desktop-environment;1"
 
+class nsIApplicationIcon;
+
 typedef nsClassHashtable<nsCStringHashKey, nsCString> ArgMap;
 
 // Desktop integration for Linux platforms.
@@ -70,6 +72,7 @@ private:
   nsresult ParseAppCmdLine(nsCString const &appCmdLine, nsCString &outAppName,
                            ArgMap &outArgs) const;
 private:
-  nsCAutoString m_regApp;
+  nsCAutoString                 m_regApp;
+  nsCOMPtr<nsIApplicationIcon>  m_trayArea;
 };
 

+ 221 - 0
components/src/linux/nsSystemTray.cpp

@@ -0,0 +1,221 @@
+/* -*- Mode: C++; tab-aWidth: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ * ***** 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 Mozilla Prism
+ *
+ * The Initial Developer of the Original Code is
+ * Matthew Gertner.
+ * Portions created by the Initial Developer are Copyright (C) 2007
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Matthew Gertner <matthew.gertner@gmail.com> (Original author)
+ *
+ * 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 ***** */
+ 
+#include "nsSystemTray.h"
+#include "nsIDOMWindow.h"
+#include "nsMemory.h"
+#include "nsIAlertsService.h"
+#include "nsServiceManagerUtils.h"
+
+// Security helper
+class SecurityHelper
+{
+public:
+  static char* cloneAllAccess()
+  {
+    static const char allAccess[] = "AllAccess";
+    return (char*)nsMemory::Clone(allAccess, sizeof(allAccess));
+  }
+
+  static char* cloneNoAccess()
+  {
+    static const char noAccess[] = "NoAccess";
+    return (char*)nsMemory::Clone(noAccess, sizeof(noAccess));
+  }
+};
+
+// nsSystemTray
+NS_IMPL_ISUPPORTS3(nsSystemTray, nsIApplicationIcon, nsINativeMenu, nsISecurityCheckedComponent)
+
+nsSystemTray::nsSystemTray(nsIDOMWindow* aWindow):
+  m_window(aWindow), m_menu(NULL)
+{
+  //
+}
+
+nsSystemTray::~nsSystemTray()
+{
+  //
+}
+
+//nsIApplicationIcon
+
+NS_IMETHODIMP nsSystemTray::SetTitle(const nsAString& aTitle)
+{
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP nsSystemTray::GetTitle(nsAString& aTitle)
+{
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP nsSystemTray::GetMenu(nsINativeMenu** _retval)
+{
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP nsSystemTray::SetImageSpec(const nsAString& aImageSpec)
+{
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP nsSystemTray::GetImageSpec(nsAString& aImageSpec)
+{
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP nsSystemTray::SetBadgeText(const nsAString& aBadgeText)
+{
+  return NS_OK;
+}
+
+NS_IMETHODIMP nsSystemTray::GetBadgeText(nsAString& aBadgeText)
+{
+  return NS_OK;
+}
+
+NS_IMETHODIMP nsSystemTray::GetBehavior(PRUint32* aBehavior)
+{
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP nsSystemTray::SetBehavior(PRUint32 aBehavior)
+{
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP nsSystemTray::Show()
+{
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP nsSystemTray::Hide()
+{
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP nsSystemTray::Minimize()
+{
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP nsSystemTray::ShowNotification(const nsAString& aTitle, const nsAString& aText,
+                                            PRUint32 aTimeout, PRBool aIsClickable,
+                                            nsIObserver* aAlertListener)
+{
+  nsresult rv;
+  nsCOMPtr<nsIAlertsService> alerts(do_GetService("@mozilla.org/alerts-service;1", &rv));
+  NS_ENSURE_SUCCESS(rv, rv);
+  
+  rv = alerts->ShowAlertNotification(EmptyString(), aTitle, aText, aIsClickable, EmptyString(), nsnull, EmptyString());
+  NS_ENSURE_SUCCESS(rv, rv);
+  
+  return NS_OK;
+}
+
+//nsINativeMenu
+
+NS_IMETHODIMP nsSystemTray::GetHandle(void** _retval)
+{
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP nsSystemTray::GetItems(nsISimpleEnumerator** _retval)
+{
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP nsSystemTray::AddMenuItem(const nsAString& aId, const nsAString& aLabel,
+                                        nsIDOMEventListener* aListener)
+{
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+nsresult nsSystemTray::AddSubmenu(const nsAString& aId, const nsAString& aLabel,
+                                  nsINativeMenu** _retval)
+{
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP nsSystemTray::RemoveMenuItem(const nsAString& aId)
+{
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+NS_IMETHODIMP nsSystemTray::RemoveAllMenuItems()
+{
+  return NS_ERROR_NOT_IMPLEMENTED;
+}
+
+//nsISecurityCheckedComponent
+
+NS_IMETHODIMP nsSystemTray::CanCreateWrapper(const nsIID* iid, char **_retval)
+{
+  *_retval = SecurityHelper::cloneAllAccess();
+  return NS_OK;
+}
+
+NS_IMETHODIMP nsSystemTray::CanCallMethod(const nsIID *iid, const PRUnichar *methodName,
+                                          char **_retval)
+{
+  *_retval = SecurityHelper::cloneAllAccess();
+  return NS_OK;
+}
+
+NS_IMETHODIMP nsSystemTray::CanGetProperty(const nsIID *iid, const PRUnichar *propertyName,
+                                            char **_retval)
+{
+  *_retval = SecurityHelper::cloneAllAccess();
+  return NS_OK;
+}
+
+NS_IMETHODIMP nsSystemTray::CanSetProperty(const nsIID *iid, const PRUnichar *propertyName,
+                                            char **_retval)
+{
+  if (iid->Equals(NS_GET_IID(nsIApplicationIcon))) {
+    *_retval = SecurityHelper::cloneAllAccess();
+  }
+  else {
+    *_retval = SecurityHelper::cloneNoAccess();
+  }
+  return NS_OK;
+}
+
+
+

+ 67 - 47
client/extensions/inspector@mozilla.org/defaults/preferences/inspector.js → components/src/linux/nsSystemTray.h

@@ -1,47 +1,67 @@
-/* ***** 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 mozilla.org code.
- *
- * The Initial Developer of the Original Code is
- * Netscape Communications Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2001
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Joe Hewitt <hewitt@netscape.com> (original author)
- *
- * 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 ***** */
-
-pref("inspector.blink.border-color", "#CC0000");
-pref("inspector.blink.border-width", 2);
-pref("inspector.blink.duration", 1200);
-pref("inspector.blink.on", true);
-pref("inspector.blink.speed", 100);
-pref("inspector.blink.invert", false);
-pref("inspector.dom.showAnon", true);
-pref("inspector.dom.showWhitespaceNodes", true);
-pref("inspector.dom.showAccessibleNodes", false);
-pref("inspector.dom.showProcessingInstructions", true);
+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+ * ***** 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 Mozilla Prism
+ *
+ * The Initial Developer of the Original Code is
+ * Matthew Gertner.
+ * Portions created by the Initial Developer are Copyright (C) 2007
+ * the Initial Developer. All Rights Reserved.
+ *
+ * Contributor(s):
+ *   Matthew Gertner <matthew.gertner@gmail.com> (Original author)
+ *
+ * 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 ***** */
+ 
+#ifndef NSSYSTEMTRAY_H_DEFINED
+#define NSSYSTEMTRAY_H_DEFINED
+
+#include "nsIApplicationIcon.h"
+#include "nsINativeMenu.h"
+#include "nsISecurityCheckedComponent.h"
+#include "nsCOMPtr.h"
+#include "nsStringAPI.h"
+
+class nsIDOMWindow;
+
+class nsSystemTray: public nsIApplicationIcon,
+                    public nsINativeMenu,
+                    public nsISecurityCheckedComponent
+{
+public:
+  NS_DECL_ISUPPORTS
+  NS_DECL_NSIAPPLICATIONICON
+  NS_DECL_NSINATIVEMENU
+  NS_DECL_NSISECURITYCHECKEDCOMPONENT
+
+  nsSystemTray(nsIDOMWindow* aWindow);
+  virtual ~nsSystemTray();
+private:
+  nsCOMPtr<nsIDOMWindow>  m_window;
+  nsCOMPtr<nsINativeMenu> m_menu;
+};
+
+#endif //NSSYSTEMTRAY_H_DEFINED

+ 1 - 1
components/src/mac/DOMEventListenerWrapper.h

@@ -12,7 +12,7 @@
  * for the specific language governing rights and limitations under the
  * License.
  *
- * The Original Code is WebRunner
+ * The Original Code is Mozilla Prism
  *
  * The Initial Developer of the Original Code is
  * Matthew Gertner.

+ 0 - 0
components/src/mac/Makefile.in


+ 1 - 1
components/src/mac/nsCocoaMenu.h

@@ -12,7 +12,7 @@
  * for the specific language governing rights and limitations under the
  * License.
  *
- * The Original Code is WebRunner
+ * The Original Code is Mozilla Prism
  *
  * The Initial Developer of the Original Code is
  * Matthew Gertner.

+ 1 - 1
components/src/mac/nsDesktopEnvironmentMac.h

@@ -12,7 +12,7 @@
  * for the specific language governing rights and limitations under the
  * License.
  *
- * The Original Code is WebRunner
+ * The Original Code is Mozilla Prism
  *
  * The Initial Developer of the Original Code is
  * Matthew Gertner.

+ 1 - 1
components/src/mac/nsDockTile.h

@@ -12,7 +12,7 @@
  * for the specific language governing rights and limitations under the
  * License.
  *
- * The Original Code is WebRunner
+ * The Original Code is Mozilla Prism
  *
  * The Initial Developer of the Original Code is
  * Matthew Gertner.

+ 1 - 1
components/src/mac/nsICNSEncoder.h

@@ -20,7 +20,7 @@
  * the Initial Developer. All Rights Reserved.
  *
  * Contributor(s):
- *   Matthew Gertner <matthew@allpeers.com> (Original author)
+ *   Matthew Gertner <matthew.gertner@gmail.com> (Original author)
  *
  * 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

+ 38 - 23
components/src/nsCommandLineHandler.js

@@ -1,27 +1,42 @@
 #filter substitution
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.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 WebRunner.
- *
- * The Initial Developer of the Original Code is Mozilla Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2007
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Matthew Gertner <matthew.gertner@gmail.com>
- *
- * ***** END LICENSE BLOCK ***** */
+/*
+# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# ***** 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 Mozilla Prism.
+#
+# The Initial Developer of the Original Code is
+# Mark Finkle.
+#
+# Contributor(s):
+# Mark Finkle, <mark.finkle@gmail.com>, <mfinkle@mozilla.com>
+# Matthew Gertner, <matthew.gertner@gmail.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 *****
+*/
  
 /* Development of this Contribution was supported by Yahoo! Inc. */
 

+ 1 - 1
components/src/nsDOMMenuBar.h

@@ -12,7 +12,7 @@
  * for the specific language governing rights and limitations under the
  * License.
  *
- * The Original Code is WebRunner
+ * The Original Code is Mozilla Prism
  *
  * The Initial Developer of the Original Code is
  * Matthew Gertner.

+ 10 - 0
components/src/nsPlatformGlue.js

@@ -451,6 +451,16 @@ PlatformGlue.prototype = {
   showAbout : function showAbout()
   {
     this._chromeWindow.openDialog("chrome://webrunner/content/about.xul", "about", "centerscreen,modal");
+  },
+  
+  registerShutdownCallback : function registerShutdownCallback(callback)
+  {
+    shutdownCallback = callback;
+  },
+  
+  invokeShutdownCallback : function invokeShutdownCallback()
+  {
+    return shutdownCallback ? shutdownCallback.canShutdown() : true;
   }
 }
 

+ 1 - 1
components/src/nsPlatformGlueSingleton.cpp

@@ -12,7 +12,7 @@
  * for the specific language governing rights and limitations under the
  * License.
  *
- * The Original Code is WebRunner
+ * The Original Code is Mozilla Prism
  *
  * The Initial Developer of the Original Code is
  * Matthew Gertner.

+ 1 - 1
components/src/nsPlatformGlueSingleton.h

@@ -12,7 +12,7 @@
  * for the specific language governing rights and limitations under the
  * License.
  *
- * The Original Code is WebRunner
+ * The Original Code is Mozilla Prism
  *
  * The Initial Developer of the Original Code is
  * Matthew Gertner.

+ 0 - 0
components/src/windows/Makefile.in


+ 1 - 1
components/src/windows/nsDesktopEnvironmentWin.cpp

@@ -12,7 +12,7 @@
  * for the specific language governing rights and limitations under the
  * License.
  *
- * The Original Code is WebRunner
+ * The Original Code is Mozilla Prism
  *
  * The Initial Developer of the Original Code is
  * Matthew Gertner.

+ 1 - 1
components/src/windows/nsDesktopEnvironmentWin.h

@@ -12,7 +12,7 @@
  * for the specific language governing rights and limitations under the
  * License.
  *
- * The Original Code is WebRunner
+ * The Original Code is Mozilla Prism
  *
  * The Initial Developer of the Original Code is
  * Matthew Gertner.

+ 2 - 2
components/src/windows/nsICOEncoder.cpp

@@ -12,7 +12,7 @@
  * for the specific language governing rights and limitations under the
  * License.
  *
- * The Original Code is WebRunner
+ * The Original Code is Mozilla Prism
  *
  * The Initial Developer of the Original Code is
  * Matthew Gertner.
@@ -20,7 +20,7 @@
  * the Initial Developer. All Rights Reserved.
  *
  * Contributor(s):
- *   Matthew Gertner <matthew@allpeers.com> (Original author)
+ *   Matthew Gertner <matthew.gertner@gmail.com> (Original author)
  *
  * 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

+ 2 - 2
components/src/windows/nsICOEncoder.h

@@ -12,7 +12,7 @@
  * for the specific language governing rights and limitations under the
  * License.
  *
- * The Original Code is WebRunner
+ * The Original Code is Mozilla Prism
  *
  * The Initial Developer of the Original Code is
  * Matthew Gertner.
@@ -20,7 +20,7 @@
  * the Initial Developer. All Rights Reserved.
  *
  * Contributor(s):
- *   Matthew Gertner <matthew@allpeers.com> (Original author)
+ *   Matthew Gertner <matthew.gertner@gmail.com> (Original author)
  *
  * 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

+ 1 - 1
components/src/windows/nsNativeMenu.cpp

@@ -12,7 +12,7 @@
  * for the specific language governing rights and limitations under the
  * License.
  *
- * The Original Code is WebRunner
+ * The Original Code is Mozilla Prism
  *
  * The Initial Developer of the Original Code is
  * Matthew Gertner.

+ 1 - 1
components/src/windows/nsNativeMenu.h

@@ -12,7 +12,7 @@
  * for the specific language governing rights and limitations under the
  * License.
  *
- * The Original Code is WebRunner
+ * The Original Code is Mozilla Prism
  *
  * The Initial Developer of the Original Code is
  * Matthew Gertner.

+ 42 - 37
components/src/windows/nsNotificationArea.cpp

@@ -81,10 +81,10 @@ ATOM nsNotificationArea::s_wndClass = NULL;
 
 #define MK_ERROR_OFFSET       (0xE0000000 + (__LINE__ * 0x10000))
 
-#define MK_ENSURE_NATIVE(res)                              \
-  PR_BEGIN_MACRO                                           \
-    NS_ENSURE_TRUE(0 != res || 0 == ::GetLastError(),      \
-      ::GetLastError() + MK_ERROR_OFFSET);                 \
+#define MK_ENSURE_NATIVE(res)                               \
+  PR_BEGIN_MACRO                                            \
+    NS_ENSURE_TRUE(0 != res || 0 == ::GetLastError(),       \
+      ::GetLastError() + MK_ERROR_OFFSET);                  \
   PR_END_MACRO
 
 // this can be WM_USER + anything
@@ -97,7 +97,7 @@ nsNotificationArea::nsNotificationArea(nsIDOMWindow* aWindow) : mMenu(NULL)
 {
   memset(&mIconData, 0, sizeof(NOTIFYICONDATAW));
   mWindow = aWindow;
-  
+
   nsCOMPtr<nsIPrefService> prefService(do_GetService("@mozilla.org/preferences-service;1"));
   if (prefService) {
     prefService->GetBranch("notificationarea.", getter_AddRefs(mPrefs));
@@ -131,6 +131,9 @@ nsNotificationArea::Show()
 
   if (mIconData.cbSize)
   {
+    // Free the existing icon
+    ::DestroyIcon(mIconData.hIcon);
+
     HICON hicon;
     rv = GetIconForURI(imageURI, hicon);
     NS_ENSURE_SUCCESS(rv, rv);
@@ -159,6 +162,8 @@ nsNotificationArea::Hide()
     ::DestroyWindow(mIconData.hWnd);
   }
 
+  ::DestroyIcon(mIconData.hIcon);
+
   Shell_NotifyIconW(NIM_DELETE, &mIconData);
 
   memset(&mIconData, 0, sizeof(NOTIFYICONDATAW));
@@ -242,7 +247,7 @@ nsNotificationArea::SetImageSpec(const nsAString& aImageSpec)
     rv = Show();
     NS_ENSURE_SUCCESS(rv, rv);
   }
-  
+
   return NS_OK;
 }
 
@@ -268,7 +273,7 @@ nsNotificationArea::GetBadgeText(nsAString& aBadgeText)
 NS_IMETHODIMP nsNotificationArea::GetHandle(void** _retval)
 {
   NS_ENSURE_STATE(mMenu);
-  
+
   return mMenu->GetHandle(_retval);
 }
 
@@ -280,14 +285,14 @@ nsNotificationArea::AddMenuItem(const nsAString& aId, const nsAString& aLabel, n
     mMenu = new nsNativeMenu(hMenu);
     NS_ENSURE_TRUE(mMenu, NS_ERROR_OUT_OF_MEMORY);
   }
-  
+
   return mMenu->AddMenuItem(aId, aLabel, aListener);
 }
 
 nsresult nsNotificationArea::AddSubmenu(const nsAString& aId, const nsAString& aLabel, nsINativeMenu** _retval)
 {
   NS_ENSURE_STATE(mMenu);
-  
+
   return mMenu->AddSubmenu(aId, aLabel, _retval);
 }
 
@@ -303,7 +308,7 @@ NS_IMETHODIMP
 nsNotificationArea::RemoveAllMenuItems()
 {
   NS_ENSURE_STATE(mMenu);
-  
+
   return mMenu->RemoveAllMenuItems();
 }
 
@@ -319,14 +324,14 @@ NS_IMETHODIMP
 nsNotificationArea::GetBehavior(PRUint32* aBehavior)
 {
   NS_ENSURE_STATE(mWindow);
-  
+
   nsresult rv;
   HWND hwnd;
   rv = nsDesktopEnvironment::GetHWNDForDOMWindow(mWindow, (void *) &hwnd);
   NS_ENSURE_SUCCESS(rv, rv);
-  
+
   *aBehavior = (PRUint32) GetProp(hwnd, S_PROPBEHAVIOR);
-  
+
   return NS_OK;
 }
 
@@ -334,12 +339,12 @@ NS_IMETHODIMP
 nsNotificationArea::SetBehavior(PRUint32 aBehavior)
 {
   NS_ENSURE_STATE(mWindow);
-  
+
   nsresult rv;
   HWND hwnd;
   rv = nsDesktopEnvironment::GetHWNDForDOMWindow(mWindow, (void *) &hwnd);
   NS_ENSURE_SUCCESS(rv, rv);
- 
+
   if (aBehavior) {
     if (!GetProp(hwnd, S_PROPBEHAVIOR)) {
       // Window isn't hooked yet
@@ -355,9 +360,9 @@ nsNotificationArea::SetBehavior(PRUint32 aBehavior)
       ::SetWindowLong(hwnd, GWL_WNDPROC, (DWORD) oldProc);
     }
   }
-  
+
   SetProp(hwnd, S_PROPBEHAVIOR, (HANDLE) aBehavior);
-  
+
   return NS_OK;
 }
 
@@ -365,7 +370,7 @@ NS_IMETHODIMP
 nsNotificationArea::Minimize()
 {
   NS_ENSURE_STATE(mWindow);
-  
+
   nsresult rv;
   rv = DispatchEvent(mWindow, nsnull, NS_LITERAL_STRING("minimizing"), PR_TRUE, nsnull);
   NS_ENSURE_SUCCESS(rv, rv);
@@ -381,16 +386,16 @@ nsNotificationArea::ShowNotification(const nsAString& aTitle,
                                    nsIObserver* aAlertListener)
 {
   NS_ENSURE_STATE(mIconData.cbSize);
-  
+
   nsresult rv;
   mIconData.uFlags = NIF_INFO;
   mIconData.uTimeout = aTimeout;
   rv = CopyStringWithMaxLength(aTitle, mIconData.szInfoTitle, 64);
   NS_ENSURE_SUCCESS(rv, rv);
-  
+
   rv = CopyStringWithMaxLength(aText, mIconData.szInfo, 256);
   NS_ENSURE_SUCCESS(rv, rv);
-  
+
   MK_ENSURE_NATIVE(Shell_NotifyIconW(NIM_MODIFY, &mIconData));
 
   return NS_OK;
@@ -466,7 +471,7 @@ nsNotificationArea::GetElementById(const nsAString& aId, nsIDOMElement** _retval
   nsCOMPtr<nsIDOMDocument> document;
   rv = mWindow->GetDocument(getter_AddRefs(document));
   NS_ENSURE_SUCCESS(rv, rv);
-  
+
   return document->GetElementById(aId, _retval);
 }
 
@@ -496,7 +501,7 @@ nsNotificationArea::CreateEvent(nsIDOMWindow* aDOMWindow, const nsAString& aType
   nsCOMPtr<nsIDOMDocument> document;
   rv = aDOMWindow->GetDocument(getter_AddRefs(document));
   NS_ENSURE_SUCCESS(rv, rv);
-  
+
   nsCOMPtr<nsIDOMDocumentEvent> documentEvent(do_QueryInterface(document, &rv));
   NS_ENSURE_SUCCESS(rv, rv);
 
@@ -506,17 +511,17 @@ nsNotificationArea::CreateEvent(nsIDOMWindow* aDOMWindow, const nsAString& aType
 
   rv = event->InitEvent(aType, canBubble, PR_TRUE);
   NS_ENSURE_SUCCESS(rv, rv);
-  
+
   // Need to make event trusted so content can cause it to be dispatched (e.g. minimizing the window via the API)
   nsCOMPtr<nsIPrivateDOMEvent> privateEvent(do_QueryInterface(event, &rv));
   NS_ENSURE_SUCCESS(rv, rv);
-  
+
   rv = privateEvent->SetTrusted(PR_TRUE);
   NS_ENSURE_SUCCESS(rv, rv);
 
   *_retval = event;
   NS_ADDREF(*_retval);
-  
+
   return NS_OK;
 }
 
@@ -545,10 +550,10 @@ nsNotificationArea::DispatchEvent(
   PRBool ret;
   rv = eventTarget->DispatchEvent(event, &ret);
   NS_ENSURE_SUCCESS(rv, rv);
-  
+
   if (aPreventDefault)
     *aPreventDefault = !ret;
-    
+
   return NS_OK;
 }
 
@@ -586,10 +591,10 @@ nsNotificationArea::CreateListenerWindow(
     CW_USEDEFAULT ,                       //x
     CW_USEDEFAULT ,                       //y
     CW_USEDEFAULT,                        //width
-    CW_USEDEFAULT,                        //height
-    ::GetDesktopWindow(),                 //parent
+    CW_USEDEFAULT,                        //heigh
+    ::GetDesktopWindow(),                 //paren
     NULL,                                 //menu
-    hInst,                                //hInst
+    hInst,                                //hIns
     NULL);                                //param
 
   if (!*listenerWindow) {
@@ -611,7 +616,7 @@ nsNotificationArea::ListenerWindowProc(HWND hwnd,
 {
   nsRefPtr<nsNotificationArea> notificationArea;
   notificationArea = (nsNotificationArea *)  GetProp(hwnd, S_PROPINST);
-  
+
   if (!notificationArea)
     return TRUE;
 
@@ -637,7 +642,7 @@ nsNotificationArea::ListenerWindowProc(HWND hwnd,
         itemInfo.fMask = MIIM_DATA;
         if (!::GetMenuItemInfo(hMenu, LOWORD(wParam), FALSE, &itemInfo))
           return TRUE;
-          
+
         nsCOMPtr<nsIDOMEventListener> listener = (nsIDOMEventListener *) itemInfo.dwItemData;
         nsCOMPtr<nsIDOMEvent> event;
         CreateEvent(notificationArea->mWindow, NS_LITERAL_STRING("DOMActivate"), PR_FALSE, getter_AddRefs(event));
@@ -732,9 +737,9 @@ nsNotificationArea::WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPara
       ::SetWindowLong(hwnd, GWL_WNDPROC, (DWORD) proc);
       break;
   }
- 
+
   if (!typeArg.IsEmpty()) {
-    // dispatch the event
+    // dispatch the event q
     PRBool preventDefault;
     nsresult rv;
     rv = DispatchEvent(domWindow, nsnull, typeArg, PR_TRUE, &preventDefault);
@@ -744,14 +749,14 @@ nsNotificationArea::WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lPara
       // event was hooked
       return FALSE;
   }
-  
+
   return CallWindowProc(proc, hwnd, uMsg, wParam, lParam);
 }
 
 void nsNotificationArea::ShowPopupMenu(HWND hwnd, HMENU hmenu) {
   // Set window to foregroup so the menu goes away when we lose focus
   ::SetForegroundWindow(hwnd);
-  
+
   POINT pos;
   ::GetCursorPos(&pos);
 

+ 0 - 0
components/src/windows/nsOSIntegrationModule.cpp


+ 1 - 1
components/src/windows/nsSystemMenu.cpp

@@ -12,7 +12,7 @@
  * for the specific language governing rights and limitations under the
  * License.
  *
- * The Original Code is WebRunner
+ * The Original Code is Mozilla Prism
  *
  * The Initial Developer of the Original Code is
  * Matthew Gertner.

+ 1 - 1
components/src/windows/nsSystemMenu.h

@@ -12,7 +12,7 @@
  * for the specific language governing rights and limitations under the
  * License.
  *
- * The Original Code is WebRunner
+ * The Original Code is Mozilla Prism
  *
  * The Initial Developer of the Original Code is
  * Matthew Gertner.

+ 1 - 1
confvars.sh

@@ -38,7 +38,7 @@
 
 MOZ_APP_NAME=prism
 MOZ_APP_DISPLAYNAME=Prism
-MOZ_APP_VERSION=1.0b4
+MOZ_APP_VERSION=1.0b8
 
 MOZ_XUL_APP=1
 MOZ_UPDATER=1

+ 38 - 0
defaults/preferences/preferences.js

@@ -1,4 +1,42 @@
 #filter substitution
+/*
+# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# ***** 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 Mozilla Prism.
+#
+# The Initial Developer of the Original Code is
+# Mark Finkle.
+#
+# Contributor(s):
+# Matthew Gertner, <matthew.gertner@gmail.com>
+# Mark Finkle, <mark.finkle@gmail.com>, <mfinkle@mozilla.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 *****
+*/
 
 pref("toolkit.defaultChromeURI", "chrome://webrunner/content/webrunner.xul");  // - main xul window
 pref("browser.chromeURL", "chrome://webrunner/content/webrunner.xul");         // - allow popup windows to open

+ 1 - 1
extension/chrome/content/refractor-overlay.xul

@@ -21,7 +21,7 @@
 
    Contributor(s):
      Cesar Oliveira <a.sacred.line@gmail.com>
-     Matthew Gertner <matthew@allpeers.com>
+     Matthew Gertner <matthew.gertner@gmail.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

BIN
install/profiles/facebook.webapp


BIN
install/profiles/ganalytics.webapp


BIN
install/profiles/gcalendar.webapp


BIN
install/profiles/gdocs.webapp


BIN
install/profiles/gmail.webapp


BIN
install/profiles/greader.webapp


BIN
install/profiles/groups.webapp


BIN
install/profiles/gtalk.webapp


BIN
install/profiles/twitter.webapp


+ 0 - 43
install/webrunner.iss

@@ -1,43 +0,0 @@
-[Setup]
-AppName=Prism
-AppVerName=Prism 0.8
-AppPublisher=Mozilla
-AppPublisherURL=http://www.starkravingfinkle.org
-AppSupportURL=http://www.starkravingfinkle.org
-AppUpdatesURL=http://www.starkravingfinkle.org
-DefaultDirName={pf}\Prism
-DefaultGroupName=Prism
-AllowNoIcons=yes
-OutputDir=.
-OutputBaseFilename=prism-win32
-SetupIconFile=bin\chrome\icons\default\install-shortcut.ico
-Compression=lzma
-SolidCompression=yes
-PrivilegesRequired=none
-
-[Languages]
-Name: english; MessagesFile: compiler:Default.isl
-
-[Components]
-Name: main; Description: Prism; Types: full compact custom; Flags: fixed
-Name: runtime; Description: XUL Runner Runtime; Types: full custom
-
-[Files]
-Source: bin\prism.exe; DestDir: {app}; Components: main; Flags: ignoreversion
-Source: bin\application.ini; DestDir: {app}; Components: main; Flags: ignoreversion
-Source: bin\chrome\*; DestDir: {app}\chrome; Components: main; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "*.icns"
-Source: bin\extensions\*; DestDir: {app}\extensions; Components: main; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "refractor@developer.mozilla.org\*"
-Source: bin\modules\*; DestDir: {app}\modules; Components: main; Flags: ignoreversion recursesubdirs createallsubdirs
-Source: bin\xulrunner\*; DestDir: {app}\xulrunner; Components: runtime; Flags: ignoreversion recursesubdirs createallsubdirs
-
-[Icons]
-Name: {group}\Prism; Filename: "{app}\prism.exe"; IconFilename: "{app}\chrome\icons\default\install-shortcut.ico"; WorkingDir: "{app}"
-Name: {group}\{cm:UninstallProgram,Prism}; Filename: {uninstallexe}
-
-[Registry]
-Root: HKCR; Subkey: ".webapp"; ValueType: string; ValueName: ""; ValueData: "Prism.App"; Check: IsAdminLoggedOn; Flags: uninsdeletevalue
-Root: HKCR; Subkey: "Prism.App"; ValueType: string; ValueName: ""; ValueData: "Prism Launcher"; Check: IsAdminLoggedOn; Flags: uninsdeletekey
-Root: HKCR; Subkey: "Prism.App\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\chrome\icons\default\install-shortcut.ico"; Check: IsAdminLoggedOn;
-Root: HKCR; Subkey: "Prism.App\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\prism.exe"" -webapp ""%1"""; Check: IsAdminLoggedOn;
-
-

+ 38 - 23
newapp/chrome/content/install-advanced.js

@@ -1,26 +1,41 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.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 WebRunner.
- *
- * The Initial Developer of the Original Code is Mozilla Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2007
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Mark Finkle, <mark.finkle@gmail.com>, <mfinkle@mozilla.com>
- *
- * ***** END LICENSE BLOCK ***** */
+/*
+# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# ***** 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 Mozilla Prism.
+#
+# The Initial Developer of the Original Code is
+# Mark Finkle.
+#
+# Contributor(s):
+# Mark Finkle, <mark.finkle@gmail.com>, <mfinkle@mozilla.com>
+# Matthew Gertner, <matthew.gertner@gmail.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;

+ 42 - 0
newapp/chrome/content/install-advanced.xul

@@ -1,6 +1,48 @@
 #filter substitution
 <?xml version="1.0"?>
 
+<!--
+# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# ***** 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 Mozilla Prism
+#
+# The Initial Developer of the Original Code is
+# Ben Goodger.
+# Portions created by the Initial Developer are Copyright (C) 2005
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#   Matthew Gertner <matthew.gertner@gmail.com>
+#   Mark Finkle, <mark.finkle@gmail.com>, <mfinkle@mozilla.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 *****
+-->
+
+
 <?xml-stylesheet href="chrome://global/skin" type="text/css"?>
 
 <!DOCTYPE window SYSTEM "chrome://@PACKAGE@/locale/install-advanced.dtd">

+ 39 - 26
newapp/chrome/content/install-shortcut.js

@@ -1,30 +1,43 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.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 WebRunner.
- *
- * The Initial Developer of the Original Code is Mozilla Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2007
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Mark Finkle, <mark.finkle@gmail.com>, <mfinkle@mozilla.com>
- *   Matthew Gertner <matthew@allpeers.com>
- *   Fredrik Larsson <nossralf@gmail.com>
- *
- * ***** END LICENSE BLOCK ***** */
-
 #filter substitution
+/*
+# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# ***** 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 Mozilla Prism.
+#
+# The Initial Developer of the Original Code is
+# Mark Finkle.
+#
+# Contributor(s):
+# Mark Finkle, <mark.finkle@gmail.com>, <mfinkle@mozilla.com>
+# Matthew Gertner, <matthew.gertner@gmail.com>
+# Fredrik Larsson <nossralf@gmail.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;

+ 42 - 0
newapp/chrome/content/install-shortcut.xul

@@ -1,6 +1,48 @@
 #filter substitution
 <?xml version="1.0"?>
 
+<!--
+# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# ***** 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 Mozilla Prism
+#
+# The Initial Developer of the Original Code is
+# Ben Goodger.
+# Portions created by the Initial Developer are Copyright (C) 2005
+# the Initial Developer. All Rights Reserved.
+#
+# Contributor(s):
+#   Matthew Gertner <matthew.gertner@gmail.com>
+#   Mark Finkle, <mark.finkle@gmail.com>, <mfinkle@mozilla.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 *****
+-->
+
+
 <?xml-stylesheet href="chrome://@PACKAGE@/skin/install-shortcut.css" type="text/css"?>
 
 <!DOCTYPE window SYSTEM "chrome://@PACKAGE@/locale/install-shortcut.dtd">

+ 35 - 24
newapp/modules/FaviconDownloader.jsm

@@ -1,27 +1,38 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.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 Mozilla.
- *
- * The Initial Developer of the Original Code is Mozilla Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2007
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Matthew Gertner <matthew@allpeers.com>
- *   Mark Finkle <mark.finkle@gmail.com>, <mfinkle@mozilla.com>
- *
- * ***** END LICENSE BLOCK ***** */
+/*
+# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# ***** 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 Mozilla Prism.
+#
+# Contributor(s):
+# Mark Finkle <mark.finkle@gmail.com>, <mfinkle@mozilla.com>
+# Matthew Gertner, <matthew.gertner@gmail.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 *****
+*/
 
 Components.utils.import("resource://prism/modules/ImageUtils.jsm");
 

+ 36 - 25
newapp/modules/ImageUtils.jsm

@@ -1,28 +1,39 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.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 Mozilla.
- *
- * The Initial Developer of the Original Code is Mozilla Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2007
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Matthew Gertner <matthew.gertner@gmail.com>
- *   Mark Finkle <mark.finkle@gmail.com>, <mfinkle@mozilla.com>
- *   Fredrik Larsson <nossralf@gmail.com>
- *
- * ***** END LICENSE BLOCK ***** */
+/*
+# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# ***** 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 Mozilla Prism.
+#
+# Contributor(s):
+# Mark Finkle <mark.finkle@gmail.com>, <mfinkle@mozilla.com>
+# Matthew Gertner, <matthew.gertner@gmail.com>
+# Fredrik Larsson <nossralf@gmail.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;

+ 36 - 25
newapp/modules/WebAppInstall.jsm

@@ -1,28 +1,39 @@
-/* ***** BEGIN LICENSE BLOCK *****
- * Version: MPL 1.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 WebRunner.
- *
- * The Initial Developer of the Original Code is Mozilla Corporation.
- * Portions created by the Initial Developer are Copyright (C) 2007
- * the Initial Developer. All Rights Reserved.
- *
- * Contributor(s):
- *   Mark Finkle <mark.finkle@gmail.com>, <mfinkle@mozilla.com>
- *   Cesar Oliveira <a.sacred.line@gmail.com>
- *   Matthew Gertner <matthew@allpeers.com>
- *
- * ***** END LICENSE BLOCK ***** */
+/*
+# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# ***** 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 Mozilla Prism.
+#
+# Contributor(s):
+# Mark Finkle <mark.finkle@gmail.com>, <mfinkle@mozilla.com>
+# Matthew Gertner, <matthew.gertner@gmail.com>
+# Cesar Oliveira <a.sacred.line@gmail.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 *****
+*/
 
 Components.utils.import("resource://prism/modules/ImageUtils.jsm");
 Components.utils.import("resource://prism/modules/WebAppProperties.jsm");

+ 38 - 0
newapp/modules/arch/LinuxShortcutCreator.jsm

@@ -1,3 +1,41 @@
+/*
+# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# ***** 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 Mozilla Prism.
+#
+# The Initial Developer of the Original Code is
+# Matthew Gertner
+#
+# Contributor(s):
+# Matthew Gertner, <matthew.gertner@gmail.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 *****
+*/
+
 EXPORTED_SYMBOLS = ["ShortcutCreator"];
 
 Components.utils.import("resource://prism/modules/ImageUtils.jsm");

+ 38 - 0
newapp/modules/arch/MacOSShortcutCreator.jsm

@@ -1,3 +1,41 @@
+/*
+# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# ***** 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 Mozilla Prism.
+#
+# The Initial Developer of the Original Code is
+# Matthew Gertner
+#
+# Contributor(s):
+# Matthew Gertner, <matthew.gertner@gmail.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 *****
+*/
+
 EXPORTED_SYMBOLS = ["ShortcutCreator"];
 
 Components.utils.import("resource://prism/modules/ImageUtils.jsm");

+ 38 - 0
newapp/modules/arch/WinShortcutCreator.jsm

@@ -1,3 +1,41 @@
+/*
+# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# ***** 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 Mozilla Prism.
+#
+# The Initial Developer of the Original Code is
+# Matthew Gertner
+#
+# Contributor(s):
+# Matthew Gertner, <matthew.gertner@gmail.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 *****
+*/
+
 EXPORTED_SYMBOLS = ["ShortcutCreator"];
 
 Components.utils.import("resource://prism/modules/ImageUtils.jsm");

+ 38 - 0
newapp/modules/consts.jsm

@@ -1,3 +1,41 @@
+/*
+# -*- Mode: Java; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
+# ***** 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 Mozilla Prism.
+#
+# The Initial Developer of the Original Code is
+# Matthew Gertner
+#
+# Contributor(s):
+# Matthew Gertner, <matthew.gertner@gmail.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 *****
+*/
+
 EXPORTED_SYMBOLS = [
   "PR_WRONLY", "PR_CREATE_FILE", "PR_TRUNCATE", "PR_PERMS_FILE", 
   "PR_PERMS_DIRECTORY", "PR_UINT32_MAX"];