[Pkg-mozext-commits] [automatic-save-folder] 29/133: Fix : - Force browser.download.folderList to 2 when "don't show file explorer" is disabled. - Forgot this file on last commit after I renamed the main function to "main()"

David Prévot taffit at moszumanska.debian.org
Mon Apr 27 20:33:49 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch wip
in repository automatic-save-folder.

commit 3c22d1a7616a733c9526fd907e0c043b421ba3b3
Author: Cyan <Cyan at d0063192-6b2e-11de-89a9-0b20f3e2dceb>
Date:   Mon Nov 9 17:58:19 2009 +0000

    Fix :
    - Force browser.download.folderList to 2 when "don't show file explorer" is disabled.
    - Forgot this file on last commit after I renamed the main function to "main()"
    
    git-svn-id: http://automatic-save-folder.googlecode.com/svn/trunk@29 d0063192-6b2e-11de-89a9-0b20f3e2dceb
---
 content/asf.js | 37 +++++++++++++++++++++++++------------
 1 file changed, 25 insertions(+), 12 deletions(-)

diff --git a/content/asf.js b/content/asf.js
index 6ae4915..af816d2 100644
--- a/content/asf.js
+++ b/content/asf.js
@@ -200,22 +200,35 @@ var automatic_save_folder = {
 	
 	
 	toggle_options: function () {  // called whenever the Options tab is selected
-		var select_option = document.getElementById("asf-viewdloption");
-		var select_list = document.getElementById("asf-viewpathselect");
+		var viewdloption = document.getElementById("asf-viewdloption");
+		var viewpathlist = document.getElementById("asf-viewpathselect");
 		var dialogaccept = document.getElementById("asf-dialogaccept");
+		var useDownloadDir = document.getElementById("asf-useDownloadDir");
+		
+		// check if autosave is selected, if not : set the saving path to "filtered" and disable the dropdown menu.
+		if (useDownloadDir.checked == false)
+		{
+			document.getElementById("asf-folderList").value = 2;
+			document.getElementById("asf-folderList").disabled = true;
+			this.prefManager.setIntPref("browser.download.folderList",2);
+		}
+		if (useDownloadDir.checked == true)
+		{
+			document.getElementById("asf-folderList").disabled = false;			
+		}
 		
 		// if the option is opened from the saving window, disable the autosave feature (Not working when set from here.)
 		dialogaccept.disabled = (window.opener.location == "chrome://mozapps/content/downloads/unknownContentType.xul") ? true : false ;
 		
-		if (select_option.checked == false)
-			{
-				select_list.checked = false;
-				select_list.disabled = true;
-			}
-		if (select_option.checked == true)
-			{
-				select_list.disabled = false;
-			}
+		if (viewdloption.checked == false)
+		{
+			viewpathlist.checked = false;
+			viewpathlist.disabled = true;
+		}
+		if (viewdloption.checked == true)
+		{
+			viewpathlist.disabled = false;
+		}
 			
 		// Check the right-click feature here, and prints text according to Firefox version and active addons
 		// hide all the descriptions box, and unhide the needed one 
@@ -630,7 +643,7 @@ var automatic_save_folder = {
 		window.close();
 		if (window.opener.location == "chrome://mozapps/content/downloads/unknownContentType.xul") // if the option is opened from the saving window
 		{ 	
-			window.opener.automatic_save_folder.asf_setdir();		// rescan the filters to set the good folder
+			window.opener.automatic_save_folder.main();		// rescan the filters to set the good folder
 			window.opener.sizeToContent();
 		}		
 		window.opener.focus;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/automatic-save-folder.git



More information about the Pkg-mozext-commits mailing list