[Pkg-mozext-commits] [automatic-save-folder] 100/133: Add: Added a new radio choice on the save window containing the last saved path of the current URI. (Firefox 7.0.1+)
David Prévot
taffit at moszumanska.debian.org
Mon Apr 27 20:33:56 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 978fe996d0c9e86f4d96c6711bbbfafb47d8081b
Author: Cyan <Cyan at d0063192-6b2e-11de-89a9-0b20f3e2dceb>
Date: Sat Nov 26 19:35:19 2011 +0000
Add: Added a new radio choice on the save window containing the last saved path of the current URI. (Firefox 7.0.1+)
git-svn-id: http://automatic-save-folder.googlecode.com/svn/trunk@107 d0063192-6b2e-11de-89a9-0b20f3e2dceb
---
content/asf_download.js | 20 +++++++++++++++++++-
content/common.dtd | 2 +-
content/overlay_unknownContentType.xul | 3 ++-
locale/cs/about.dtd | 2 +-
locale/en-US/about.dtd | 2 +-
locale/fr/about.dtd | 2 +-
locale/it/about.dtd | 2 +-
locale/ru/about.dtd | 2 +-
locale/sv-SE/about.dtd | 2 +-
9 files changed, 28 insertions(+), 9 deletions(-)
diff --git a/content/asf_download.js b/content/asf_download.js
index 61f48fb..9323df8 100644
--- a/content/asf_download.js
+++ b/content/asf_download.js
@@ -34,6 +34,7 @@ Copyright (C) 2007-2011 Éric Cassar (Cyan).
matching_filters: new Array(),
matching_folders: new Array(),
current_uri: "", // FF7.0.1 use a new per uri saved folder.
+ current_uri_lastpath: "", // last stored path for that uri
main: function () {
@@ -91,6 +92,11 @@ Copyright (C) 2007-2011 Éric Cassar (Cyan).
{
this.current_uri = currentDomain.replace(/^.*:\/\//g,'');
if (this.current_uri == "") this.current_uri = tabLocation.href; // fix website opening a new about:blank page when clicking on a download link, and that tab is not auto-closing.
+
+ // read lastpath for that uri
+ let uri = this.current_uri;
+ let file = gDownloadLastDir.getFile(uri);
+ this.current_uri_lastpath = file.path;
}
var domain_testOrder = prefManager.getCharPref("extensions.asf.domainTestOrder");
@@ -774,6 +780,7 @@ Copyright (C) 2007-2011 Éric Cassar (Cyan).
// so he can choose from found filters, or last used path.
var lastpath = this.loadUnicodeString("extensions.asf.lastpath");
var asf_lastpath = document.getElementById('asf_lastpath');
+ asf_lastpath.label = lastpath;
if ( (lastpath == folder) || (lastpath == "") ) // if same or empty (first time using ASF), do not show radio for lastpath choice
{
@@ -784,6 +791,18 @@ Copyright (C) 2007-2011 Éric Cassar (Cyan).
asf_lastpath.hidden = false;
}
+ // Firefox 7.0.1+ : Check the current uri lastpath, if not in the available paths then print another radio choice to the user
+ var asf_currentURI_lastpath = document.getElementById('asf_currentURI_lastpath');
+ asf_currentURI_lastpath.hidden = true;
+ if (this.firefoxversion >= 7.01)
+ {
+ asf_currentURI_lastpath.label = this.current_uri_lastpath;
+ if ( (this.indexInArray(this.matching_folders, this.current_uri_lastpath) == -1) && (lastpath != this.current_uri_lastpath) ) // check if it's already listed
+ {
+ asf_currentURI_lastpath.hidden = false;
+ }
+ }
+
//set the text to be written on the Radio comment
if (this.matching_filters.length >= 1)
{
@@ -821,7 +840,6 @@ Copyright (C) 2007-2011 Éric Cassar (Cyan).
document.getElementById('asf_savefolder_0').label = folder;
}
- asf_lastpath.label = lastpath;
// Force check the first radio choice (needed on linux + ff2.x) (linux has blank radio choices on loading, this is only visual, it doesn't affect anything here, the value are set to the new path by default until the user change the radio choice)
var asf_radio_savepath = document.getElementById('asf_radio_savepath');
diff --git a/content/common.dtd b/content/common.dtd
index 407c280..a87cb0b 100644
--- a/content/common.dtd
+++ b/content/common.dtd
@@ -1,5 +1,5 @@
<!-- Current version -->
-<!ENTITY asf.version "1.0.3bRev106">
+<!ENTITY asf.version "1.0.3bRev107">
<!ENTITY about.translators "
- cs : Stanislav Horáček<br />
diff --git a/content/overlay_unknownContentType.xul b/content/overlay_unknownContentType.xul
index 54fb5f8..07491a1 100644
--- a/content/overlay_unknownContentType.xul
+++ b/content/overlay_unknownContentType.xul
@@ -21,7 +21,8 @@
<vbox id="asf_savefolder">
<radio id="asf_savefolder_0" value="0" width="280" crop="center" label="folder" class="small-indent" oncommand="automatic_save_folder.asf_toggle_savepath(this)"/>
</vbox>
- <radio id="asf_lastpath" value="98" width="280" crop="center" label="folder" class="small-indent" oncommand="automatic_save_folder.asf_toggle_savepath(this)"/>
+ <radio id="asf_lastpath" value="97" width="280" crop="center" label="folder" class="small-indent" oncommand="automatic_save_folder.asf_toggle_savepath(this)"/>
+ <radio id="asf_currentURI_lastpath" value="98" width="280" crop="center" label="folder" class="small-indent" oncommand="automatic_save_folder.asf_toggle_savepath(this)"/>
<vbox id="asf_radiogroup_pathselect" style="visibility: collapse;">
<radio id="asf_pathselect" value="99" width="280" crop="center" label="&asf.pathselect.label;" class="small-indent" oncommand="automatic_save_folder.asf_toggle_savepath(this)"/>
<hbox>
diff --git a/locale/cs/about.dtd b/locale/cs/about.dtd
index 2cbdee9..5b4a948 100644
--- a/locale/cs/about.dtd
+++ b/locale/cs/about.dtd
@@ -24,7 +24,7 @@
<!-- Keep the newline intact as it uses the < pre > tag, keep the 2 beginning spaces to create indentation -->
<!ENTITY about.version.103 "+ Firefox 7.0.1: Compatibility with the new Last Saved Path feature (Now memorized on a site-by-site basis).
-+ Added an option to use the new site-by-site save mode for Firefox 7.0.1+ users when no filter match.
++ Added an option to use the new site-by-site save mode for Firefox 7.0.1+ when no filter match.
- Removed beta checking feature on non beta releases.
* Prevent closing the save dialog if the preferences dialog is still open.
* Memorize the preferences window size if the user make it bigger. It will use the default size if the window is shortened.">
diff --git a/locale/en-US/about.dtd b/locale/en-US/about.dtd
index 981405e..6e4c84a 100644
--- a/locale/en-US/about.dtd
+++ b/locale/en-US/about.dtd
@@ -24,7 +24,7 @@
<!-- Keep the newline intact as it uses the < pre > tag, keep the 2 beginning spaces to create indentation -->
<!ENTITY about.version.103 "+ Compatibility with the new Firefox 7.0.1 Last Saved Path feature (Now memorized on a site-by-site basis).
-+ Added an option to use the new site-by-site save mode for Firefox 7.0.1+ users when no filter match.
++ Added an option to use the new site-by-site save mode for Firefox 7.0.1+ when no filter match.
- Removed beta checking feature on non beta releases.
* Prevent closing the save dialog if the preferences dialog is still open.
* Memorize the preferences window size if the user make it bigger. It will use the default size if the window is shortened.">
diff --git a/locale/fr/about.dtd b/locale/fr/about.dtd
index bfaff57..be40309 100644
--- a/locale/fr/about.dtd
+++ b/locale/fr/about.dtd
@@ -24,7 +24,7 @@
<!-- Conserver les retours à la ligne car le tag < pre > est utilisé, gardez les deux espaces en début de ligne pour l'indentation -->
<!ENTITY about.version.103 "+ Compatibilité avec la nouvelle fonction de Firefox 7.0.1 concernant le dernier chemin d'enregistrement (Maintenant mémorisé site par site).
-+ Ajout d'une option pour utiliser le mode site par site pour les utilisateurs de firefox 7.0.1+ lorqu'aucun filtre ne correspond.
++ Ajout d'une option pour utiliser le mode site par site pour firefox 7.0.1+ lorqu'aucun filtre ne correspond.
- Suppression de la recherche d'une nouvelle version béta pour les versions non béta.
* Empêche la fermeture de la fenêtre de sauvegarde si la fenêtre de préférence est encore ouverte.
* Mémorise la taille de la fenêtre de préférences si elle est agrandie par l'utilisateur. La taille par défaut sera utilisée si la fenêtre est réduite.">
diff --git a/locale/it/about.dtd b/locale/it/about.dtd
index 6b2dfb1..fb73a80 100644
--- a/locale/it/about.dtd
+++ b/locale/it/about.dtd
@@ -24,7 +24,7 @@
<!-- Keep the newline intact as it uses the < pre > tag, keep the 2 beginning spaces to create indentation -->
<!ENTITY about.version.103 "+ Firefox 7.0.1: Compatibility with the new Last Saved Path feature (Now memorized on a site-by-site basis).
-+ Added an option to use the new site-by-site save mode for Firefox 7.0.1+ users when no filter match.
++ Added an option to use the new site-by-site save mode for Firefox 7.0.1+ when no filter match.
- Removed beta checking feature on non beta releases.
* Prevent closing the save dialog if the preferences dialog is still open.
* Memorize the preferences window size if the user make it bigger. It will use the default size if the window is shortened.">
diff --git a/locale/ru/about.dtd b/locale/ru/about.dtd
index 3e0bd90..2f5dee4 100644
--- a/locale/ru/about.dtd
+++ b/locale/ru/about.dtd
@@ -24,7 +24,7 @@
<!-- Keep the newline intact as it uses the < pre > tag, keep the 2 beginning spaces to create indentation -->
<!ENTITY about.version.103 "+ Firefox 7.0.1: Compatibility with the new Last Saved Path feature (Now memorized on a site-by-site basis).
-+ Added an option to use the new site-by-site save mode for Firefox 7.0.1+ users when no filter match.
++ Added an option to use the new site-by-site save mode for Firefox 7.0.1+ when no filter match.
- Removed beta checking feature on non beta releases.
* Prevent closing the save dialog if the preferences dialog is still open.
* Memorize the preferences window size if the user make it bigger. It will use the default size if the window is shortened.">
diff --git a/locale/sv-SE/about.dtd b/locale/sv-SE/about.dtd
index 7aae11a..3e6e7ac 100644
--- a/locale/sv-SE/about.dtd
+++ b/locale/sv-SE/about.dtd
@@ -24,7 +24,7 @@
<!-- Keep the newline intact as it uses the < pre > tag, keep the 2 beginning spaces to create indentation -->
<!ENTITY about.version.103 "+ Firefox 7.0.1: Compatibility with the new Last Saved Path feature (Now memorized on a site-by-site basis).
-+ Added an option to use the new site-by-site save mode for Firefox 7.0.1+ users when no filter match.
++ Added an option to use the new site-by-site save mode for Firefox 7.0.1+ when no filter match.
- Removed beta checking feature on non beta releases.
* Prevent closing the save dialog if the preferences dialog is still open.
* Memorize the preferences window size if the user make it bigger. It will use the default size if the window is shortened.">
--
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