[Pkg-mozext-commits] [automatic-save-folder] 69/133: Change : The ForceRadio choice now includes DownThemAll options

David Prévot taffit at moszumanska.debian.org
Mon Apr 27 20:33:53 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 7024f9a76b5c75c2b50c7e35d2dceb5fbc1f1b0b
Author: Cyan <Cyan at d0063192-6b2e-11de-89a9-0b20f3e2dceb>
Date:   Sun May 23 10:56:51 2010 +0000

    Change : The ForceRadio choice now includes DownThemAll options
    
    git-svn-id: http://automatic-save-folder.googlecode.com/svn/trunk@75 d0063192-6b2e-11de-89a9-0b20f3e2dceb
---
 content/asf.js              | 39 +++++++++++++++++++++++++++++++++++----
 content/asf_download.js     | 26 ++++++++++++++++++++++----
 content/options.xul         | 16 ++++++++++++++--
 defaults/preferences/asf.js |  3 ++-
 locale/en-US/about.dtd      |  2 +-
 locale/en-US/asf.dtd        |  9 +++++++--
 locale/fr/about.dtd         |  2 +-
 locale/fr/asf.dtd           |  9 +++++++--
 locale/it/about.dtd         |  2 +-
 locale/it/asf.dtd           |  9 +++++++--
 locale/ru/about.dtd         |  2 +-
 locale/ru/asf.dtd           |  9 +++++++--
 12 files changed, 105 insertions(+), 23 deletions(-)

