Subject: [sup-devel] [issue140] Execute startup hook before adding draft and sent sources

From: Matthias Vallentin <[email-masked]>
Date: Sat, 25 Dec 2010 16:50:56 +0000

New submission from Matthias Vallentin <[email-masked]>:

By moving the execution of the startup hook before the selection of the draft and 
send source, this hook becomes more flexible and allows users to have more control 
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 <[email-masked]>
<http://masanjin.net/sup-bugs/issue140>
_________________________________________

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
_______________________________________________
Sup-devel mailing list
[email-masked]
http://rubyforge.org/mailman/listinfo/sup-devel