[Pkg-mozext-commits] [automatic-save-folder] 13/133: Fix : * path selection on Add&edit window fixed. * Added a check for Firefox 2.x to disable right-click and display a message to update to Firefox 3.x (Firefox 2 doesn't use PrivateBrowsing which conflict with right-click functionality)
David Prévot
taffit at moszumanska.debian.org
Mon Apr 27 20:33:48 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 a9131f8fbc745e3efc9f50d78a02d6c946c040b8
Author: Cyan <Cyan at d0063192-6b2e-11de-89a9-0b20f3e2dceb>
Date: Wed Sep 23 18:50:42 2009 +0000
Fix :
* path selection on Add&edit window fixed.
* Added a check for Firefox 2.x to disable right-click and display a message to update to Firefox 3.x
(Firefox 2 doesn't use PrivateBrowsing which conflict with right-click functionality)
git-svn-id: http://automatic-save-folder.googlecode.com/svn/trunk@13 d0063192-6b2e-11de-89a9-0b20f3e2dceb
---
content/asf.js | 24 +++++++++++++++++-------
content/asf_addedit.js | 2 +-
content/asf_right_click.js | 12 ++++--------
content/options.xul | 1 +
locale/en-US/asf.dtd | 5 +++--
locale/fr-FR/asf.dtd | 9 +++++----
locale/it-IT/asf.dtd | 5 +++--
locale/it-IT/to translate.txt | 2 +-
8 files changed, 35 insertions(+), 25 deletions(-)
diff --git a/content/asf.js b/content/asf.js
index 4bf9c56..9736b28 100644
--- a/content/asf.js
+++ b/content/asf.js
@@ -30,22 +30,22 @@ var automatic_save_folder = {
.getService(Components.interfaces.nsIStringBundleService)
.createBundle("chrome://asf/locale/asf.properties"),
+ firefoxversion : "",
asf_load: function () {
- var firefoxversion = "";
if(this.versionChecker.compare(this.appInfo.version, "3.0") >= 0)
{
- firefoxversion = "3";
+ this.firefoxversion = "3";
}
else
{
- firefoxversion = "2";
+ this.firefoxversion = "2";
}
// init the preference for firefox 3
- if (firefoxversion == "3")
+ if (this.firefoxversion == "3")
{
// set lastdir to "enable" if the user just updated from previous version and had it disabled
var lastdir = document.getElementById("asf-lasdir");
@@ -224,8 +224,18 @@ var automatic_save_folder = {
// Print informations about Download sort conflict with right-click
// And disable the checkbox
document.getElementById("asf-rightclickdesc-DSort").hidden = true;
- var Dsort_installed = this.DownloadSort();
- if (Dsort_installed)
+ document.getElementById("asf-rightclickdesc-ff2").hidden = true;
+ var Dsort_installed = this.DownloadSort();
+
+ if (this.firefoxversion == 2) // display a message "right click disabled on Firefox 2, update to Firefox 3)
+ {
+ var asf_rightclick = document.getElementById("asf-rightclick");
+ asf_rightclick.disabled = true;
+
+ document.getElementById("asf-rightclickdesc").hidden = true;
+ document.getElementById("asf-rightclickdesc-ff2").hidden = false;
+ }
+ if (Dsort_installed && this.firefoxversion ==3) // if Firefox 3 + Download sort, display a message "right click disabled"
{
var asf_rightclick = document.getElementById("asf-rightclick");
asf_rightclick.disabled = true;
@@ -594,7 +604,7 @@ var automatic_save_folder = {
//save the rightclick (set timeout for header(Content-Disposition:) true = 0, false = 1000)
// Only if DownloadSort is not enabled (prevent conflict)
var Dsort_installed = this.DownloadSort();
- if (Dsort_installed == false)
+ if ((Dsort_installed == false) && this.firefoxversion == 3) // only for firefox 3, Firefox2 doesn't use rightclick
{
var rightclick = document.getElementById("asf-rightclick").checked;
this.prefManager.setIntPref("browser.download.saveLinkAsFilenameTimeout", rightclick == true ? 0 : 1000);
diff --git a/content/asf_addedit.js b/content/asf_addedit.js
index ad6e613..ecb619c 100644
--- a/content/asf_addedit.js
+++ b/content/asf_addedit.js
@@ -90,7 +90,7 @@ Copyright (C) 2007-2009 Eric Cassar (Cyan).
browsedir_addedit: function () {
var current_folder_input = document.getElementById("asf-addedit-folder").value;
var stringbundle = Components.classes['@mozilla.org/intl/stringbundle;1'].
- getService(Ci.nsIStringBundleService).
+ getService(Components.interfaces.nsIStringBundleService).
createBundle('chrome://asf/locale/asf.properties');
const nsIFilePicker = Components.interfaces.nsIFilePicker;
diff --git a/content/asf_right_click.js b/content/asf_right_click.js
index f870bdf..b2b3b0c 100644
--- a/content/asf_right_click.js
+++ b/content/asf_right_click.js
@@ -45,13 +45,8 @@ var automatic_save_folder = {
var dsort_GUUID = "{D9808C4D-1CF5-4f67-8DB2-12CF78BBA23F}";
var DownloadSort = enabledItems.indexOf(dsort_GUUID,0);
- if (DownloadSort >= 0)
- {
- // alert ("Download sort extension detected")
- }
- else // Download Sort is not enabled, load ASF rightclick replacement.
- {
-
+ if ( (DownloadSort == -1) && (automatic_save_folder.versionChecker.compare(automatic_save_folder.appInfo.version, "3.0") >= 0) ) // Download Sort is not enabled, load ASF rightclick replacement && Firefox 3.0 min
+ {
// Not working like I would like :(
/*
// Replace first line of ORIGinal firefox rightclick function, to add ASF function to it. might Works with every firefox version :)
@@ -61,7 +56,8 @@ var automatic_save_folder = {
window.getTargetFile = asf_getTargetFile;
*/
- // replace the ORIGinal firefox function with the custom one. (only working on 3.x ?)
+ // replace the ORIGinal firefox function with the custom one. (only working on 3.x)
+ // (2.x doesn't know Cc"@mozilla.org/privatebrowsing;1") -> just disable rightclick to let 2.x users still uses asf main functionnality
window.getTargetFile = automatic_save_folder.asf_getTargetFile;
// only "save image as..." is working until right click timeout set to 0
diff --git a/content/options.xul b/content/options.xul
index 91e979a..444b93b 100644
--- a/content/options.xul
+++ b/content/options.xul
@@ -116,6 +116,7 @@
<checkbox id="asf-rightclick" preference="asf_rightclick" label="&asf.rightclick.bool;" oncommand="automatic_save_folder.toggle_rightclick();"/>
<description id="asf-rightclickdesc" style="margin-left:25px;white-space: pre-wrap">&asf.rightclick.label;</description>
<description id="asf-rightclickdesc-DSort" style="margin-left:25px;white-space:pre-wrap;color:red;">&asf.rightclick.DSort.label;</description>
+ <description id="asf-rightclickdesc-ff2" style="margin-left:25px;white-space:pre-wrap;color:red;">&asf.rightclick.ff2.label;</description>
</groupbox>
</vbox>
<vbox id="asf-tab-dynamics" hidden="true" flex="1000">
diff --git a/locale/en-US/asf.dtd b/locale/en-US/asf.dtd
index e8dfd84..4ae91d5 100644
--- a/locale/en-US/asf.dtd
+++ b/locale/en-US/asf.dtd
@@ -41,8 +41,9 @@
<!ENTITY asf.viewpathselect.label "Activate a drop-down menu with all the filter's path.">
<!ENTITY asf.dialogaccept.bool "Automatically accept the download.">
<!ENTITY asf.rightclick.bool "Right-Click enabled">
-<!ENTITY asf.rightclick.label "Right-click 'save as...' functionnality doesn't work with downloading redirection scripts. 
Firefox proposed filename will stay as 'script_name.php' instead of the real target filename. 
Disable this feature if you need the right-click to save a redirection link. Single left-click is not affected.">
-<!ENTITY asf.rightclick.DSort.label "Download sort extension has beed detected. 
Automatic Save Folder's right-click feature will not work until you disable Download Sort in your Add-on manager.">
+<!ENTITY asf.rightclick.label "The right-click 'save as...' functionality doesn't work with downloading redirection scripts. 
Firefox proposed filename will stay as 'script_name.php' instead of the real target filename. 
Disable this feature if you need the right-click to save a redirection link. Single left-click is not affected.">
+<!ENTITY asf.rightclick.DSort.label "Download sort extension has been detected. 
Automatic Save Folder's right-click feature will not work until you disable Download Sort in your Add-on manager.">
+<!ENTITY asf.rightclick.ff2.label "The right-click 'save as...' functionality doesn't work on Firefox 1.5 or 2.*, please upgrade to Firefox 3.x to use it.">
<!-- Dynamics tab-->
<!ENTITY asf.dynamics.label "Dynamic folders">
diff --git a/locale/fr-FR/asf.dtd b/locale/fr-FR/asf.dtd
index 80b1f40..161575d 100644
--- a/locale/fr-FR/asf.dtd
+++ b/locale/fr-FR/asf.dtd
@@ -39,10 +39,11 @@
<!ENTITY asf.viewdloption.label "Permet de voir les deux derniers dossiers d'enregistrement et un lien pour éditer ou ajouter de nouveaux filtres.">
<!ENTITY asf.viewpathselect.bool "Afficher la liste des filtres">
<!ENTITY asf.viewpathselect.label "Active le menu déroulant contenant le chemin de chaque filtre.">
-<!ENTITY asf.dialogaccept.bool "Accepter le téléchargement automatiquement (Pas besoin de cliquer sur le bouton 'OK').">
+<!ENTITY asf.dialogaccept.bool "Accepter le téléchargement automatiquement.">
<!ENTITY asf.rightclick.bool "Clic-droit activé">
<!ENTITY asf.rightclick.label "La fonction clic-droit 'enregistrer la cible sous...' ne fonctionne pas avec les script de redirection de fichiers. 
Le nom de fichier proposé par Firefox reste 'nom_du_script.php' au lieu du vrai nom du fichier téléchargé. 
Désactivez temporairement cette option si vous devez utiliser le clic-droit pour sauvegarder un fichier provenant d'un script de redirection. Le clic-gauche n'est pas affecté.">
<!ENTITY asf.rightclick.DSort.label "L'extension Download Sort à été détectée. 
La fonction clic-droit d'Automatic Save Folder est temporairement indisponible. Désactivez l'extension Download Sort dans le menu 'outils/modules complémentaires...' afin de pouvoir utiliser le clic-droit avec Automatic Save Folder.">
+<!ENTITY asf.rightclick.ff2.label "La fonction clic-droit 'enregistrer la cible sous...' ne fonctionne pas avec firefox 1.5 et 2.* ; Installez Firefox 3.x pour pouvoir utiliser cette fonctionnalité.">
<!-- Dynamics tab-->
<!ENTITY asf.dynamics.label "Dossiers dynamiques">
@@ -59,7 +60,7 @@
<!-- preference add & edit-->
<!ENTITY buttonlabelextra1 "OK">
<!ENTITY asf.add.title "Ajouter un nouveau filtre">
-<!ENTITY asf.edit.title "Editer un filtre">
+<!ENTITY asf.edit.title "Éditer un filtre">
<!ENTITY asf.addedit.filter.label "Filtres">
<!ENTITY asf.addedit.help.label "Aide">
<!ENTITY asf.addedit.domain.label "Domaine">
@@ -76,8 +77,8 @@
<!ENTITY asf.addedit.inforegexp4 "Expression régulière : .*(.rar|.zip)$">
<!ENTITY asf.addedit.nodata.domain "Le domaine est vide. Veuillez sélectionner 'Tous' ou entrer un filtre pour le domaine">
-<!ENTITY asf.addedit.nodata.filename "Le nom de fichier est vide. Veuillez séléctionner 'Tous' ou entrer un filtre pour le nom de fichier">
-<!ENTITY asf.addedit.nodata.folder "Le dossier n'est pas défini. Veuillez séléctionner un dossier de destination pour ce filtre">
+<!ENTITY asf.addedit.nodata.filename "Le nom de fichier est vide. Veuillez sélectionner 'Tous' ou entrer un filtre pour le nom de fichier">
+<!ENTITY asf.addedit.nodata.folder "Le dossier n'est pas défini. Veuillez sélectionner un dossier de destination pour ce filtre">
<!-- Regular expression Help dialog -->
<!ENTITY asf.regexp.title "Expressions Régulières">
diff --git a/locale/it-IT/asf.dtd b/locale/it-IT/asf.dtd
index d41cb76..c0d91e3 100644
--- a/locale/it-IT/asf.dtd
+++ b/locale/it-IT/asf.dtd
@@ -41,8 +41,9 @@
<!ENTITY asf.viewpathselect.label "Visualizza un menu con la lista di tutti i percorsi dei filtri.">
<!ENTITY asf.dialogaccept.bool "Automatically accept the download.">
<!ENTITY asf.rightclick.bool "Right-Click enabled">
-<!ENTITY asf.rightclick.label "Right click 'save as...' functionnality doesn't work with downloading redirection scripts. 
Firefox proposed filename will stay as 'script_name.php' instead of the real target filename. 
Disable this feature if you need the right-click to save a redirection link. Single left-click is not affected.">
-<!ENTITY asf.rightclick.DSort.label "Download sort extension has beed detected. 
Automatic Save Folder's right-click feature will not work until you disable Download Sort in your Add-on manager.">
+<!ENTITY asf.rightclick.label "The right-click 'save as...' functionality doesn't work with downloading redirection scripts. 
Firefox proposed filename will stay as 'script_name.php' instead of the real target filename. 
Disable this feature if you need the right-click to save a redirection link. Single left-click is not affected.">
+<!ENTITY asf.rightclick.DSort.label "Download sort extension has been detected. 
Automatic Save Folder's right-click feature will not work until you disable Download Sort in your Add-on manager.">
+<!ENTITY asf.rightclick.ff2.label "The right-click 'save as...' functionality doesn't work on Firefox 1.5 or 2.*, please upgrade to Firefox 3.x to use it.">
<!-- Dynamics tab-->
<!ENTITY asf.dynamics.label "Dynamic folders">
diff --git a/locale/it-IT/to translate.txt b/locale/it-IT/to translate.txt
index 0d12816..f237e0c 100644
--- a/locale/it-IT/to translate.txt
+++ b/locale/it-IT/to translate.txt
@@ -3,7 +3,7 @@ asf.properties :
2 to end
asf.dtd :
-42-48
+42-49
Variables.html :
--
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