From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.52.236.136 with SMTP id uu8csp157404vdc; Mon, 15 Apr 2013 07:55:33 -0700 (PDT) X-Received: by 10.224.16.212 with SMTP id p20mr22915801qaa.82.1366037732084; Mon, 15 Apr 2013 07:55:32 -0700 (PDT) Return-Path: Received: from rubyforge.org ([50.56.192.79]) by mx.google.com with ESMTP id o9si7089467qct.178.2013.04.15.07.55.27; Mon, 15 Apr 2013 07:55:32 -0700 (PDT) Received-SPF: pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 50.56.192.79 as permitted sender) client-ip=50.56.192.79; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-talk-bounces@rubyforge.org designates 50.56.192.79 as permitted sender) smtp.mail=sup-talk-bounces@rubyforge.org; dkim=neutral (bad format) header.i=@gmail.com Received: from localhost.localdomain (localhost [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 32BB62E134; Mon, 15 Apr 2013 14:55:28 +0000 (UTC) X-Greylist: delayed 1723 seconds by postgrey-1.31 at rubyforge; Mon, 15 Apr 2013 14:55:06 UTC Received: from mail-ve0-f182.google.com (mail-ve0-f182.google.com [209.85.128.182]) by rubyforge.org (Postfix) with ESMTP id 49A3C2E0EA for ; Mon, 15 Apr 2013 14:55:06 +0000 (UTC) Received: by mail-ve0-f182.google.com with SMTP id da11so435340veb.41 for ; Mon, 15 Apr 2013 07:55:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:content-type:from:to:subject:date:message-id :user-agent:content-transfer-encoding; bh=LUdhzLEg9dPJXK/KeE/rwcWJB3RUQORkF2TOMXHEt+8=; b=SfutMURBgMKMfa2YzqmfJVamzYm7U3cOoZwTvntfu7oo60eUym3Lw3VuJ3am7bY+k3 WHsoCc5/B/iNAMlWLkqMrmh8pemWIGXCKwY0mnRXCfgIR6nt55FUHiL/T1E9XslxRZZ8 7Ju1bykOO0r7Nl5wA8POxqaL2ljKFkN63DtsFKaA++/oW7TBWsUquGIBcRnBHe5LlkxI 1Ug/zS7OuDNBxdZuktVSBIZGpeKInxRE/mQfQNxUwDcUusIOH4rq3H8emyBTrFysIyOl 2C1KlBuz7YapwWdZ8+gI54H/XamOoJM4ivhINZbzTkTCD4bSfBSAaiDVSJWs2Zav1p4a rcSg== X-Received: by 10.59.5.226 with SMTP id cp2mr16321665ved.13.1366034474665; Mon, 15 Apr 2013 07:01:14 -0700 (PDT) Received: from localhost (c-76-19-85-15.hsd1.vt.comcast.net. [76.19.85.15]) by mx.google.com with ESMTPS id zd13sm19440483vdb.1.2013.04.15.07.01.13 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 15 Apr 2013 07:01:13 -0700 (PDT) From: Mark Alexander To: sup-talk Date: Mon, 15 Apr 2013 10:01:11 -0400 Message-Id: <1366034093-sup-2478@x200s> User-Agent: Sup/git Subject: [sup-talk] [PATCH] Fix problem with account selector X-BeenThere: sup-talk@rubyforge.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: User & developer discussion of Sup List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: sup-talk-bounces@rubyforge.org Errors-To: sup-talk-bounces@rubyforge.org 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