[Pkg-mozext-commits] [automatic-save-folder] 79/133: Add : new option to automatically check for beta updates when opening the preferences window.

David Prévot taffit at moszumanska.debian.org
Mon Apr 27 20:33:54 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 7619019a82ed261b340f2f9491b9046dee2729ad
Author: Cyan <Cyan at d0063192-6b2e-11de-89a9-0b20f3e2dceb>
Date:   Thu Aug 5 12:07:58 2010 +0000

    Add : new option to automatically check for beta updates
          when opening the preferences window.
    
    git-svn-id: http://automatic-save-folder.googlecode.com/svn/trunk@85 d0063192-6b2e-11de-89a9-0b20f3e2dceb
---
 content/asf.js              | 12 ++++++++----
 content/common.dtd          |  2 +-
 content/options.xul         | 13 ++++++++-----
 defaults/preferences/asf.js |  1 +
 locale/en-US/asf.dtd        |  9 +++++----
 locale/fr/asf.dtd           |  9 +++++----
 locale/it/asf.dtd           |  9 +++++----
 locale/ru/asf.dtd           |  9 +++++----
 8 files changed, 38 insertions(+), 26 deletions(-)

diff --git a/content/asf.js b/content/asf.js
index c8d2df3..42cc244 100644
--- a/content/asf.js
+++ b/content/asf.js
@@ -53,6 +53,7 @@ var automatic_save_folder = {
 		this.asf_treeSelected(); // set the button to disabled state because no filter is selected when openning
 		this.asf_toggleradio(); // set the radio choice to the right place
 		this.asf_variablemode(); // check if variable mode is on or off, and change mode if needed
+		if(this.prefManager.getBoolPref("extensions.asf.autoCheckBetaUpdate")) this.checkBetaVersion(true); // Check the latest available (beta) version
 		
 		// Resize the preferences window to match the localization needs.
 		// I don't know why width, or css width are not working, so let's use a script to resize the preferences window on load.
@@ -887,9 +888,9 @@ var automatic_save_folder = {
 	},
 
 
-	checkBetaVersion: function() {
+	checkBetaVersion: function(showalert) {
 		var current_version = document.getElementById('asf-version').value;
-		var latest_version = "1.0.2b Rev85";
+		var latest_version = "";
 		var XhrObj = new XMLHttpRequest();
 		XhrObj.onreadystatechange = function()
 		{
@@ -902,7 +903,10 @@ var automatic_save_folder = {
 					document.getElementById('asf-betaVersionAvailable').hidden = false;
 					document.getElementById('asf-version').value = latest_version;
 					document.getElementById('asf-version').hidden = false;
-					
+					if(showalert)
+					{
+						alert(document.getElementById('asf-betaVersionAvailable').textContent + "\nAutomatic Save Folder v" + document.getElementById('asf-version').value);
+					}
 				}
 				else
 				{
@@ -1075,7 +1079,7 @@ var automatic_save_folder = {
 		if (window.opener.location == "chrome://mozapps/content/downloads/unknownContentType.xul") // if the option is opened from the saving window
 		{
 			window.opener.automatic_save_folder.main();		// rescan the filters to set the good folder
-			window.opener.sizeToContent();
+			window.opener.check_uCTOption();
 		}
 		window.opener.focus;
 	}
diff --git a/content/common.dtd b/content/common.dtd
index 8c4c745..9c22272 100644
--- a/content/common.dtd
+++ b/content/common.dtd
@@ -1,5 +1,5 @@
 <!-- Current version -->
-<!ENTITY asf.version "1.0.2bRev84">
+<!ENTITY asf.version "1.0.2bRev85">
 
 <!ENTITY about.translators "
 - en-US : Cyan, Narayan<br />
diff --git a/content/options.xul b/content/options.xul
index 22068f5..3c69691 100644
--- a/content/options.xul
+++ b/content/options.xul
@@ -43,6 +43,7 @@
 		<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"/>
+		<preference id="asf_domainTestOrder" name="extensions.asf.domainTestOrder" type="string"/>
 		<preference id="asf_useDownloadDir" name="browser.download.useDownloadDir" type="bool"/>
 		<preference id="asf_folderList" name="browser.download.folderList" type="int"/>
 		<preference id="asf_regexp_caseinsensitive" name="extensions.asf.regexp_caseinsensitive" type="bool"/>
@@ -51,6 +52,7 @@
 		<preference id="asf_rowmatchinghighlight" name="extensions.asf.rowmatchinghighlight" type="string"/>
 		<preference id="asf_dta_ASFtoDTA_isActive" name="extensions.asf.dta_ASFtoDTA_isActive" type="bool"/>
 		<preference id="asf_dta_sendMethod" name="extensions.asf.dta_sendMethod" type="string"/>
+		<preference id="asf_autoCheckBetaUpdate" name="extensions.asf.autoCheckBetaUpdate" type="bool"/>
 	</preferences>
 	<menupopup id="contextpopup">
 		<menuitem label="&asf.top.popup;" oncommand="automatic_save_folder.move('top');"/>
@@ -188,13 +190,14 @@
 								</hbox>
 								<checkbox id="asf-viewpathselect" preference="asf_viewpathselect"  label="&asf.viewpathselect.bool;" tooltip="tooltip_viewpathselect" style="margin-left:25px;white-space:pre-wrap"/>
 							</groupbox>
-							<groupbox><caption label="&asf.options.checkUpdate.label;" />
+							<groupbox><caption label="&asf.option.groupbox.checkUpdate.label;" />
 								<hbox>
-									<button id="asf-checkBetaUpdate" label="&asf.options.checkBetaUpdate.button;" oncommand="automatic_save_folder.checkBetaVersion();"/>
-									<description id="asf-betaVersionAvailable" hidden="true">&asf.options.betaVersionAvailable.label;</description>
-									<description id="asf-betaVersionNotAvailable" hidden="true">&asf.options.betaVersionNotAvailable.label;</description>
-									<description id="asf-version" hidden="true" value="&asf.version;" />
+									<button id="asf-checkBetaUpdate" label="&asf.checkBetaUpdate.button;" oncommand="automatic_save_folder.checkBetaVersion();"/>
+									<description id="asf-betaVersionAvailable" hidden="true">&asf.betaVersionAvailable.label;</description>
+									<description id="asf-betaVersionNotAvailable" hidden="true">&asf.betaVersionNotAvailable.label;</description>
+									<label id="asf-version" href="http://asf.mangaheart.org/?menu=2&sub=2" class="text-link" hidden="true" value="&asf.version;" />
 								</hbox>
+								<checkbox id="asf-autoCheckBetaUpdate" preference="asf_autoCheckBetaUpdate" label="&asf.autoCheckBetaUpdate.bool;" />
 							</groupbox>
 						</vbox>
 					</tabpanel>
diff --git a/defaults/preferences/asf.js b/defaults/preferences/asf.js
index cfaee34..d661618 100644
--- a/defaults/preferences/asf.js
+++ b/defaults/preferences/asf.js
@@ -28,3 +28,4 @@ pref("extensions.asf at mangaheart.org.description", "chrome://asf/locale/asf.prope
  pref("extensions.asf.pathlist_alphasort", true);
  pref("extensions.asf.dta_ASFtoDTA_isActive", false);
  pref("extensions.asf.dta_sendMethod", "replace");
+ pref("extensions.asf.autoCheckBetaUpdate", false);
diff --git a/locale/en-US/asf.dtd b/locale/en-US/asf.dtd
index 7419f3b..98caae1 100644
--- a/locale/en-US/asf.dtd
+++ b/locale/en-US/asf.dtd
@@ -71,10 +71,11 @@
 <!ENTITY asf.viewpathselect.bool "View the list of folders">
 <!ENTITY asf.viewpathselect.tooltip "Activate a drop-down menu with all the filter's path.">
 
-<!ENTITY asf.options.checkUpdate.label "Update">
-<!ENTITY asf.options.checkBetaUpdate.button "Check if there is a new beta version">
-<!ENTITY asf.options.betaVersionAvailable.label "A new version is available:">
-<!ENTITY asf.options.betaVersionNotAvailable.label "No new version available.">
+<!ENTITY asf.option.groupbox.checkUpdate.label "Beta update">
+<!ENTITY asf.checkBetaUpdate.button "Check if there is a new beta version">
+<!ENTITY asf.betaVersionAvailable.label "A new version is available:">
+<!ENTITY asf.betaVersionNotAvailable.label "No new version available.">
+<!ENTITY asf.autoCheckBetaUpdate.bool "Automatically check when opening the preferences window.">
 
 <!ENTITY asf.options.groupbox3.label "Filtering options">
 <!ENTITY asf.lastdir.bool "Affect the folder for the 'save as...' command when a filter matches">
diff --git a/locale/fr/asf.dtd b/locale/fr/asf.dtd
index 7654949..15f8727 100644
--- a/locale/fr/asf.dtd
+++ b/locale/fr/asf.dtd
@@ -71,10 +71,11 @@
 <!ENTITY asf.viewpathselect.bool "Afficher la liste des filtres">
 <!ENTITY asf.viewpathselect.tooltip "Active le menu déroulant contenant le chemin de chaque filtre.">
 
-<!ENTITY asf.options.checkUpdate.label "Mise à jour">
-<!ENTITY asf.options.checkBetaUpdate.button "Vérifier si une nouvelle version béta est disponible">
-<!ENTITY asf.options.betaVersionAvailable.label "Une nouvelle version est disponible :">
-<!ENTITY asf.options.betaVersionNotAvailable.label "Pas de nouvelle version disponible.">
+<!ENTITY asf.option.groupbox.checkUpdate.label "Mise à jour béta">
+<!ENTITY asf.checkBetaUpdate.button "Vérifier si une nouvelle version béta est disponible">
+<!ENTITY asf.betaVersionAvailable.label "Une nouvelle version est disponible :">
+<!ENTITY asf.betaVersionNotAvailable.label "Pas de nouvelle version disponible.">
+<!ENTITY asf.autoCheckBetaUpdate.bool "Vérifier automatiquement à l'ouverture des préférences.">
 
 <!ENTITY asf.options.groupbox3.label "Pendant le filtrage">
 <!ENTITY asf.lastdir.bool "Modifier aussi le dossier d'enregistrement utilisé par le menu 'Enregistrer sous... (Ctrl+S)'">
diff --git a/locale/it/asf.dtd b/locale/it/asf.dtd
index 207bcf9..38b4dbd 100644
--- a/locale/it/asf.dtd
+++ b/locale/it/asf.dtd
@@ -71,10 +71,11 @@
 <!ENTITY asf.viewpathselect.bool "Vedi la lista dei filtri">
 <!ENTITY asf.viewpathselect.tooltip "Visualizza un menu con la lista di tutti i percorsi dei filtri.">
 
-<!ENTITY asf.options.checkUpdate.label "Update">
-<!ENTITY asf.options.checkBetaUpdate.button "Check if there is a new beta version">
-<!ENTITY asf.options.betaVersionAvailable.label "A new version is available:">
-<!ENTITY asf.options.betaVersionNotAvailable.label "No new version available.">
+<!ENTITY asf.option.groupbox.checkUpdate.label "Beta update">
+<!ENTITY asf.checkBetaUpdate.button "Check if there is a new beta version">
+<!ENTITY asf.betaVersionAvailable.label "A new version is available:">
+<!ENTITY asf.betaVersionNotAvailable.label "No new version available.">
+<!ENTITY asf.autoCheckBetaUpdate.bool "Automatically check when opening the preferences window.">
 
 <!ENTITY asf.options.groupbox3.label "Filtering options">
 <!ENTITY asf.lastdir.bool "Ha effetto sulla cartella per il comando 'Salva come...' quando un filtro corrisponde">
diff --git a/locale/ru/asf.dtd b/locale/ru/asf.dtd
index 014fafd..95bcc56 100644
--- a/locale/ru/asf.dtd
+++ b/locale/ru/asf.dtd
@@ -71,10 +71,11 @@
 <!ENTITY asf.viewpathselect.bool "Показывать список папок">
 <!ENTITY asf.viewpathselect.tooltip "Активировать меню перетаскивания мышкой для всех папок фильтров.">
 
-<!ENTITY asf.options.checkUpdate.label "Update">
-<!ENTITY asf.options.checkBetaUpdate.button "Check if there is a new beta version">
-<!ENTITY asf.options.betaVersionAvailable.label "A new version is available:">
-<!ENTITY asf.options.betaVersionNotAvailable.label "No new version available.">
+<!ENTITY asf.option.groupbox.checkUpdate.label "Beta update">
+<!ENTITY asf.checkBetaUpdate.button "Check if there is a new beta version">
+<!ENTITY asf.betaVersionAvailable.label "A new version is available:">
+<!ENTITY asf.betaVersionNotAvailable.label "No new version available.">
+<!ENTITY asf.autoCheckBetaUpdate.bool "Automatically check when opening the preferences window.">
 
 <!ENTITY asf.options.groupbox3.label "Настройки фильтров">
 <!ENTITY asf.lastdir.bool "Изменять папку для команды "сохранить как..." когда есть подходящий фильтр">

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