From: wmorgan Date: Sat, 8 Dec 2007 05:14:57 +0000 (+0000) Subject: added --no-initial-poll option (good for development because otherwise your X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=6a9688b6e32eb6379f309db900fe2b36e8442864;p=sup added --no-initial-poll option (good for development because otherwise your imap servers get pissed with so many connections upon repeated startup) git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@743 5c8cc53c-5e98-4d25-b20a-d8db53a31250 --- diff --git a/bin/sup b/bin/sup index d3f8c78..19303c6 100644 --- a/bin/sup +++ b/bin/sup @@ -20,6 +20,7 @@ Options are: EOS opt :list_hooks, "List all hooks and descriptions thereof, and quit." opt :no_threads, "Turn of threading. Helps with debugging. (Necessarily disables background polling for new messages.)" + opt :no_initial_poll, "Don't poll for new messages when starting." opt :search, "Search for threads ", :type => String end @@ -154,9 +155,8 @@ begin Ncurses::A_BOLD c.add :completion_character_color, Ncurses::COLOR_WHITE, Ncurses::COLOR_BLACK, Ncurses::A_BOLD - c.add :reply_mode_selected_color, Ncurses::COLOR_YELLOW, Ncurses::COLOR_BLACK, Ncurses::A_BOLD - c.add :reply_mode_unselected_color, Ncurses::COLOR_CYAN, Ncurses::COLOR_BLACK - c.add :reply_mode_label_color, Ncurses::COLOR_CYAN, Ncurses::COLOR_BLACK + c.add :horizontal_selector_selected_color, Ncurses::COLOR_YELLOW, Ncurses::COLOR_BLACK, Ncurses::A_BOLD + c.add :horizontal_selector_unselected_color, Ncurses::COLOR_CYAN, Ncurses::COLOR_BLACK c.add :search_highlight_color, Ncurses::COLOR_BLACK, Ncurses::COLOR_YELLOW, Ncurses::A_BOLD, :highlight => :search_highlight_color end @@ -182,7 +182,7 @@ begin end end - imode.load_threads :num => ibuf.content_height, :when_done => lambda { reporting_thread("poll after loading inbox") { sleep 1; PollManager.poll } unless $opts[:no_threads] } + imode.load_threads :num => ibuf.content_height, :when_done => lambda { reporting_thread("poll after loading inbox") { sleep 1; PollManager.poll } unless $opts[:no_threads] || $opts[:no_initial_poll] } unless $opts[:no_threads] PollManager.start