]> git.cworth.org Git - sup/commitdiff
improved contact-list-mode
authorwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Sat, 13 Jan 2007 00:04:21 +0000 (00:04 +0000)
committerwmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Sat, 13 Jan 2007 00:04:21 +0000 (00:04 +0000)
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@249 5c8cc53c-5e98-4d25-b20a-d8db53a31250

doc/TODO
lib/sup/contact.rb
lib/sup/modes/contact-list-mode.rb

index 028a8c6f8bb3f665e4218cc35e62c681b3d6d591..47b20df6c245299fd1b2bf8efc8b5958f73f8b66 100644 (file)
--- a/doc/TODO
+++ b/doc/TODO
@@ -1,4 +1,4 @@
-fix up contact list mode: should display while loading, and when you add an alias, should move everything else to the right
+alias authors in thread-view-mode
 add a flag to sup-import to force the creation of a new source (see http://rubyforge.org/forum/forum.php?thread_id=10973&forum_id=10340)
 fix bug: when returning from a shelling out, ncurses is crazy 
 batch deletion
@@ -23,6 +23,7 @@ pop
 move sup-import argument handling to getopt
 be able to mark individual messages as spam in thread-view-mode
 
+x fix up contact list mode: should display while loading, and when you add an alias, should move everything else to the right
 x fix bug: envelope-to thing still not working
 x fix snippet repetitions with small snippets
 x fix next and previous in thread-view-mode with <unreceived messages>
index 715497bac4ab527792f9fdedb335e2e19d861d36..cf307610893f0ec97c08ad079a139b93a223be1f 100644 (file)
@@ -24,7 +24,7 @@ class ContactManager
     @people.delete oldentry.first if oldentry
     @people[aalias] = person
   end
-  def drop_contact person; @people.delete person; end
+  def drop_contact person; @people.find { |a, p| @people.delete a if p == person }; end
   def delete t; @people.delete t; end
   def resolve aalias; @people[aalias]; end
 
index 6b7d0c48330e599e3771a0224d98b842af561650..174a48b2bf2c5dac66e2cc239d58216423d7ff3b 100644 (file)
@@ -80,11 +80,12 @@ class ContactListMode < LineCursorMode
     a = BufferManager.ask(:alias, "alias for #{p.longname}: ", @user_contacts[p]) or return
     if a.empty?
       ContactManager.drop_contact p
+      @user_contacts.delete p
     else
       ContactManager.set_contact p, a
       @user_contacts[p] = a
-      update_text_for_line curpos
     end
+    regen_text # in case columns need to be shifted
   end
 
   def load_in_background