diff --git a/toolkit/components/apppicker/content/appPicker.js b/toolkit/components/apppicker/content/appPicker.js
index 8905d5a4693..e534c2bde3d 100644
--- a/toolkit/components/apppicker/content/appPicker.js
+++ b/toolkit/components/apppicker/content/appPicker.js
@@ -89,20 +89,7 @@ AppPicker.prototype =
// Grab a list of nsILocalHandlerApp application helpers to list
var fileList = mimeInfo.possibleLocalHandlers;
- /*
-
-
-
-
-
-
-
-
-
-
- */
-
- var list = document.getElementById("app-picker-list");
+ var list = document.getElementById("app-picker-listbox");
var primaryCount = 0;
@@ -121,32 +108,11 @@ AppPicker.prototype =
continue;
}
- var item = document.createElement("richlistitem");
- item.setAttribute("id", "app-picker-item");
- item.value = file;
- item.label = this.getFileDisplayName(file.executable);
- item.setAttribute("ondblclick", "g_dialog.appDoubleClick();");
-
- var hbox1 = document.createElement("hbox");
- hbox1.setAttribute("align", "center");
-
- var image = document.createElement("image");
- image.setAttribute("id", "app-picker-item-image");
- image.setAttribute("src", this.getFileIconURL(file.executable));
-
- var vbox1 = document.createElement("vbox");
- var hbox2 = document.createElement("hbox");
- hbox2.setAttribute("align", "center");
-
- var cell = document.createElement("listcell");
- cell.setAttribute("id", "app-picker-item-cell");
- cell.setAttribute("label", this.getFileDisplayName(file.executable));
-
- hbox2.appendChild(cell);
- vbox1.appendChild(hbox2);
- hbox1.appendChild(image);
- hbox1.appendChild(vbox1);
- item.appendChild(hbox1);
+ var item = document.createElement("listitem");
+ item.className = "listitem-iconic";
+ item.handlerApp = file;
+ item.setAttribute("label", this.getFileDisplayName(file.executable));
+ item.setAttribute("image", this.getFileIconURL(file.executable));
list.appendChild(item);
primaryCount++;
@@ -206,7 +172,7 @@ AppPicker.prototype =
* Double click accepts an app
*/
appDoubleClick: function appDoubleClick() {
- var list = document.getElementById("app-picker-list");
+ var list = document.getElementById("app-picker-listbox");
var selItem = list.selectedItem;
if (!selItem) {
@@ -214,7 +180,7 @@ AppPicker.prototype =
return true;
}
- this._incomingParams.handlerApp = selItem.value;
+ this._incomingParams.handlerApp = selItem.handlerApp;
window.close();
return true;
@@ -223,14 +189,14 @@ AppPicker.prototype =
appPickerOK: function appPickerOK() {
if (this._incomingParams.handlerApp) return true;
- var list = document.getElementById("app-picker-list");
+ var list = document.getElementById("app-picker-listbox");
var selItem = list.selectedItem;
if (!selItem) {
this._incomingParams.handlerApp = null;
return true;
}
- this._incomingParams.handlerApp = selItem.value;
+ this._incomingParams.handlerApp = selItem.handlerApp;
return true;
},
diff --git a/toolkit/components/apppicker/content/appPicker.xul b/toolkit/components/apppicker/content/appPicker.xul
index 2f1baabfcff..89a80746b3b 100644
--- a/toolkit/components/apppicker/content/appPicker.xul
+++ b/toolkit/components/apppicker/content/appPicker.xul
@@ -41,7 +41,9 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
+
-
+
-
-
-
-
-
+
diff --git a/toolkit/themes/winstripe/global/appPicker.css b/toolkit/themes/winstripe/global/appPicker.css
index 690c15687eb..561333ee500 100644
--- a/toolkit/themes/winstripe/global/appPicker.css
+++ b/toolkit/themes/winstripe/global/appPicker.css
@@ -1,39 +1,20 @@
#app-picker {
- width:320px !important;
- max-width:320px !important;
+ width: 320px;
}
#content-description {
- font-weight:bold;
+ font-weight: bold;
}
-#suggested-filename {
- font-weight:normal;
+#content-icon,
+.listcell-icon {
+ height: 32px;
+ width: 32px;
}
-#file-info {
+#content-icon,
+.listcell-icon,
+.listcell-label {
+ margin: 5px;
}
-
-#app-picker-list {
- height:225px;
- min-height:225px;
-}
-
-#app-picker-item {
- padding-bottom:5px;
- padding-top:5px;
-}
-
-#app-picker-item-image {
-}
-
-#app-picker-item-cell {
- font-weight:normal;
- padding-right:10px;
- padding-left:10px;
-}
-
-#browse-button {
- margin-top:10px;
-}
\ No newline at end of file