[Pkg-mozext-commits] [automatic-save-folder] 46/133: Change : - Added a drop-down menu to the add&edit window with already present filter's folders for quicker access (Asked by MrCOLOMBO) - Changed all the copyrighted date to 2010, and force UTF8 encoding

David Prévot taffit at moszumanska.debian.org
Mon Apr 27 20:33:50 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 904ffdafddf113f8292e951fadd1078ea062adc1
Author: Cyan <Cyan at d0063192-6b2e-11de-89a9-0b20f3e2dceb>
Date:   Mon Jan 25 18:56:47 2010 +0000

    Change :
    - Added a drop-down menu to the add&edit window with already present
      filter's folders for quicker access (Asked by MrCOLOMBO)
    - Changed all the copyrighted date to 2010, and force UTF8 encoding
    
    git-svn-id: http://automatic-save-folder.googlecode.com/svn/trunk@46 d0063192-6b2e-11de-89a9-0b20f3e2dceb
---
 content/about.xul                      |  2 +-
 content/add.xul                        |  4 +-
 content/asf.js                         |  8 +--
 content/asf_addedit.js                 | 93 +++++++++++++++++++++++++++++++---
 content/asf_download.js                |  2 +-
 content/asf_right_click.js             |  2 +-
 content/edit.xul                       |  4 +-
 content/help/about.xhtml               |  4 +-
 content/help/help.xhtml                |  4 +-
 content/help/regexp.xhtml              |  2 +-
 content/help/variables.xhtml           |  2 +-
 content/options.xul                    |  4 +-
 content/overlay_preferences.xul        |  2 +-
 content/overlay_unknownContentType.xul |  2 +-
 content/regexp.xul                     |  2 +-
 locale/en-US/about.dtd                 |  3 +-
 locale/en-US/asf.dtd                   |  1 +
 locale/fr-FR/about.dtd                 |  3 +-
 locale/fr-FR/asf.dtd                   |  1 +
 locale/it-IT/asf.dtd                   | 25 +++++----
 20 files changed, 132 insertions(+), 38 deletions(-)

diff --git a/content/about.xul b/content/about.xul
index 1444c0d..0f94345 100644
--- a/content/about.xul
+++ b/content/about.xul
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- ***** BEGIN LICENSE BLOCK *****
-	Copyright 2007-2009 Eric Cassar (Cyan)
+	Copyright 2007-2010 Éric Cassar (Cyan)
 
     This file is part of "Automatic Save Folder".
     You may find the license in the LICENSE file
diff --git a/content/add.xul b/content/add.xul
index b4e8566..baf42b5 100644
--- a/content/add.xul
+++ b/content/add.xul
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- ***** BEGIN LICENSE BLOCK *****
-	Copyright 2007-2009 Eric Cassar (Cyan)
+	Copyright 2007-2010 Éric Cassar (Cyan)
 
     This file is part of "Automatic Save Folder".
     You may find the license in the LICENSE file
@@ -48,7 +48,7 @@
 		
 		<description value="&asf.addedit.folder.label;"/>
 		<hbox>
-			<textbox id="asf-addedit-folder" readonly="true" width="240" ondblclick="automatic_save_folder.browsedir_addedit()"/>
+			<menulist editable="true" id="asf-addedit-folder" readonly="true" width="240" onload="automatic_save_folder.read_all_filterpath()" ondblclick="automatic_save_folder.browsedir_addedit()"/>
 			<button id="asf-addedit-select-folder" label="&asf.selectfolder.label;" oncommand="automatic_save_folder.browsedir_addedit()"/>
 		</hbox>
 		
