]> git.cworth.org Git - sup/blobdiff - lib/sup.rb
Merge commit 'origin/undo-manager'
[sup] / lib / sup.rb
index eda673b94b76bb24f660c0300aaf335a5c3726f4..96510b2e2d7419629a0a3fd3e9d96eafca29c36e 100644 (file)
@@ -6,19 +6,6 @@ require 'fileutils'
 require 'gettext'
 require 'curses'
 
-## the following magic enables wide characters when used with a ruby
-## ncurses.so that's been compiled against libncursesw. (note the w.) why
-## this works, i have no idea. much like pretty much every aspect of
-## dealing with curses.  cargo cult programming at its best.
-
-require 'dl/import'
-module LibC
-  extend DL::Importable
-  dlload Config::CONFIG['arch'] =~ /darwin/ ? "libc.dylib" : "libc.so.6"
-  extern "void setlocale(int, const char *)"
-end
-LibC.setlocale(6, "")  # LC_ALL == 6
-
 class Object
   ## this is for debugging purposes because i keep calling #id on the
   ## wrong object and i want it to throw an exception
@@ -53,7 +40,6 @@ module Redwood
   COLOR_FN   = File.join(BASE_DIR, "colors.yaml")
   SOURCE_FN  = File.join(BASE_DIR, "sources.yaml")
   LABEL_FN   = File.join(BASE_DIR, "labels.txt")
-  PERSON_FN  = File.join(BASE_DIR, "people.txt")
   CONTACT_FN = File.join(BASE_DIR, "contacts.txt")
   DRAFT_DIR  = File.join(BASE_DIR, "drafts")
   SENT_FN    = File.join(BASE_DIR, "sent.mbox")
@@ -115,7 +101,6 @@ module Redwood
   end
 
   def start
-    Redwood::PersonManager.new Redwood::PERSON_FN
     Redwood::SentManager.new Redwood::SENT_FN
     Redwood::ContactManager.new Redwood::CONTACT_FN
     Redwood::LabelManager.new Redwood::LABEL_FN
@@ -131,7 +116,6 @@ module Redwood
   def finish
     Redwood::LabelManager.save if Redwood::LabelManager.instantiated?
     Redwood::ContactManager.save if Redwood::ContactManager.instantiated?
-    Redwood::PersonManager.save if Redwood::PersonManager.instantiated?
     Redwood::BufferManager.deinstantiate! if Redwood::BufferManager.instantiated?
   end
 
@@ -222,6 +206,7 @@ else
     :confirm_no_attachments => true,
     :confirm_top_posting => true,
     :discard_snippets_from_encrypted_messages => false,
+    :default_attachment_save_dir => "",
   }
   begin
     FileUtils.mkdir_p Redwood::BASE_DIR