Commit b4e3ea995a8175e15c5f0ca296178885f58f5b36
- Diff rendering mode:
- inline
- side by side
lib/sup/modes/inbox-mode.rb
(0 / 7)
|   | |||
| 11 | 11 | ||
| 12 | 12 | def initialize | |
| 13 | 13 | super [:inbox, :sent, :draft], { :label => :inbox, :skip_killed => true } | |
| 14 | raise "can't have more than one!" if defined? @@instance | ||
| 15 | @@instance = self | ||
| 16 | 14 | end | |
| 17 | |||
| 18 | ## label-list-mode wants to be able to raise us if the user selects | ||
| 19 | ## the "inbox" label, so we need to keep our singletonness around | ||
| 20 | def self.instance; @@instance; end | ||
| 21 | def killable?; false; end | ||
| 22 | 15 | ||
| 23 | 16 | def archive | |
| 24 | 17 | return unless cursor_thread |
lib/sup/modes/label-search-results-mode.rb
(1 / 1)
|   | |||
| 27 | 27 | case label | |
| 28 | 28 | when nil | |
| 29 | 29 | when :inbox | |
| 30 | BufferManager.raise_to_front InboxMode.instance.buffer | ||
| 30 | BufferManager.raise_to_front MainInboxMode.instance.buffer | ||
| 31 | 31 | else | |
| 32 | 32 | b, new = BufferManager.spawn_unless_exists("All threads with label '#{label}'") { LabelSearchResultsMode.new [label] } | |
| 33 | 33 | b.mode.load_threads :num => b.content_height if new |
lib/sup/modes/main-inbox-mode.rb
(11 / 0)
|   | |||
| 1 | 1 | module Redwood | |
| 2 | 2 | ||
| 3 | 3 | class MainInboxMode < InboxMode | |
| 4 | |||
| 5 | def initialize | ||
| 6 | super | ||
| 7 | raise "can't have more than one!" if defined? @@instance | ||
| 8 | @@instance = self | ||
| 9 | end | ||
| 10 | |||
| 11 | ## label-list-mode wants to be able to raise us if the user selects | ||
| 12 | ## the "inbox" label, so we need to keep our singletonness around | ||
| 13 | def self.instance; @@instance; end | ||
| 14 | def killable?; false; end | ||
| 4 | 15 | end | |
| 5 | 16 | ||
| 6 | 17 | end |
Comments
Add a new comment:
Login or create an account to post a comment
Add your comment
Please log in to comment