diff --git a/content/asf.js b/content/asf.js
index 20973eb..7430d83 100644
--- a/content/asf.js
+++ b/content/asf.js
@@ -374,7 +374,9 @@ var automatic_save_folder = {
 		var viewpathlist = document.getElementById("asf-viewpathselect");
 		var dialogaccept = document.getElementById("asf-dialogaccept");
 		var dialogacceptFiltered = document.getElementById("asf-dialogacceptFiltered");
-		var dialogacceptForceSavefile = document.getElementById("asf-dialogacceptForceSavefile");
+		var dialogForceRadio_Start = document.getElementById("asf-dialogForceRadio_Start");
+		var dialogForceRadio_End = document.getElementById("asf-dialogForceRadio_End");
+		var dialogForceRadioTo = document.getElementById("asf-dialogForceRadioTo");
 		var useDownloadDir = document.getElementById("asf-useDownloadDir");
 		var asf_userightclick = document.getElementById("asf-userightclick");
 		var asf_rightclicktimeout = document.getElementById("asf-rightclicktimeout");
@@ -397,15 +399,30 @@ var automatic_save_folder = {
 		{
 			dialogacceptFiltered.checked = false;
 			dialogacceptFiltered.disabled = true;
-			dialogacceptForceSavefile.checked = false;
-			dialogacceptForceSavefile.disabled = true;			
+			dialogForceRadio_Start.checked = false;
+			dialogForceRadio_Start.disabled = true;
+			dialogForceRadio_End.disabled = true;
+			dialogForceRadioTo.disabled = true;
 		}
 		if (dialogaccept.checked == true)
 		{
 			dialogacceptFiltered.disabled = false;
-			dialogacceptForceSavefile.disabled = false;
+			dialogForceRadio_Start.disabled = false;
+			dialogForceRadio_End.disabled = false;
+			dialogForceRadioTo.disabled = false;
 		}
 		
+		// and fill the forceRadioTo menuItems
+			var forceRadioTo = this.prefManager.getCharPref("extensions.asf.dialogForceRadioTo");
+			var DownThemAll = this.DownThemAll();
+			if (DownThemAll)
+			{
+				document.getElementById("asf-dialogForceRadioToDownthemall").style.display = "block";
+				document.getElementById("asf-dialogForceRadioToTurbodta").style.display = "block";
+			}
+			if (!this.DownThemAll && (forceRadioTo == "downthemall" || forceRadioTo == "turbodta")) this.prefManager.setCharPref("extensions.asf.dialogForceRadioTo","save"); // default to "Save File" if DTA is uninstalled.
+		
+		
 		// if the option window is opened from the saving window, disable the autosave feature (Not working when set from here.)
 		if (window.opener.location == "chrome://mozapps/content/downloads/unknownContentType.xul")
 		{
@@ -825,6 +842,20 @@ var automatic_save_folder = {
 	},
 
 
+	DownThemAll: function() {
+		// Check for DTA add-on, if enabled return true. (works only on 3.x)
+		if (this.firefoxversion == 3)
+		{
+			var enabledItems = this.prefManager.getCharPref("extensions.enabledItems");
+			var dsort_GUUID = "{DDC359D1-844A-42a7-9AA1-88A850A938A8}";
+			var DTA = enabledItems.indexOf(dsort_GUUID,0);
+			
+			if (DTA >= 0) return true;
+		}
+		return false;
+	},
+
+
 	readHiddenPref: function(pref_place, type, ret) {
 		try 
 		{
diff --git a/content/asf_download.js b/content/asf_download.js
index 17a621b..dfc347c 100644
--- a/content/asf_download.js
+++ b/content/asf_download.js
@@ -229,10 +229,12 @@ Copyright (C) 2007-2010 Éric Cassar (Cyan).
 		if (dialogaccept)
 		{
 			// select "Save file" automatically
-			if (this.prefManager.getBoolPref("extensions.asf.dialogacceptForceSavefile"))
+			if (this.prefManager.getBoolPref("extensions.asf.dialogForceRadio"))
 			{
-				var radiosavemode = document.getElementById("mode");
-				radiosavemode.selectedItem = document.getElementById("save");
+				var radioSavemode = document.getElementById("mode");
+				var forceRadioTo = this.prefManager.getCharPref("extensions.asf.dialogForceRadioTo");
+				if (!this.DownThemAll && (forceRadioTo == "downthemall" || forceRadioTo == "turbodta")) forceRadioTo = "save"; // default to "Save File" if DTA is uninstalled.
+				radioSavemode.selectedItem = document.getElementById(forceRadioTo);
 				//alert(document.getElementById("save").selected);
 			}
 			window.close();
@@ -997,7 +999,23 @@ Copyright (C) 2007-2010 Éric Cassar (Cyan).
 		{
 			return ret; // return default value if pref doesn't exist
 		} 
-	}
+	},
+
+
+	DownThemAll: function() {
+		// Check for DTA add-on, if enabled return true. (works only on 3.x)
+		if (this.firefoxversion == 3)
+		{
+			var enabledItems = this.prefManager.getCharPref("extensions.enabledItems");
+			var dsort_GUUID = "{DDC359D1-844A-42a7-9AA1-88A850A938A8}";
+			var DTA = enabledItems.indexOf(dsort_GUUID,0);
+			
+			if (DTA >= 0) return true;
+		}
+		return false;
+	},
+
+	
 };
 
 	addEventListener( // Autoload
diff --git a/content/options.xul b/content/options.xul
index 60de174..3a81098 100644
--- a/content/options.xul
+++ b/content/options.xul
@@ -33,7 +33,8 @@
 		<preference id="asf_variablemode" name="extensions.asf.variablemode" type="bool"/>
 		<preference id="asf_dialogaccept" name="extensions.asf.dialogaccept" type="bool"/>
 		<preference id="asf_dialogacceptFiltered" name="extensions.asf.dialogacceptFiltered" type="bool"/>
-		<preference id="asf_dialogacceptForceSavefile" name="extensions.asf.dialogacceptForceSavefile" type="bool"/>
+		<preference id="asf_dialogForceRadio" name="extensions.asf.dialogForceRadio" type="bool"/>
+		<preference id="asf_dialogForceRadioTo" name="extensions.asf.dialogForceRadioTo" type="string"/>
 		<preference id="asf_userightclick" name="extensions.asf.userightclick" type="bool"/>
 		<preference id="asf_rightclicktimeout" name="extensions.asf.rightclicktimeout" type="bool"/>
 		<preference id="asf_usecurrenturl" name="extensions.asf.usecurrenturl" type="bool"/>
@@ -156,7 +157,18 @@
 			</hbox>
 			<checkbox id="asf-dialogaccept" preference="asf_dialogaccept" label="&asf.dialogaccept.bool;" oncommand="automatic_save_folder.toggle_options();"/>
 			<checkbox id="asf-dialogacceptFiltered" preference="asf_dialogacceptFiltered" label="&asf.dialogacceptFiltered.bool;" tooltip="tooltip_dialogacceptFiltered" style="margin-left:25px;"/>
-			<checkbox id="asf-dialogacceptForceSavefile" preference="asf_dialogacceptForceSavefile" label="&asf.dialogacceptForceSavefile.bool;" style="margin-left:25px;"/>
+			<hbox>
+				<checkbox id="asf-dialogForceRadio_Start" preference="asf_dialogForceRadio" label="&asf.dialogForceRadio_Start.bool;" style="margin-left:25px;"/>
+				<menulist id="asf-dialogForceRadioTo" preference="asf_dialogForceRadioTo" >
+					<menupopup>
+						<menuitem value="open" 			label="&asf.dialogForceRadioTo.label1;"></menuitem>
+						<menuitem value="downthemall" 	label="&asf.dialogForceRadioTo.label2;" id="asf-dialogForceRadioToDownthemall" style="display:none;"></menuitem>
+						<menuitem value="turbodta" 		label="&asf.dialogForceRadioTo.label3;" id="asf-dialogForceRadioToTurbodta" style="display:none;"></menuitem>
+						<menuitem value="save" 			label="&asf.dialogForceRadioTo.label4;"></menuitem>
+					</menupopup>
+				</menulist>
+				<label id="asf-dialogForceRadio_End">&asf.dialogForceRadio_End.bool;</label>
+			</hbox>
 			<hbox>
 				<checkbox id="asf-viewdloption" preference="asf_viewdloption" label="&asf.viewdloption.bool;" tooltip="tooltip_viewdloption" oncommand="automatic_save_folder.toggle_options();"/>
 				<menulist id="asf-viewdloptionType" preference="asf_viewdloptionType">
diff --git a/defaults/preferences/asf.js b/defaults/preferences/asf.js
index e559790..20d7040 100644
--- a/defaults/preferences/asf.js
+++ b/defaults/preferences/asf.js
@@ -17,7 +17,8 @@ pref("extensions.asf at mangaheart.org.description", "chrome://asf/locale/asf.prope
  pref("browser.download.folderList", 2);
  pref("extensions.asf.dialogaccept", false);
  pref("extensions.asf.dialogacceptFiltered", false);
- pref("extensions.asf.dialogacceptForceSavefile", false);
+ pref("extensions.asf.dialogForceRadio", false);
+ pref("extensions.asf.dialogForceRadioTo", "save");
  pref("extensions.asf.userightclick", true);
  pref("extensions.asf.rightclicktimeout", true);
  pref("browser.download.saveLinkAsFilenameTimeout", 0); // set the default value to userpref.js to prevent main pref.js modification and restore default value on ASF uninstall.
diff --git a/locale/en-US/about.dtd b/locale/en-US/about.dtd
index 820281a..3211416 100644
--- a/locale/en-US/about.dtd
+++ b/locale/en-US/about.dtd
@@ -1,5 +1,5 @@
 <!-- ASF -->
-<!ENTITY asf.version "1.0.2b Rev74">
+<!ENTITY asf.version "1.0.2b Rev75">
 
 <!-- Mini about box from addon manager -->
 <!ENTITY about "About Automatic Save Folder">
diff --git a/locale/en-US/asf.dtd b/locale/en-US/asf.dtd
index 27bcfc4..2f3bf36 100644
--- a/locale/en-US/asf.dtd
+++ b/locale/en-US/asf.dtd
@@ -1,5 +1,5 @@
 <!-- ASF -->
-<!ENTITY asf.version "1.0.2b Rev74">
+<!ENTITY asf.version "1.0.2b Rev75">
 
 <!-- browser and save dialog-->
 <!ENTITY prefwindow.title "Automatic Save Folder Preferences">
@@ -43,7 +43,12 @@
 <!ENTITY asf.dialogaccept.bool "Automatically accept the "What should Firefox do with this file" dialog windows.">
 <!ENTITY asf.dialogacceptFiltered.bool "Only if a filter is found">
 <!ENTITY asf.dialogacceptFiltered.tooltip "Will not automatically accept the "What should Firefox do with this file" dialog windows if no filter matches.">
-<!ENTITY asf.dialogacceptForceSavefile.bool "Force the radio choice to "Save File" before automatically accepting the save dialog.">
+<!ENTITY asf.dialogForceRadio_Start.bool "Force the radio choice to">
+<!ENTITY asf.dialogForceRadioTo.label1 "Open with">
+<!ENTITY asf.dialogForceRadioTo.label2 "DownThemAll!">
+<!ENTITY asf.dialogForceRadioTo.label3 "dTa OneClick!">
+<!ENTITY asf.dialogForceRadioTo.label4 "Save File">
+<!ENTITY asf.dialogForceRadio_End.bool "before automatically accepting the save dialog.">
 <!ENTITY asf.viewdloption.bool "View options when downloading">
 <!ENTITY asf.viewdloption.tooltip "Allow you to see the last two destination folders and a link to add or edit the filters">
 <!ENTITY asf.viewdloptionType0.label "Always show">
diff --git a/locale/fr/about.dtd b/locale/fr/about.dtd
index 99ac156..6beef9d 100644
--- a/locale/fr/about.dtd
+++ b/locale/fr/about.dtd
@@ -1,5 +1,5 @@
 <!-- ASF -->
-<!ENTITY asf.version "1.0.2b Rev74">
+<!ENTITY asf.version "1.0.2b Rev75">
 
 <!-- Mini about box from addon manager -->
 <!ENTITY about "À Propos d'Automatic save folder">
diff --git a/locale/fr/asf.dtd b/locale/fr/asf.dtd
index 50f17c1..eae354c 100644
--- a/locale/fr/asf.dtd
+++ b/locale/fr/asf.dtd
@@ -1,5 +1,5 @@
 <!-- ASF -->
-<!ENTITY asf.version "1.0.2b Rev74">
+<!ENTITY asf.version "1.0.2b Rev75">
 
 <!-- browser and save dialog-->
 <!ENTITY prefwindow.title "Préférences pour Automatic Save Folder">
@@ -43,7 +43,12 @@
 <!ENTITY asf.dialogaccept.bool "Valider automatiquement la fenêtre "Que doit faire Firefox avec ce fichier ?".">
 <!ENTITY asf.dialogacceptFiltered.bool "Seulement si un filtre est trouvé">
 <!ENTITY asf.dialogacceptFiltered.tooltip "Ne valide pas automatiquement la fenêtre "Que doit faire Firefox avec ce fichier ?" si aucun filtre ne correspond.">
-<!ENTITY asf.dialogacceptForceSavefile.bool "Forcer le choix sur "Enregistrer le fichier" avant de valider automatiquement la fenêtre d'enregistrement.">
+<!ENTITY asf.dialogForceRadio_Start.bool "Forcer le choix sur">
+<!ENTITY asf.dialogForceRadioTo.label1 "Ouvrir avec">
+<!ENTITY asf.dialogForceRadioTo.label2 "DownThemAll!">
+<!ENTITY asf.dialogForceRadioTo.label3 "dTa OneClick!">
+<!ENTITY asf.dialogForceRadioTo.label4 "Enregistrer le fichier">
+<!ENTITY asf.dialogForceRadio_End.bool "avant de valider automatiquement la fenêtre d'enregistrement.">
 <!ENTITY asf.viewdloption.bool "Afficher les options lors de l'enregistrement">
 <!ENTITY asf.viewdloption.tooltip "Permet de voir les deux derniers dossiers d'enregistrement et un lien pour éditer ou ajouter de nouveaux filtres.">
 <!ENTITY asf.viewdloptionType0.label "Toujours afficher">
diff --git a/locale/it/about.dtd b/locale/it/about.dtd
index e8ba6a2..71283bb 100644
--- a/locale/it/about.dtd
+++ b/locale/it/about.dtd
@@ -1,5 +1,5 @@
 <!-- ASF -->
-<!ENTITY asf.version "1.0.2b Rev74">
+<!ENTITY asf.version "1.0.2b Rev75">
 
 <!-- Mini about box from addon manager -->
 <!ENTITY about "Informazioni su Automatic Save Folder">
diff --git a/locale/it/asf.dtd b/locale/it/asf.dtd
index c31e68f..e7a41b6 100644
--- a/locale/it/asf.dtd
+++ b/locale/it/asf.dtd
@@ -1,5 +1,5 @@
 <!-- ASF -->
-<!ENTITY asf.version "1.0.2b Rev74">
+<!ENTITY asf.version "1.0.2b Rev75">
 
 <!-- browser and save dialog-->
 <!ENTITY prefwindow.title "Preferenze di Automatic Save Folder">
@@ -43,7 +43,12 @@
 <!ENTITY asf.dialogaccept.bool "Automatically accept the "What should Firefox do with this file" dialog windows.">
 <!ENTITY asf.dialogacceptFiltered.bool "Only if a filter is found">
 <!ENTITY asf.dialogacceptFiltered.tooltip "Will not automatically accept the "What should Firefox do with this file" dialog windows if no filter matches.">
-<!ENTITY asf.dialogacceptForceSavefile.bool "Force the radio choice to "Save File" before automatically accepting the save dialog.">
+<!ENTITY asf.dialogForceRadio_Start.bool "Force the radio choice to">
+<!ENTITY asf.dialogForceRadioTo.label1 "Open with">
+<!ENTITY asf.dialogForceRadioTo.label2 "DownThemAll!">
+<!ENTITY asf.dialogForceRadioTo.label3 "dTa OneClick!">
+<!ENTITY asf.dialogForceRadioTo.label4 "Save File">
+<!ENTITY asf.dialogForceRadio_End.bool "before automatically accepting the save dialog.">
 <!ENTITY asf.viewdloption.bool "Vedere le opzioni mentre scarica">
 <!ENTITY asf.viewdloption.tooltip "permette di vedere le due ultime cartelle di destinazione e un collegamento per aggiungere o modificare filtri.">
 <!ENTITY asf.viewdloptionType0.label "Always show">
diff --git a/locale/ru/about.dtd b/locale/ru/about.dtd
index 1645ece..69e2232 100644
--- a/locale/ru/about.dtd
+++ b/locale/ru/about.dtd
@@ -1,5 +1,5 @@
 <!-- ASF -->
-<!ENTITY asf.version "1.0.2b Rev74">
+<!ENTITY asf.version "1.0.2b Rev75">
 
 <!-- Mini about box from addon manager -->
 <!ENTITY about "О Automatic Save Folder">
diff --git a/locale/ru/asf.dtd b/locale/ru/asf.dtd
index 09f9237..6562402 100644
--- a/locale/ru/asf.dtd
+++ b/locale/ru/asf.dtd
@@ -1,5 +1,5 @@
 <!-- ASF -->
-<!ENTITY asf.version "1.0.2b Rev74">
+<!ENTITY asf.version "1.0.2b Rev75">
 
 <!-- browser and save dialog-->
 <!ENTITY prefwindow.title "Настройки Automatic Save Folder">
@@ -43,7 +43,12 @@
 <!ENTITY asf.dialogaccept.bool "Автоматически использовать настройку  "Как FireFox следует обработать это файл".">
 <!ENTITY asf.dialogacceptFiltered.bool "Только если найден фильтр">
 <!ENTITY asf.dialogacceptFiltered.tooltip "Не будет автоматически использовать настройку "Как FireFox следует обработать это файл" если не найдено подходящего фильтра.">
-<!ENTITY asf.dialogacceptForceSavefile.bool "Force the radio choice to "Save File" before automatically accepting the save dialog.">
+<!ENTITY asf.dialogForceRadio_Start.bool "Force the radio choice to">
+<!ENTITY asf.dialogForceRadioTo.label1 "Open with">
+<!ENTITY asf.dialogForceRadioTo.label2 "DownThemAll!">
+<!ENTITY asf.dialogForceRadioTo.label3 "dTa OneClick!">
+<!ENTITY asf.dialogForceRadioTo.label4 "Save File">
+<!ENTITY asf.dialogForceRadio_End.bool "before automatically accepting the save dialog.">
 <!ENTITY asf.viewdloption.bool "Показывать опции при загрузке">
 <!ENTITY asf.viewdloption.tooltip "Показывать две последних использованных папки и кнопку для добавления и редактирования фильтров">
 <!ENTITY asf.viewdloptionType0.label "Всегда показывать">

-- 
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