Bug 714272: icon does not appear in Download preferences pane if default download location is "Desktop", r=jared
authorGavin Sharp <gavin@gavinsharp.com>
Tue, 17 Jan 2012 12:12:53 -0800
changeset 85973 8ae60977fefffb3ec650a267936210d4b9dd9b18
parent 85972 7087bb2ced148327594d06b2bd89a6994db8c086
child 85974 546e69d2fe66a6f69e1e3e6fb388a447b49d1ff4
push id805
push userakeybl@mozilla.com
push dateWed, 01 Feb 2012 18:17:35 +0000
treeherdermozilla-aurora@6fb3bf232436 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjared
bugs714272
milestone12.0a1
Bug 714272: icon does not appear in Download preferences pane if default download location is "Desktop", r=jared
browser/components/preferences/main.js
--- a/browser/components/preferences/main.js
+++ b/browser/components/preferences/main.js
@@ -366,17 +366,17 @@ var gMainPane = {
       // With 3.0, a new desktop folder - 'Downloads' was introduced for
       // platforms and versions that don't support a default system downloads
       // folder. See nsDownloadManager for details. 
       downloadFolder.label = bundlePreferences.getString("downloadsFolderName");
       iconUrlSpec = fph.getURLSpecFromFile(this._indexToFolder(1));
     } else {
       // 'Desktop'
       downloadFolder.label = bundlePreferences.getString("desktopFolderName");
-      iconUrlSpec = fph.getURLSpecFromFile(desk);
+      iconUrlSpec = fph.getURLSpecFromFile(this._getDownloadsFolder("Desktop"));
     }
     downloadFolder.image = "moz-icon://" + iconUrlSpec + "?size=16";
     
     // don't override the preference's value in UI
     return undefined;
   },
 
   /**