49 Components.utils.import(
"resource://app/jsmodules/StringUtils.jsm");
59 if (typeof(
Cc) ==
"undefined")
60 var
Cc = Components.classes;
61 if (typeof(
Ci) ==
"undefined")
62 var
Ci = Components.interfaces;
63 if (typeof(
Cr) ==
"undefined")
64 var
Cr = Components.results;
65 if (typeof(
Cu) ==
"undefined")
66 var
Cu = Components.utils;
102 doLoad:
function importLibrary_doLoad() {
104 this._dialogPB =
window.arguments[0].QueryInterface(Ci.nsIDialogParamBlock);
105 this._importType = this._dialogPB.GetString(0);
108 this._dialogPB.SetString(0,
"false");
111 var libraryImporterManager =
112 Cc[
"@songbirdnest.com/Songbird/LibraryImporterManager;1"]
113 .getService(Ci.sbILibraryImporterManager);
114 var libraryImporter = libraryImporterManager.defaultLibraryImporter;
115 if (!libraryImporter) {
121 if ((this._importType ==
"manual") &&
122 !libraryImporter.libraryPreviouslyImported) {
123 this._importType =
"manual_first_import";
129 var queryDescElem = document.getElementById(
"import_library_query");
131 (
"import_library.dialog_query." + this._importType,
133 var userQueryNode = document.createTextNode(userQuery);
134 queryDescElem.appendChild(userQueryNode);
137 importLibraryPrefsUI.initialize();
140 importLibraryPrefsUI.readPrefs();
148 doAccept:
function importLibrary_doAccept() {
150 importLibraryPrefsUI.writePrefs();
153 this._dialogPB.SetString(0,
"true");
function onExit(skipSave)
onExit handler, saves window size and position before closing the window.
function SBBrandedFormattedString(aKey, aParams, aDefault, aStringBundle)