]> git.cworth.org Git - sup/blobdiff - bin/sup
xapian index format versioning
[sup] / bin / sup
diff --git a/bin/sup b/bin/sup
index 2ea39c6d07499a2c06e59c35827d5a6ce5ae04b9..a8eaccae0e125460c9cb4213dafbcaae8e8253c2 100755 (executable)
--- a/bin/sup
+++ b/bin/sup
@@ -78,6 +78,7 @@ global_keymap = Keymap.new do |k|
   k.add :compose, "Compose new message", 'm', 'c'
   k.add :nothing, "Do nothing", :ctrl_g
   k.add :recall_draft, "Edit most recent draft message", 'R'
+  k.add :show_inbox, "Show the Inbox buffer", 'I'
 end
 
 ## the following magic enables wide characters when used with a ruby
@@ -160,18 +161,17 @@ begin
   Redwood::start
   Index.load
 
-  if(s = Index.source_for DraftManager.source_name)
+  if(s = Redwood::SourceManager.source_for DraftManager.source_name)
     DraftManager.source = s
   else
     Redwood::log "no draft source, auto-adding..."
-    Index.add_source DraftManager.new_source
+    Redwood::SourceManager.add_source DraftManager.new_source
   end
 
-  if(s = Index.source_for SentManager.source_name)
+  if(s = Redwood::SourceManager.source_for SentManager.source_uri)
     SentManager.source = s
   else
-    Redwood::log "no sent mail source, auto-adding..."
-    Index.add_source SentManager.new_source
+    Redwood::SourceManager.add_source SentManager.default_source
   end
 
   HookManager.run "startup"
@@ -191,7 +191,7 @@ begin
 
   bm.draw_screen
 
-  Index.usual_sources.each do |s|
+  Redwood::SourceManager.usual_sources.each do |s|
     next unless s.respond_to? :connect
     reporting_thread("call #connect on #{s}") do
       begin
@@ -297,6 +297,8 @@ begin
         b, new = BufferManager.spawn_unless_exists("All drafts") { LabelSearchResultsMode.new [:draft] }
         b.mode.load_threads :num => b.content_height if new
       end
+    when :show_inbox
+      BufferManager.raise_to_front ibuf
     when :nothing, InputSequenceAborted
     when :redraw
       bm.completely_redraw_screen