Dont reindex already indexed files. Yet another bug uncovered by the DateTime fixes.
[beagle.git] / mozilla-extension / content / jslib / install / uninstall.xul
blob9fc59e89b5dad2b91936d28cf4fd8f8bcac40c1c
1 <?xml version="1.0"?>
3 <!--
5 The contents of this file are subject to the Mozilla Public
6 License Version 1.1 (the "License"); you may not use this file
7 except in compliance with the License. You may obtain a copy of
8 the License at http://www.mozilla.org/MPL/
10 Software distributed under the License is distributed on an "AS
11 IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
12 implied. See the License for the specific language governing
13 rights and limitations under the License.
15 The Original Code is Mozdev Group, Inc. code.
16 The Initial Developer of the Original Code is Mozdev Group, Inc.
18 Portions created by Mozdev Group, Inc. are
19 Copyright (C) 2003 Mozdev Group, Inc. All
20 Rights Reserved.
22 Original Author: Pete Collins <pete@mozdev.org>
23 Contributor(s):
25 -->
27 <!-- ***************** STYLE SHEET ****************** -->
28 <?xml-stylesheet href="chrome://global/skin/" type="text/css"?>
29 <?xml-stylesheet href="chrome://beagle/content/jslib/install/uninstall.css" type="text/css"?>
30 <!-- ***************** STYLE SHEET ****************** -->
32 <!DOCTYPE wizard>
34 <wizard id="uninstallWizard"
35 title="Uninstall Wizard"
36 xmlns:html="http://www.w3.org/1999/xhtml"
37 xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
38 xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
39 onwizardcancel="// return onCancel();"
40 onwizardfinish="finish();"
41 onload="initWizard();">
43 <script type="application/x-javascript" src="chrome://beagle/content/jslib/jslib.js" />
45 <script>
46 <![CDATA[
47 include (jslib_routines);
48 include (jslib_uninstall);
49 var gPackageName = window.arguments[0];
50 var gInstallCallback = window.arguments[1];
51 var gUninstall = new Uninstall(gPackageName, gInstallCallback);
53 function initWizard()
55 document.documentElement.pageIndex = 0;
57 gUninstall.generateUninstallInfo();
59 const msg1 = "The package ";
60 const msg2 = " will be removed.";
61 var text = document.createTextNode(msg1 + gUninstall.packageDisplayName + msg2);
62 document.getElementById("uninstallText").appendChild(text);
65 function uninstallPackage ()
67 jslibDebug("uninstallPackage");
68 gUninstall.closeOpenWindows();
70 var wizard = document.getElementById("uninstallWizard");
71 wizard.canRewind = false;
72 wizard.canAdvance = false;
74 var pmeter = document.getElementById("uninstallProgress");
76 gUninstall.uninstallPackage();
80 function finish ()
82 gUninstall.finish();
85 function displayFilesToDelete()
87 document.getElementById("showFilesButton").hidden = true;
88 document.getElementById("filesBlock").hidden = false;
90 var listbox = document.getElementById("filesList");
92 var files = gUninstall.filesToDelete;
93 for (var t=0; t<files.length; t++){
94 try {
95 var filename = files[t].leafName;
96 listbox.appendItem(filename,filename);
98 catch (ex){ jslibDebug(ex); }
102 </script>
104 <wizardpage pageid="page1" next="page2" label="Uninstall">
105 <description id="uninstallText" class="text"/>
106 <separator/>
107 <description id="uninstallText2" class="text">
108 All open windows will be closed before the package is removed.
109 </description>
110 <separator/>
111 <hbox>
112 <button id="showFilesButton" label="Show files to be deleted"
113 oncommand="displayFilesToDelete();" />
114 </hbox>
115 <vbox id="filesBlock" hidden="true" flex="1">
116 <label value="Files to be deleted:"/>
117 <listbox id="filesList" flex="1"/>
118 </vbox>
119 </wizardpage>
121 <wizardpage pageid="page2" label="Uninstall"
122 onpageshow="uninstallPackage();">
123 <label id="progressText" class="text" value="Uninstalling general data" />
124 <progressmeter id="uninstallProgress" value="0" />
125 </wizardpage>
126 </wizard>