Archive of RubyForge sup-talk mailing list
 help / color / mirror / Atom feed
From: Mark Alexander <marka@pobox.com>
To: sup-talk <sup-talk@rubyforge.org>
Subject: [sup-talk] [PATCH] Fix problem with account selector
Date: Mon, 15 Apr 2013 10:01:11 -0400	[thread overview]
Message-ID: <1366034093-sup-2478@x200s> (raw)

Here is the commit on my fork (I also did a pull request)
for something that I found useful when using the same
inbox for both personal and work email:

https://github.com/bloovis/sup/commit/4f843f53feac2cc7e1f7d8f5a32043878b398ace

When sending a message, the account selector was ignoring
the account set by the before-edit hook.  Fix this
by running the hook before setting up the account selector.
---
 lib/sup/modes/edit-message-mode.rb |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/sup/modes/edit-message-mode.rb b/lib/sup/modes/edit-message-mode.rb
index 464d935..1ed5969 100644
--- a/lib/sup/modes/edit-message-mode.rb
+++ b/lib/sup/modes/edit-message-mode.rb
@@ -116,6 +116,8 @@ EOS
     @selector_label_width = 0
     @async_mode = nil
 
+    HookManager.run "before-edit", :header => @header, :body => @body
+
     @account_selector = nil
     # only show account selector if there is more than one email address
     if $config[:account_selector] && AccountManager.user_emails.length > 1
@@ -145,7 +147,6 @@ EOS
       end
     add_selector @crypto_selector if @crypto_selector
 
-    HookManager.run "before-edit", :header => @header, :body => @body
     if @crypto_selector
       HookManager.run "crypto-mode", :header => @header, :body => @body, :crypto_selector => @crypto_selector
     end
-- 
1.7.9.5
_______________________________________________
sup-talk mailing list
sup-talk@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-talk


             reply	other threads:[~2013-04-15 14:55 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-15 14:01 Mark Alexander [this message]
2013-04-17 10:22 ` Mark Alexander

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1366034093-sup-2478@x200s \
    --to=marka@pobox.com \
    --cc=sup-talk@rubyforge.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox