Compare Revisions

XULRunner tips

Revision 109112:

Revision 109112 by Arendjr on

Revision 109113:

Revision 109113 by Markluffel on

Title:
XULRunner tips
XULRunner tips
Slug:
XULRunner_tips
XULRunner_tips
Tags:
XUL, XULRunner
XUL, XULRunner
Content:

Revision 109112
Revision 109113
tt169    <p>
170      <br>
171    </p>
172    <h2 name="Preferences_needed_for_file_download_dialogs">
173      Preferences needed for file download dialogs
174    </h2>
175    <p>
176      To use the unknown-content-type and file-downloads dialogs 
 >from a &lt;browser&gt; element, you need to add the following pre
 >fs:
177    </p>
178    <pre class="eval">
179pref("browser.download.useDownloadDir", true);
180pref("browser.download.folderList", 0);
181pref("browser.download.manager.showAlertOnComplete", true);
182pref("browser.download.manager.showAlertInterval", 2000);
183pref("browser.download.manager.retention", 2);
184pref("browser.download.manager.showWhenStarting", true);
185pref("browser.download.manager.useWindow", true);
186pref("browser.download.manager.closeWhenDone", true);
187pref("browser.download.manager.openDelay", 0);
188pref("browser.download.manager.focusWhenStarting", false);
189pref("browser.download.manager.flashCount", 2);
190//
191pref("alerts.slideIncrement", 1);
192pref("alerts.slideIncrementTime", 10);
193pref("alerts.totalOpenTime", 4000);
194pref("alerts.height", 50);
195</pre>
196    <p>
197      If you are missing preferences that a dialog requires, you 
 >will get the following errors:
198    </p>
199    <pre class="eval">
200Component returned failure code: 0x8000ffff (NS_ERROR_UNEXPECTED)
 > [nsIPrefBranch.getBoolPref]
201 
202Error: dialog has no properties
203Source File: chrome://mozapps/content/downloads/unknownContentTyp
 >e.xul
204Line: 1
205</pre>

Back to History