From mboxrd@z Thu Jan 1 00:00:00 1970 Received: by 10.42.218.138 with SMTP id hq10cs121362icb; Sat, 25 Dec 2010 09:13:17 -0800 (PST) Received: by 10.229.224.67 with SMTP id in3mr9071707qcb.246.1293297196894; Sat, 25 Dec 2010 09:13:16 -0800 (PST) Return-Path: Received: from rubyforge.org (rubyforge.org [205.234.109.19]) by mx.google.com with ESMTP id p15si19217151qct.201.2010.12.25.09.13.16; Sat, 25 Dec 2010 09:13:16 -0800 (PST) Received-SPF: pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) client-ip=205.234.109.19; Authentication-Results: mx.google.com; spf=pass (google.com: domain of sup-devel-bounces@rubyforge.org designates 205.234.109.19 as permitted sender) smtp.mail=sup-devel-bounces@rubyforge.org Received: from rubyforge.org (rubyforge.org [127.0.0.1]) by rubyforge.org (Postfix) with ESMTP id 4E6731858354; Sat, 25 Dec 2010 12:13:16 -0500 (EST) Received: from entry.masanjin.net (masanjin.net [209.20.72.13]) by rubyforge.org (Postfix) with ESMTP id 046A31858354 for ; Sat, 25 Dec 2010 11:50:58 -0500 (EST) Received: from localhost ([127.0.0.1] helo=entry.masanjin.net) by entry.masanjin.net with esmtp (Exim 4.69) (envelope-from ) id 1PWXKa-000475-IS for sup-devel@rubyforge.org; Sat, 25 Dec 2010 11:50:58 -0500 Content-Type: multipart/mixed; boundary="===============4970193371178847942==" MIME-Version: 1.0 To: sup-devel@rubyforge.org From: Matthias Vallentin Date: Sat, 25 Dec 2010 16:50:56 +0000 Precedence: bulk X-Roundup-Name: Sup issue tracker X-Roundup-Loop: hello X-Roundup-Version: 1.4.10 Message-Id: <1293295856.45.0.529523964282.issue140@masanjin.net> X-Roundup-issue-status: unread X-Roundup-issue-files: hook.diff X-Roundup-issue-priority: feature request In-Reply-To: <1293295856.45.0.529523964282.issue140@masanjin.net> Subject: [sup-devel] [issue140] Execute startup hook before adding draft and sent sources X-BeenThere: sup-devel@rubyforge.org X-Mailman-Version: 2.1.12 Reply-To: Sup issue tracker , Sup developer discussion List-Id: Sup developer discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: sup-devel-bounces@rubyforge.org Errors-To: sup-devel-bounces@rubyforge.org --===============4970193371178847942== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable New submission from Matthias Vallentin : By moving the execution of the startup hook before the selection of the dra= ft and=20 send source, this hook becomes more flexible and allows users to have more = control=20 about the source selection process. Attached is a patch that enables this functionality. ---------- files: hook.diff messages: 341 nosy: matthias priority: feature request ruby_version: 1.8 status: unread sup_version: git title: Execute startup hook before adding draft and sent sources _________________________________________ Sup issue tracker _________________________________________ --===============4970193371178847942== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="hook.diff" diff --git a/bin/sup b/bin/sup old mode 100755 new mode 100644 index 10be161..831964b --- a/bin/sup +++ b/bin/sup @@ -158,6 +158,9 @@ begin trap("TERM") { |x| $die = true } trap("WINCH") { |x| BufferManager.sigwinch_happened! } + HookManager.run "startup" + Redwood::Keymap.run_hook global_keymap + if(s = Redwood::SourceManager.source_for DraftManager.source_name) DraftManager.source = s else @@ -171,9 +174,6 @@ begin Redwood::SourceManager.add_source SentManager.default_source end - HookManager.run "startup" - Redwood::Keymap.run_hook global_keymap - debug "starting curses" Redwood::Logger.remove_sink $stderr start_cursing diff --git a/bin/sup-add b/bin/sup-add old mode 100755 new mode 100644 diff --git a/bin/sup-cmd b/bin/sup-cmd old mode 100755 new mode 100644 diff --git a/bin/sup-config b/bin/sup-config old mode 100755 new mode 100644 diff --git a/bin/sup-dump b/bin/sup-dump old mode 100755 new mode 100644 diff --git a/bin/sup-recover-sources b/bin/sup-recover-sources old mode 100755 new mode 100644 diff --git a/bin/sup-sync b/bin/sup-sync old mode 100755 new mode 100644 diff --git a/bin/sup-sync-back b/bin/sup-sync-back old mode 100755 new mode 100644 diff --git a/bin/sup-sync-back-maildir b/bin/sup-sync-back-maildir old mode 100755 new mode 100644 diff --git a/bin/sup-tweak-labels b/bin/sup-tweak-labels old mode 100755 new mode 100644 --===============4970193371178847942== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Sup-devel mailing list Sup-devel@rubyforge.org http://rubyforge.org/mailman/listinfo/sup-devel --===============4970193371178847942==--