[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sup-devel] [issue140] Execute startup hook before adding draft and sent sources
New submission from Matthias Vallentin <vallentin@icir.org>:
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 <sup-bugs@masanjin.net>
<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
Sup-devel@rubyforge.org
http://rubyforge.org/mailman/listinfo/sup-devel