diff --git a/content/asf.js b/content/asf.js
index d51052a..e144371 100644
--- a/content/asf.js
+++ b/content/asf.js
@@ -1,6 +1,6 @@
 /* ***** BEGIN LICENSE BLOCK *****
 Automatic Save Folder
-Copyright (C) 2007-2009 Eric Cassar (Cyan).
+Copyright (C) 2007-2010 Éric Cassar (Cyan).
 
     "Automatic Save Folder" is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -116,6 +116,7 @@ var automatic_save_folder = {
 		}
 	},
 	
+	
 	save_active_state: function() {
 		//autosave the filterswhen clicking  (anywhere) on the filter tree
 		// can't detect the "active" column statut with setting an attribute. The event is set to the tree not the cell.
@@ -568,7 +569,7 @@ var automatic_save_folder = {
 		
 		// locate current directory
 		current_folder_input = this.createValidDestination(current_folder_input);	
-		if (current_folder_input != false) fp.displayDirectory = current_folder_input;
+		if (current_folder_input !== false) fp.displayDirectory = current_folder_input;
 		
 		var rv = fp.show();
 		if (rv == nsIFilePicker.returnOK)
@@ -599,7 +600,7 @@ var automatic_save_folder = {
 			if (directory.exists()) 
 				return directory;
 			} catch(e) {return false;}
-		return directory;
+		return false;
 	},
 	
 	// removed unicodepath, unicodestring is working fine.
@@ -724,6 +725,7 @@ var automatic_save_folder = {
 		this.asf_close();
 	},
 	
+	
 	asf_close: function() {
 	
 		//close the options	
diff --git a/content/asf_addedit.js b/content/asf_addedit.js
index 582d1d0..c57b9c1 100644
--- a/content/asf_addedit.js
+++ b/content/asf_addedit.js
@@ -1,6 +1,6 @@
 /* ***** BEGIN LICENSE BLOCK *****
 Automatic Save Folder
-Copyright (C) 2007-2009 Eric Cassar (Cyan).
+Copyright (C) 2007-2010 Éric Cassar (Cyan).
 
     "Automatic Save Folder" is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -82,14 +82,25 @@ Copyright (C) 2007-2009 Eric Cassar (Cyan).
 	
 	
 	edit_load: function () {
-
+	
 	sizeToContent();
 	this.asf_loadData();
 	this.asf_toggleradio_domain();
 	this.asf_toggleradio_filename();
 	}, 
-
-
+	
+	
+	loadUnicodeString: function (pref_place) {
+		try 
+		{
+			return this.prefManager.getComplexValue(pref_place, Components.interfaces.nsISupportsString).data;
+		}
+		catch (e)
+		{ }
+		return "";
+	},
+	
+	
 	browsedir_addedit: function () {
 		var current_folder_input = document.getElementById("asf-addedit-folder").value;
 				
@@ -102,7 +113,7 @@ Copyright (C) 2007-2009 Eric Cassar (Cyan).
 		
 		// locate current directory
 		current_folder_input = this.createValidDestination(current_folder_input);	
-		if (current_folder_input != false) fp.displayDirectory = current_folder_input;
+		if (current_folder_input !== false) fp.displayDirectory = current_folder_input;
 		
 		var rv = fp.show();
 		if (rv == nsIFilePicker.returnOK)
@@ -125,7 +136,7 @@ Copyright (C) 2007-2009 Eric Cassar (Cyan).
 			if (directory.exists()) 
 				return directory;
 			} catch(e) {return false;}
-		return directory;
+		return false;
 	},
 
 
@@ -501,5 +512,75 @@ Copyright (C) 2007-2009 Eric Cassar (Cyan).
 				window.opener.automatic_save_folder.asf_savefilters();
 			}
 		}
+	},
+	
+	
+	//
+	// the 2 functions bellow are the drop-down path menu for the "add & edit" window
+	//
+	read_all_filterpath: function() {
+		var list = document.getElementById('asf-addedit-folder');
+		var menupopup = document.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'menupopup');
+		var tree = window.opener.document.getElementById("asf-filterList");
+		
+		// Check if there is any filter in list
+		var nbrfilters = tree.view.rowCount;
+		var path = "";
+		
+	
+		// Delete active list before repopulating (righ-clicking the menu sends an onLoad event again)
+		for (var i=list.childNodes.length-1 ; i>=0 ; i--) 
+		{
+			list.removeChild(list.childNodes[i]);
+		}
+		
+		// Write each path to the menupopup
+		var pathlist = new Array();
+		var defaultfolder = window.opener.document.getElementById("asf-default-folder").value;
+		pathlist[0] = defaultfolder;
+		var j = 0;
+		for (var i = 0; i < nbrfilters; i++)
+		{
+			// read the filter number i
+			path = tree.view.getCellText(i,tree.columns.getColumnAt("2"));
+			
+			if (this.indexInArray(pathlist, path) < 0) 
+			{ 
+				pathlist[++j]= path;
+			}
+		}
+		
+		var pathlist_sort_alpha = true;   // let the user choose in next release.
+		if (pathlist_sort_alpha) pathlist.sort(); 
+		
+		
+		for (var i = 0; i < pathlist.length; i++)
+		{
+			path = pathlist[i];
+			
+			var menuitem = document.createElementNS('http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul', 'menuitem');
+			menuitem.setAttribute('label', path);
+			menuitem.setAttribute('crop', 'center');
+			menuitem.setAttribute('value', path);
+			menupopup.appendChild(menuitem);
+		}
+		
+		// Populate the path list into the menu
+		list.appendChild(menupopup);
+
+	},
+	
+	
+	indexInArray: function (arr,val){
+		val = val.replace(/\\/g,'\\\\');
+		var test_regexp = new RegExp("^"+val+"$");
+		var data = "";
+		for(var i=0;i<arr.length;i++) 
+		{
+			if(test_regexp.test(arr[i])) return i;
+		}
+		return -1;
 	}
+	
+	
 };
\ No newline at end of file
diff --git a/content/asf_download.js b/content/asf_download.js
index 333c120..fb55b20 100644
--- a/content/asf_download.js
+++ b/content/asf_download.js
@@ -1,6 +1,6 @@
 /* ***** BEGIN LICENSE BLOCK *****
 Automatic Save Folder
-Copyright (C) 2007-2009 Eric Cassar (Cyan).
+Copyright (C) 2007-2010 Éric Cassar (Cyan).
 			  2009 Ted Gifford - Dynamic variable capturing 
 
     "Automatic Save Folder" is free software: you can redistribute it and/or modify
diff --git a/content/asf_right_click.js b/content/asf_right_click.js
index 0a9cf7e..55d24b2 100644
--- a/content/asf_right_click.js
+++ b/content/asf_right_click.js
@@ -1,6 +1,6 @@
 /* ***** BEGIN LICENSE BLOCK *****
 Automatic Save Folder
-Copyright (C) 2007-2009 Eric Cassar (Cyan).
+Copyright (C) 2007-2010 Éric Cassar (Cyan).
 			  2009 Ted Gifford - Dynamic variable capturing 
 
     "Automatic Save Folder" is free software: you can redistribute it and/or modify
diff --git a/content/edit.xul b/content/edit.xul
index bd49ef7..2d15582 100644
--- a/content/edit.xul
+++ b/content/edit.xul
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- ***** BEGIN LICENSE BLOCK *****
-	Copyright 2007-2009 Eric Cassar (Cyan)
+	Copyright 2007-2010 Éric Cassar (Cyan)
 
     This file is part of "Automatic Save Folder".
     You may find the license in the LICENSE file
@@ -48,7 +48,7 @@
 
 		<description value="&asf.addedit.folder.label;"/>		
 		<hbox>
-			<textbox id="asf-addedit-folder" readonly="true" width="240" ondblclick="automatic_save_folder.browsedir_addedit()"/>
+			<menulist editable="true" id="asf-addedit-folder" readonly="true" width="240" onload="automatic_save_folder.read_all_filterpath()" ondblclick="automatic_save_folder.browsedir_addedit()"/>
 			<button id="asf-addedit-select-folder" label="&asf.selectfolder.label;" oncommand="automatic_save_folder.browsedir_addedit()"/>
 		</hbox>
 		
diff --git a/content/help/about.xhtml b/content/help/about.xhtml
index a575a85..0438490 100644
--- a/content/help/about.xhtml
+++ b/content/help/about.xhtml
@@ -6,7 +6,7 @@
 ]>
 <html xmlns="http://www.w3.org/1999/xhtml">
 <!-- ***** BEGIN LICENSE BLOCK *****
-	Copyright 2007-2009 Eric Cassar (Cyan)
+	Copyright 2007-2010 Éric Cassar (Cyan)
 
     This file is part of "Automatic Save Folder".
     You may find the license in the LICENSE file
@@ -32,7 +32,7 @@
 ! &about.fix; 
 
 
-<strong>&about.version.title; 0.9.4 :</strong> (2009 12 xx)
+<strong>&about.version.title; 0.9.4 :</strong> (2010 xx xx)
 &about.version.094;
 
 
diff --git a/content/help/help.xhtml b/content/help/help.xhtml
index ff23bce..26da6f7 100644
--- a/content/help/help.xhtml
+++ b/content/help/help.xhtml
@@ -6,7 +6,7 @@
 ]>
 <html xmlns="http://www.w3.org/1999/xhtml">
 <!-- ***** BEGIN LICENSE BLOCK *****
-	Copyright 2007-2009 Eric Cassar (Cyan)
+	Copyright 2007-2010 Éric Cassar (Cyan)
 
     This file is part of "Automatic Save Folder".
     You may find the license in the LICENSE file
@@ -16,7 +16,7 @@
 
 <h3>&info.important.title;</h3>
 <p>
-	&info.important.text1;
+	&info.important.text1;<br />
 	<br/><img src="chrome://asf/skin/&info.important.pict1;" />
 	<br />&info.important.text2;
 </p>
diff --git a/content/help/regexp.xhtml b/content/help/regexp.xhtml
index 3873156..c5b6387 100644
--- a/content/help/regexp.xhtml
+++ b/content/help/regexp.xhtml
@@ -6,7 +6,7 @@
 ]>
 <html xmlns="http://www.w3.org/1999/xhtml">
 <!-- ***** BEGIN LICENSE BLOCK *****
-	Copyright 2007-2009 Eric Cassar (Cyan)
+	Copyright 2007-2010 Éric Cassar (Cyan)
 
     This file is part of "Automatic Save Folder".
     You may find the license in the LICENSE file
diff --git a/content/help/variables.xhtml b/content/help/variables.xhtml
index 3a5b37f..ebaa31f 100644
--- a/content/help/variables.xhtml
+++ b/content/help/variables.xhtml
@@ -6,7 +6,7 @@
 ]>
 <html xmlns="http://www.w3.org/1999/xhtml">
 <!-- ***** BEGIN LICENSE BLOCK *****
-	Copyright 2007-2009 Eric Cassar (Cyan)
+	Copyright 2007-2010 Éric Cassar (Cyan)
 
     This file is part of "Automatic Save Folder".
     You may find the license in the LICENSE file
diff --git a/content/options.xul b/content/options.xul
index a98d124..ef9e240 100644
--- a/content/options.xul
+++ b/content/options.xul
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- ***** BEGIN LICENSE BLOCK *****
-	Copyright 2007-2009 Eric Cassar (Cyan)
+	Copyright 2007-2010 Éric Cassar (Cyan)
 
     This file is part of "Automatic Save Folder".
     You may find the license in the LICENSE file
@@ -22,7 +22,7 @@
 			xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul" title="&prefwindow.title; (&asf.version;)"
 >
 <prefpane id="asf-options"  style="padding:1px !important" flex="1" >
-	<script type="application/x-javascript" src="chrome://asf/content/asf.js"></script>
+	<script type="application/x-javascript" src="chrome://asf/content/asf.js"/>
 	<preferences>
 		<preference id="asf_lastdir" name="extensions.asf.lastdir" type="bool"/>
 		<preference id="asf_keeptemp" name="extensions.asf.keeptemp" type="bool"/>
diff --git a/content/overlay_preferences.xul b/content/overlay_preferences.xul
index a6d855e..b3ba71c 100644
--- a/content/overlay_preferences.xul
+++ b/content/overlay_preferences.xul
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- ***** BEGIN LICENSE BLOCK *****
-	Copyright 2007-2009 Eric Cassar (Cyan)
+	Copyright 2007-2010 Éric Cassar (Cyan)
 
     This file is part of "Automatic Save Folder".
     You may find the license in the LICENSE file
diff --git a/content/overlay_unknownContentType.xul b/content/overlay_unknownContentType.xul
index 04789bb..8f25565 100644
--- a/content/overlay_unknownContentType.xul
+++ b/content/overlay_unknownContentType.xul
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- ***** BEGIN LICENSE BLOCK *****
-	Copyright 2007-2009 Eric Cassar (Cyan)
+	Copyright 2007-2010 Éric Cassar (Cyan)
 
     This file is part of "Automatic Save Folder".
     You may find the license in the LICENSE file
diff --git a/content/regexp.xul b/content/regexp.xul
index b8631e2..905fe96 100644
--- a/content/regexp.xul
+++ b/content/regexp.xul
@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <!-- ***** BEGIN LICENSE BLOCK *****
-	Copyright 2007-2009 Eric Cassar (Cyan)
+	Copyright 2007-2010 Éric Cassar (Cyan)
 
     This file is part of "Automatic Save Folder".
     You may find the license in the LICENSE file
diff --git a/locale/en-US/about.dtd b/locale/en-US/about.dtd
index afa666b..b96725f 100644
--- a/locale/en-US/about.dtd
+++ b/locale/en-US/about.dtd
@@ -162,5 +162,6 @@ And contributors:<br />
 - fr : Cyan, Goofy, Haynee<br />
 - id : dimassony<br />
 - it : Scognito.<br />
-- pt-BR : petruc<br />">
+- pt-BR : petruc<br />
+- zh-TW : justin9711<br />">
 
diff --git a/locale/en-US/asf.dtd b/locale/en-US/asf.dtd
index 92702b0..dd512e8 100644
--- a/locale/en-US/asf.dtd
+++ b/locale/en-US/asf.dtd
@@ -13,6 +13,7 @@
 <!ENTITY asf.tree.column.filename "File name">
 <!ENTITY asf.tree.column.localfolder "Local folder">
 <!ENTITY asf.tree.column.enabled "Active">
+<!-- this is 1 space (not empty string), this is the text you want to see on the buttons next to the arrows on the filter's tab, you can write 'up' if you want -->
 <!ENTITY asf.options.move.up " ">
 <!ENTITY asf.options.move.down " ">
 <!ENTITY asf.options.edit "Edit">
diff --git a/locale/fr-FR/about.dtd b/locale/fr-FR/about.dtd
index 861a97f..bb53332 100644
--- a/locale/fr-FR/about.dtd
+++ b/locale/fr-FR/about.dtd
@@ -162,5 +162,6 @@ Ainsi que les contributeurs :<br />
 - fr : Cyan, Goofy, Haynee<br />
 - id : dimassony<br />
 - it : Scognito.<br />
-- pt-BR : petruc<br />">
+- pt-BR : petruc<br />
+- zh-TW : justin9711<br />">
 
diff --git a/locale/fr-FR/asf.dtd b/locale/fr-FR/asf.dtd
index fa2ff78..c82726d 100644
--- a/locale/fr-FR/asf.dtd
+++ b/locale/fr-FR/asf.dtd
@@ -13,6 +13,7 @@
 <!ENTITY asf.tree.column.filename "Nom de fichier">
 <!ENTITY asf.tree.column.localfolder "Dossier local">
 <!ENTITY asf.tree.column.enabled "Actif">
+<!-- this is 1 space (not empty string), this is the text you want to see on the buttons next to the arrows on the filter's tab, you can write 'up' if you want -->
 <!ENTITY asf.options.move.up " ">
 <!ENTITY asf.options.move.down " ">
 <!ENTITY asf.options.edit "Éditer">
diff --git a/locale/it-IT/asf.dtd b/locale/it-IT/asf.dtd
index ffc5bb0..4e42c96 100644
--- a/locale/it-IT/asf.dtd
+++ b/locale/it-IT/asf.dtd
@@ -13,11 +13,12 @@
 <!ENTITY asf.tree.column.filename "Nome file">
 <!ENTITY asf.tree.column.localfolder "Cartella locale">
 <!ENTITY asf.tree.column.enabled "Attivo">
-<!ENTITY asf.options.move.up "">
-<!ENTITY asf.options.move.down "">
+<!-- this is 1 space (not empty string), this is the text you want to see on the buttons next to the arrows on the filter's tab, you can write 'up' if you want -->
+<!ENTITY asf.options.move.up " ">
+<!ENTITY asf.options.move.down " ">
 <!ENTITY asf.options.edit "Modifica">
-<!ENTITY asf.options.delete "">
-<!ENTITY asf.options.add "">
+<!ENTITY asf.options.delete " ">
+<!ENTITY asf.options.add " ">
 
 <!-- preference bottom -->
 <!ENTITY asf.default.label "Cartella per salvare il file se nessun filtro corrisponde:">
@@ -44,15 +45,21 @@
 <!ENTITY asf.dialogacceptFiltered.tooltip "">
 <!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 "">
+<!ENTITY asf.viewdloptionType1.label "">
+<!ENTITY asf.viewdloptionType2.label "">
+<!ENTITY asf.viewdloptionType3.label "">
 <!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.usecurrenturl.bool "">
 <!ENTITY asf.lastdir.bool "Ha effetto sulla cartella per il comando 'Salva come...' quando un filtro corrisponde">
-<!ENTITY asf.rightclick.bool "">
-<!ENTITY asf.rightclick.label "">
-<!ENTITY asf.rightclick.tooltip1 "">
-<!ENTITY asf.rightclick.tooltip2 "">
-<!ENTITY asf.rightclick.tooltip3 "">
+<!ENTITY asf.userightclick.bool "">
+<!ENTITY asf.userightclick.tooltip "">
+<!ENTITY asf.rightclicktimeout.bool "">
+<!ENTITY asf.rightclicktimeout.tooltip1 "">
+<!ENTITY asf.rightclicktimeout.tooltip2 "">
+<!ENTITY asf.rightclicktimeout.tooltip3 "">
+<!ENTITY asf.rightclicktimeout.tooltip4 "">
 <!ENTITY asf.rightclick.ff2.label "">
 <!ENTITY asf.rightclick.DSort.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