[Pkg-mozext-commits] [nostalgy] 74/252: *** empty log message ***

David Prévot taffit at moszumanska.debian.org
Tue Jun 14 15:24:43 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository nostalgy.

commit 8930658ecb5756e31e9125ac56e7dab211eb9946
Author: frisch <frisch at 56b81dcf-5a2f-0410-9db0-014be2e416ff>
Date:   Wed May 9 16:54:12 2007 +0000

    *** empty log message ***
---
 CHANGES                |  1 +
 content/about.xhtml    |  9 +++++++++
 content/edit_prefs.js  |  2 +-
 content/edit_prefs.xul |  2 +-
 content/nostalgy.js    | 35 ++++++++++++++++++++++++++++++++---
 files                  |  1 +
 6 files changed, 45 insertions(+), 5 deletions(-)

diff --git a/CHANGES b/CHANGES
index b549b20..963207a 100644
--- a/CHANGES
+++ b/CHANGES
@@ -2,6 +2,7 @@ Since 0.2.8
   - new option "always include tags"; when disabled, tags are added to the
     completion box only if the input box starts with ":" or if
     there is no matching folder
+  - it is possible to create a new tag in the completion box
 
 0.2.8
   - make it work again with TB 1.5
diff --git a/content/about.xhtml b/content/about.xhtml
index 27c9267..7698946 100644
--- a/content/about.xhtml
+++ b/content/about.xhtml
@@ -173,6 +173,15 @@ tag on or off for the selected messages (the first selected message is used
 to determine if the tag has to be added or removed). Note that Save and Copy
 have the same behavior when applied to tags.</p>
 
+<p>It is possible to create new tags directly from the completion box.
+If you enter a string of the form <tt>:foobar</tt> or <tt>:foobar:</tt>
+(that is, a leading colon and an optional trailing colon), it will
+open the tag creation dialog with the tag name set to <tt>foobar</tt>
+(in order to confirm the creation of the tag and choose its color).
+If you confirm, the command is applied to the new tag.
+</p>
+
+
 <p>You may also use tags rather than folders as targets for Nostalgy's
 rules.</p>
 
diff --git a/content/edit_prefs.js b/content/edit_prefs.js
index 634a598..30ec24c 100644
--- a/content/edit_prefs.js
+++ b/content/edit_prefs.js
@@ -12,7 +12,7 @@ var keys = [
  ["copy_suggest","Copy as suggested","shift C"],
  ["go","Go to folder","G"],
  ["hide_folders","Hide folder pane","L"],
- ["search_sender","Show messages from same sender","`"]
+ ["search_sender","Show messages from same sender","`"],
 ];
 
 (function () {
diff --git a/content/edit_prefs.xul b/content/edit_prefs.xul
index fb59266..f35e1fa 100644
--- a/content/edit_prefs.xul
+++ b/content/edit_prefs.xul
@@ -5,7 +5,7 @@
 <dialog
         xmlns:html="http://www.w3.org/1999/xhtml"
         xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
-	buttons="accept,cancel,extra2"
+	buttons="accept,extra2"
 	ondialogaccept="return onAcceptChanges();"
 	ondialogextra2="openDialog('chrome://nostalgy/content/about.xul', 'about_nostalgy', 'resizable');"
 	buttonlabelextra2="Nostalgy usage directions..."
diff --git a/content/nostalgy.js b/content/nostalgy.js
index b41373a..b41cfad 100644
--- a/content/nostalgy.js
+++ b/content/nostalgy.js
@@ -271,11 +271,40 @@ function NostalgyCmd(lab,cmd,require_file) {
 }
 
 
+function NostalgyCreateTag(name) {
+ var tagService = 
+    Components.classes["@mozilla.org/messenger/tagservice;1"]
+              .getService(Components.interfaces.nsIMsgTagService);
+ tagService.addTag(name, '', '');
+ var key = tagService.getKeyForTag(name);
+ var ok = false;
+ var args = {result: "", keyToEdit: key, 
+             okCallback: function(){ ok = true; } };
+ var dialog = window.openDialog(
+                              "chrome://messenger/content/newTagDialog.xul",
+                              "",
+                              "chrome,titlebar,modal",
+                              args);    
+  if (ok) nostalgy_command({ tag:name,key:key });   
+  else tagService.deleteKey(key);
+}
+
 function NostalgyRunCommand() {
-  var f = NostalgyResolveFolder(nostalgy_folderBox.value);
-  if (f) nostalgy_command(f); 
-  else alert("No folder " + nostalgy_folderBox.value);
   NostalgyHide();
+  var s = nostalgy_folderBox.value;
+  var f = NostalgyResolveFolder(s);
+  if (f) nostalgy_command(f); 
+  else { 
+    if (s.substr(0,1) == ":" && s != ":") {
+      var name;
+      if (s.substr(s.length-1,1) == ":") 
+         name = s.substr(1,s.length - 2);
+      else 
+         name = s.substr(1,s.length - 1);
+      NostalgyCreateTag(name);
+    } else
+      alert("No folder " + s);
+  }
 }
 
 function MailRecipients() {
diff --git a/files b/files
index 8b27024..2bad5ea 100644
--- a/files
+++ b/files
@@ -7,6 +7,7 @@ content/about.xhtml
 content/edit_rule.xul
 content/folders.js
 content/edit_rule.js
+content/completion_prefs.js
 content/composerOverlay.xul
 content/edit_prefs.js
 content/nostalgy.js

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/nostalgy.git



More information about the Pkg-mozext-commits mailing list