sup 0.16.0 → 0.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CONTRIBUTORS +18 -15
- data/History.txt +7 -0
- data/ReleaseNotes +5 -0
- data/bin/sup +2 -2
- data/bin/sup-tweak-labels +1 -1
- data/lib/sup.rb +3 -2
- data/lib/sup/account.rb +1 -1
- data/lib/sup/buffer.rb +2 -2
- data/lib/sup/contact.rb +1 -1
- data/lib/sup/crypto.rb +1 -1
- data/lib/sup/draft.rb +1 -1
- data/lib/sup/hook.rb +1 -1
- data/lib/sup/idle.rb +1 -1
- data/lib/sup/index.rb +9 -5
- data/lib/sup/label.rb +1 -1
- data/lib/sup/logger.rb +1 -1
- data/lib/sup/message.rb +2 -0
- data/lib/sup/message_chunks.rb +2 -0
- data/lib/sup/modes/compose_mode.rb +2 -2
- data/lib/sup/modes/contact_list_mode.rb +1 -1
- data/lib/sup/modes/edit_message_async_mode.rb +2 -1
- data/lib/sup/modes/edit_message_mode.rb +20 -4
- data/lib/sup/modes/forward_mode.rb +1 -1
- data/lib/sup/modes/line_cursor_mode.rb +22 -3
- data/lib/sup/modes/thread_view_mode.rb +11 -9
- data/lib/sup/person.rb +1 -1
- data/lib/sup/poll.rb +1 -1
- data/lib/sup/search.rb +1 -1
- data/lib/sup/sent.rb +1 -1
- data/lib/sup/source.rb +1 -1
- data/lib/sup/thread.rb +2 -0
- data/lib/sup/undo.rb +1 -1
- data/lib/sup/update.rb +1 -1
- data/lib/sup/util.rb +32 -30
- data/lib/sup/util/ncurses.rb +1 -1
- data/lib/sup/version.rb +1 -1
- metadata +3 -3
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e3a7c84961e495c61ffe169ec02add530f566ddd
|
|
4
|
+
data.tar.gz: f47dc9295a1b1b76a8237243a9e043908f090727
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 34f77536b3f04ac960ee9f2fc835f41ac7ca0f818941d25d74b61007660e373fa6b830a038e68c10fd97eb8f437b2f4d5bd9d399f1a1ffddc3424432e327b9a8
|
|
7
|
+
data.tar.gz: a501e2f21f8e76aa018deea70a0dd9a16014fa6546e996a0a1f7cca23a9993749d72737dec292f216806eb8888d900a343dd44d88f7bc0fa7f2b9d24000ca62a
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data.tar.gz.sig
CHANGED
|
Binary file
|
data/CONTRIBUTORS
CHANGED
|
@@ -14,13 +14,14 @@ Eric Sherman <hyperbolist at the gmail dot coms>
|
|
|
14
14
|
Tero Tilus <tero at the tilus dot nets>
|
|
15
15
|
Ben Walton <bwalton at the artsci.utoronto dot cas>
|
|
16
16
|
Mike Stipicevic <stipim at the rpi dot edus>
|
|
17
|
+
Martin Bähr <mbaehr at the societyserver dot orgs>
|
|
17
18
|
Clint Byrum <clint at the ubuntu dot coms>
|
|
18
19
|
Marcus Williams <marcus-sup at the bar-coded dot nets>
|
|
19
20
|
Lionel Ott <white.magic at the gmx dot des>
|
|
20
21
|
Gaudenz Steinlin <gaudenz at the soziologie dot chs>
|
|
21
22
|
Matthieu Rakotojaona <matthieu.rakotojaona at the gmail dot coms>
|
|
22
|
-
Ingmar Vanhassel <ingmar at the exherbo dot orgs>
|
|
23
23
|
Mark Alexander <marka at the pobox dot coms>
|
|
24
|
+
Ingmar Vanhassel <ingmar at the exherbo dot orgs>
|
|
24
25
|
Edward Z. Yang <ezyang at the mit dot edus>
|
|
25
26
|
Timon Vonk <timonv at the gmail dot coms>
|
|
26
27
|
julien@macbook <julien.stechele at the gmail dot coms>
|
|
@@ -30,49 +31,51 @@ Richard Brown <rbrown at the exherbo dot orgs>
|
|
|
30
31
|
Anthony Martinez <pi+sup at the pihost dot uss>
|
|
31
32
|
Marc Hartstein <marc.hartstein at the alum.vassar dot edus>
|
|
32
33
|
Israel Herraiz <israel.herraiz at the gmail dot coms>
|
|
34
|
+
Christopher Corley <cscorley at the ua dot edus>
|
|
35
|
+
Markus Klinik <mkl at the lambdanaut dot nets>
|
|
33
36
|
Bo Borgerson <gigabo at the gmail dot coms>
|
|
34
37
|
Atte Kojo <atte.kojo at the reaktor dot fis>
|
|
35
38
|
Michael Hamann <michael at the content-space dot des>
|
|
36
|
-
William Erik Baxter <web at the superscript dot coms>
|
|
37
39
|
Jonathan Lassoff <jof at the thejof dot coms>
|
|
38
|
-
|
|
40
|
+
William Erik Baxter <web at the superscript dot coms>
|
|
39
41
|
Grant Hollingworth <grant at the antiflux dot orgs>
|
|
40
|
-
Ico Doornekamp <ico at the pruts dot nls>
|
|
41
42
|
Adeodato Simó <dato at the net.com.org dot ess>
|
|
43
|
+
Ico Doornekamp <ico at the pruts dot nls>
|
|
42
44
|
Daniel Schoepe <daniel.schoepe at the googlemail dot coms>
|
|
43
45
|
Jason Petsod <jason at the petsod dot orgs>
|
|
44
46
|
James Taylor <james at the jamestaylor dot orgs>
|
|
45
|
-
Steve Goldman <sgoldman at the tower-research dot coms>
|
|
46
47
|
Robin Burchell <viroteck at the viroteck dot nets>
|
|
48
|
+
Steve Goldman <sgoldman at the tower-research dot coms>
|
|
47
49
|
Peter Harkins <ph at the malaprop dot orgs>
|
|
48
50
|
Decklin Foster <decklin at the red-bean dot coms>
|
|
49
51
|
Cameron Matheson <cam+sup at the cammunism dot orgs>
|
|
50
|
-
Carl Worth <cworth at the cworth dot orgs>
|
|
51
52
|
Alex Vandiver <alex at the chmrr dot nets>
|
|
52
|
-
|
|
53
|
+
Carl Worth <cworth at the cworth dot orgs>
|
|
53
54
|
Andrew Pimlott <andrew at the pimlott dot nets>
|
|
55
|
+
Jeff Balogh <its.jeff.balogh at the gmail dot coms>
|
|
54
56
|
Matías Aguirre <matiasaguirre at the gmail dot coms>
|
|
55
57
|
Kornilios Kourtis <kkourt at the cslab.ece.ntua dot grs>
|
|
56
58
|
Lars Fischer <fischer at the wiwi.uni-siegen dot des>
|
|
57
59
|
Giorgio Lando <patroclo7 at the gmail dot coms>
|
|
58
60
|
Kevin Riggle <kevinr at the free-dissociation dot coms>
|
|
59
61
|
Benoît PIERRE <benoit.pierre at the gmail dot coms>
|
|
60
|
-
Alvaro Herrera <alvherre at the alvh.no-ip dot orgs>
|
|
61
62
|
Steven Lawrance <stl at the koffein dot nets>
|
|
63
|
+
Alvaro Herrera <alvherre at the alvh.no-ip dot orgs>
|
|
62
64
|
Jonah <Jonah at the GoodCoffee dot cas>
|
|
63
65
|
ian <itaylor at the uark dot edus>
|
|
64
|
-
MichaelRevell <mikearevell at the gmail dot coms>
|
|
65
|
-
Per Andersson <avtobiff at the gmail dot coms>
|
|
66
|
-
Todd Eisenberger <teisenbe at the andrew.cmu dot edus>
|
|
67
66
|
Gregor Hoffleit <gregor at the sam.mediasupervision dot des>
|
|
67
|
+
Per Andersson <avtobiff at the gmail dot coms>
|
|
68
68
|
Adam Lloyd <adam at the alloy-d dot nets>
|
|
69
|
+
Todd Eisenberger <teisenbe at the andrew.cmu dot edus>
|
|
70
|
+
MichaelRevell <mikearevell at the gmail dot coms>
|
|
69
71
|
0xACE <0xACE at the users.noreply.github dot coms>
|
|
70
72
|
Steven Walter <swalter at the monarch.(none)>
|
|
71
|
-
|
|
73
|
+
Steven Schmeiser <steven at the schmeiser dot orgs>
|
|
74
|
+
Stefan Lundström <lundst at the snabb.(none)>
|
|
75
|
+
William A. Kennington III <william at the wkennington dot coms>
|
|
76
|
+
akojo <atte.kojo at the gmail dot coms>
|
|
72
77
|
Horacio Sanson <horacio at the skillupjapan.co dot jps>
|
|
73
78
|
Matthias Vallentin <vallentin at the icir dot orgs>
|
|
74
|
-
|
|
75
|
-
William A. Kennington III <william at the wkennington dot coms>
|
|
76
|
-
Stefan Lundström <lundst at the snabb.(none)>
|
|
79
|
+
Jon M. Dugan <jdugan at the es dot nets>
|
|
77
80
|
Johannes Larsen <johs.a.larsen at the gmail dot coms>
|
|
78
81
|
Kirill Smelkov <kirr at the landau.phys.spbu dot rus>
|
data/History.txt
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
== 0.17.0 / 2014-04-11
|
|
2
|
+
|
|
3
|
+
* add continuous scrolling to thread view
|
|
4
|
+
* add option for always editing in async mode
|
|
5
|
+
* bugfix: fix completion char
|
|
6
|
+
* bugfix: thread-view: dont close message when it is the first or last
|
|
7
|
+
|
|
1
8
|
== 0.16.0 / 2014-03-21
|
|
2
9
|
|
|
3
10
|
* sup-sync-back-mbox removed.
|
data/ReleaseNotes
CHANGED
data/bin/sup
CHANGED
|
@@ -223,7 +223,7 @@ begin
|
|
|
223
223
|
to = Person.from_address_list $opts[:compose]
|
|
224
224
|
mode = ComposeMode.new :to => to, :subj => $opts[:subject]
|
|
225
225
|
BufferManager.spawn "New Message", mode
|
|
226
|
-
mode.
|
|
226
|
+
mode.default_edit_message
|
|
227
227
|
end
|
|
228
228
|
|
|
229
229
|
unless $opts[:no_threads]
|
|
@@ -337,7 +337,7 @@ begin
|
|
|
337
337
|
Index.each_id_by_date(:label => :draft) { |mid, builder| m = builder.call }
|
|
338
338
|
r = ResumeMode.new(m)
|
|
339
339
|
BufferManager.spawn "Edit message", r
|
|
340
|
-
r.
|
|
340
|
+
r.default_edit_message
|
|
341
341
|
else
|
|
342
342
|
b, new = BufferManager.spawn_unless_exists("All drafts") { LabelSearchResultsMode.new [:draft] }
|
|
343
343
|
b.mode.load_threads :num => b.content_height if new
|
data/bin/sup-tweak-labels
CHANGED
|
@@ -85,7 +85,7 @@ begin
|
|
|
85
85
|
|
|
86
86
|
parsed_query = index.parse_query query
|
|
87
87
|
parsed_query.merge! :load_spam => true, :load_deleted => true, :load_killed => true
|
|
88
|
-
ids =
|
|
88
|
+
ids = index.to_enum(:each_id, parsed_query)
|
|
89
89
|
num_total = index.num_results_for parsed_query
|
|
90
90
|
|
|
91
91
|
$stderr.puts "Found #{num_total} documents across #{source_ids.length} sources. Scanning..."
|
data/lib/sup.rb
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
|
|
3
3
|
require 'rubygems'
|
|
4
4
|
require 'yaml'
|
|
5
|
-
YAML::ENGINE.yamler = 'psych'
|
|
6
5
|
require 'zlib'
|
|
7
6
|
require 'thread'
|
|
8
7
|
require 'fileutils'
|
|
@@ -333,7 +332,9 @@ EOM
|
|
|
333
332
|
:slip_rows => 0,
|
|
334
333
|
:col_jump => 2,
|
|
335
334
|
:stem_language => "english",
|
|
336
|
-
:sync_back_to_maildir => false
|
|
335
|
+
:sync_back_to_maildir => false,
|
|
336
|
+
:continuous_scroll => false,
|
|
337
|
+
:always_edit_async => false,
|
|
337
338
|
}
|
|
338
339
|
if File.exists? filename
|
|
339
340
|
config = Redwood::load_yaml_obj filename
|
data/lib/sup/account.rb
CHANGED
data/lib/sup/buffer.rb
CHANGED
|
@@ -99,7 +99,7 @@ class Buffer
|
|
|
99
99
|
end
|
|
100
100
|
|
|
101
101
|
class BufferManager
|
|
102
|
-
include Singleton
|
|
102
|
+
include Redwood::Singleton
|
|
103
103
|
|
|
104
104
|
attr_reader :focus_buf
|
|
105
105
|
|
|
@@ -547,7 +547,7 @@ EOS
|
|
|
547
547
|
kill_buffer completion_buf if completion_buf
|
|
548
548
|
|
|
549
549
|
shorts = tf.completions.map { |full, short| short }
|
|
550
|
-
prefix_len = shorts.shared_prefix.length
|
|
550
|
+
prefix_len = shorts.shared_prefix(caseless=true).length
|
|
551
551
|
|
|
552
552
|
mode = CompletionMode.new shorts, :header => "Possible completions for \"#{tf.value}\": ", :prefix_len => prefix_len
|
|
553
553
|
completion_buf = spawn "<completions>", mode, :height => 10
|
data/lib/sup/contact.rb
CHANGED
data/lib/sup/crypto.rb
CHANGED
data/lib/sup/draft.rb
CHANGED
data/lib/sup/hook.rb
CHANGED
data/lib/sup/idle.rb
CHANGED
data/lib/sup/index.rb
CHANGED
|
@@ -55,7 +55,7 @@ EOS
|
|
|
55
55
|
def method_missing m; @h[m.to_s] end
|
|
56
56
|
end
|
|
57
57
|
|
|
58
|
-
include Singleton
|
|
58
|
+
include Redwood::Singleton
|
|
59
59
|
|
|
60
60
|
def initialize dir=BASE_DIR
|
|
61
61
|
@dir = dir
|
|
@@ -98,9 +98,9 @@ EOS
|
|
|
98
98
|
end
|
|
99
99
|
end
|
|
100
100
|
|
|
101
|
-
def load
|
|
101
|
+
def load failsafe=false
|
|
102
102
|
SourceManager.load_sources
|
|
103
|
-
load_index
|
|
103
|
+
load_index failsafe
|
|
104
104
|
end
|
|
105
105
|
|
|
106
106
|
def save
|
|
@@ -110,7 +110,11 @@ EOS
|
|
|
110
110
|
save_index
|
|
111
111
|
end
|
|
112
112
|
|
|
113
|
-
def
|
|
113
|
+
def get_xapian
|
|
114
|
+
@xapian
|
|
115
|
+
end
|
|
116
|
+
|
|
117
|
+
def load_index failsafe=false
|
|
114
118
|
path = File.join(@dir, 'xapian')
|
|
115
119
|
if File.exists? path
|
|
116
120
|
@xapian = Xapian::WritableDatabase.new(path, Xapian::DB_OPEN)
|
|
@@ -329,7 +333,7 @@ EOS
|
|
|
329
333
|
synchronize { get_entry(id)[:source_id] }
|
|
330
334
|
end
|
|
331
335
|
|
|
332
|
-
## Yields each
|
|
336
|
+
## Yields each term in the index that starts with prefix
|
|
333
337
|
def each_prefixed_term prefix
|
|
334
338
|
term = @xapian._dangerous_allterms_begin prefix
|
|
335
339
|
lastTerm = @xapian._dangerous_allterms_end prefix
|
data/lib/sup/label.rb
CHANGED
data/lib/sup/logger.rb
CHANGED
data/lib/sup/message.rb
CHANGED
data/lib/sup/message_chunks.rb
CHANGED
|
@@ -16,7 +16,7 @@ class ComposeMode < EditMessageMode
|
|
|
16
16
|
super :header => header, :body => (opts[:body] || [])
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
-
def
|
|
19
|
+
def default_edit_message
|
|
20
20
|
edited = super
|
|
21
21
|
BufferManager.kill_buffer self.buffer unless edited
|
|
22
22
|
edited
|
|
@@ -31,7 +31,7 @@ class ComposeMode < EditMessageMode
|
|
|
31
31
|
|
|
32
32
|
mode = ComposeMode.new :from => from, :to => to, :cc => cc, :bcc => bcc, :subj => subj
|
|
33
33
|
BufferManager.spawn "New Message", mode
|
|
34
|
-
mode.
|
|
34
|
+
mode.default_edit_message
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
|
|
@@ -29,11 +29,12 @@ EOS
|
|
|
29
29
|
@orig_mtime = File.mtime @file_path
|
|
30
30
|
|
|
31
31
|
@text = ["ASYNC MESSAGE EDIT",
|
|
32
|
-
"", "Your message with subject:", msg_subject, "is saved in a file:", "", @file_path, "",
|
|
32
|
+
"", "Your message with subject:", msg_subject, "is saved in a file:", "", @file_path, "",
|
|
33
33
|
"You can edit your message in the editor of your choice and continue to",
|
|
34
34
|
"use sup while you edit your message.", "",
|
|
35
35
|
"Press <Enter> to have the file path copied to the clipboard.", "",
|
|
36
36
|
"When you have finished editing, select this buffer and press 'E'.",]
|
|
37
|
+
run_async_hook()
|
|
37
38
|
super()
|
|
38
39
|
end
|
|
39
40
|
|
|
@@ -79,8 +79,8 @@ EOS
|
|
|
79
79
|
k.add :edit_to, "Edit To:", 't'
|
|
80
80
|
k.add :edit_cc, "Edit Cc:", 'c'
|
|
81
81
|
k.add :edit_subject, "Edit Subject", 's'
|
|
82
|
-
k.add :
|
|
83
|
-
k.add :
|
|
82
|
+
k.add :default_edit_message, "Edit message (default)", :enter
|
|
83
|
+
k.add :alternate_edit_message, "Edit message (alternate, asynchronously)", 'E'
|
|
84
84
|
k.add :save_as_draft, "Save as draft", 'P'
|
|
85
85
|
k.add :attach_file, "Attach a file", 'a'
|
|
86
86
|
k.add :delete_attachment, "Delete an attachment", 'd'
|
|
@@ -105,7 +105,7 @@ EOS
|
|
|
105
105
|
begin
|
|
106
106
|
hostname = File.open("/etc/mailname", "r").gets.chomp
|
|
107
107
|
rescue
|
|
108
|
-
|
|
108
|
+
nil
|
|
109
109
|
end
|
|
110
110
|
hostname = Socket.gethostname if hostname.nil? or hostname.empty?
|
|
111
111
|
|
|
@@ -182,7 +182,7 @@ EOS
|
|
|
182
182
|
if lines > curpos
|
|
183
183
|
return
|
|
184
184
|
elsif (curpos - lines) >= @header_lines.length
|
|
185
|
-
|
|
185
|
+
default_edit_message
|
|
186
186
|
else
|
|
187
187
|
edit_field @header_lines[curpos - lines]
|
|
188
188
|
end
|
|
@@ -226,6 +226,22 @@ EOS
|
|
|
226
226
|
end
|
|
227
227
|
end
|
|
228
228
|
|
|
229
|
+
def default_edit_message
|
|
230
|
+
if $config[:always_edit_async]
|
|
231
|
+
return edit_message_async
|
|
232
|
+
else
|
|
233
|
+
return edit_message
|
|
234
|
+
end
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
def alternate_edit_message
|
|
238
|
+
if $config[:always_edit_async]
|
|
239
|
+
return edit_message
|
|
240
|
+
else
|
|
241
|
+
return edit_message_async
|
|
242
|
+
end
|
|
243
|
+
end
|
|
244
|
+
|
|
229
245
|
def edit_message
|
|
230
246
|
old_from = @header["From"] if @account_selector
|
|
231
247
|
|
|
@@ -94,7 +94,17 @@ protected
|
|
|
94
94
|
call_load_more_callbacks buffer.content_height if @curpos >= lines - [buffer.content_height/2,1].max
|
|
95
95
|
return false unless @curpos < lines - 1
|
|
96
96
|
|
|
97
|
-
if @curpos
|
|
97
|
+
if $config[:continuous_scroll] and (@curpos == botline - 3 and @curpos < lines - 3)
|
|
98
|
+
# load more lines, one at a time.
|
|
99
|
+
jump_to_line topline + 1
|
|
100
|
+
@curpos += 1
|
|
101
|
+
unless buffer.dirty?
|
|
102
|
+
draw_line @curpos - 1
|
|
103
|
+
draw_line @curpos
|
|
104
|
+
set_status
|
|
105
|
+
buffer.commit
|
|
106
|
+
end
|
|
107
|
+
elsif @curpos >= botline - 1
|
|
98
108
|
page_down
|
|
99
109
|
set_cursor_pos topline
|
|
100
110
|
else
|
|
@@ -111,7 +121,17 @@ protected
|
|
|
111
121
|
|
|
112
122
|
def cursor_up
|
|
113
123
|
return false unless @curpos > @cursor_top
|
|
114
|
-
|
|
124
|
+
|
|
125
|
+
if $config[:continuous_scroll] and (@curpos == topline + 2)
|
|
126
|
+
jump_to_line topline - 1
|
|
127
|
+
@curpos -= 1
|
|
128
|
+
unless buffer.dirty?
|
|
129
|
+
draw_line @curpos + 1
|
|
130
|
+
draw_line @curpos
|
|
131
|
+
set_status
|
|
132
|
+
buffer.commit
|
|
133
|
+
end
|
|
134
|
+
elsif @curpos == topline
|
|
115
135
|
old_topline = topline
|
|
116
136
|
page_up
|
|
117
137
|
set_cursor_pos [old_topline - 1, topline].max
|
|
@@ -180,5 +200,4 @@ private
|
|
|
180
200
|
@load_more_q.push size if $config[:load_more_threads_when_scrolling]
|
|
181
201
|
end
|
|
182
202
|
end
|
|
183
|
-
|
|
184
203
|
end
|
|
@@ -1,5 +1,3 @@
|
|
|
1
|
-
require 'shellwords'
|
|
2
|
-
|
|
3
1
|
module Redwood
|
|
4
2
|
|
|
5
3
|
class ThreadViewMode < LineCursorMode
|
|
@@ -354,7 +352,7 @@ EOS
|
|
|
354
352
|
m = @message_lines[curpos] or return
|
|
355
353
|
mode = ComposeMode.new(:body => m.quotable_body_lines, :to => m.to, :cc => m.cc, :subj => m.subj, :bcc => m.bcc, :refs => m.refs, :replytos => m.replytos)
|
|
356
354
|
BufferManager.spawn "edit as new", mode
|
|
357
|
-
mode.
|
|
355
|
+
mode.default_edit_message
|
|
358
356
|
end
|
|
359
357
|
|
|
360
358
|
def save_to_disk
|
|
@@ -363,12 +361,12 @@ EOS
|
|
|
363
361
|
when Chunk::Attachment
|
|
364
362
|
default_dir = $config[:default_attachment_save_dir]
|
|
365
363
|
default_dir = ENV["HOME"] if default_dir.nil? || default_dir.empty?
|
|
366
|
-
default_fn = File.expand_path File.join(default_dir,
|
|
364
|
+
default_fn = File.expand_path File.join(default_dir, chunk.filename)
|
|
367
365
|
fn = BufferManager.ask_for_filename :filename, "Save attachment to file or directory: ", default_fn, true
|
|
368
366
|
|
|
369
367
|
# if user selects directory use file name from message
|
|
370
368
|
if fn and File.directory? fn
|
|
371
|
-
fn = File.join(fn,
|
|
369
|
+
fn = File.join(fn, chunk.filename)
|
|
372
370
|
end
|
|
373
371
|
|
|
374
372
|
save_to_file(fn) { |f| f.print chunk.raw_content } if fn
|
|
@@ -392,7 +390,7 @@ EOS
|
|
|
392
390
|
num_errors = 0
|
|
393
391
|
m.chunks.each do |chunk|
|
|
394
392
|
next unless chunk.is_a?(Chunk::Attachment)
|
|
395
|
-
fn = File.join(folder,
|
|
393
|
+
fn = File.join(folder, chunk.filename)
|
|
396
394
|
num_errors += 1 unless save_to_file(fn, false) { |f| f.print chunk.raw_content }
|
|
397
395
|
num += 1
|
|
398
396
|
end
|
|
@@ -423,7 +421,7 @@ EOS
|
|
|
423
421
|
mode = ResumeMode.new m
|
|
424
422
|
BufferManager.spawn "Edit message", mode
|
|
425
423
|
BufferManager.kill_buffer self.buffer
|
|
426
|
-
mode.
|
|
424
|
+
mode.default_edit_message
|
|
427
425
|
else
|
|
428
426
|
BufferManager.flash "Not a draft message!"
|
|
429
427
|
end
|
|
@@ -456,13 +454,15 @@ EOS
|
|
|
456
454
|
m = (curpos ... @message_lines.length).argfind { |i| @message_lines[i] }
|
|
457
455
|
return unless m
|
|
458
456
|
|
|
457
|
+
nextm = @layout[m].next
|
|
458
|
+
return unless nextm
|
|
459
|
+
|
|
459
460
|
if @layout[m].toggled_state == true
|
|
460
461
|
@layout[m].state = :closed
|
|
461
462
|
@layout[m].toggled_state = false
|
|
462
463
|
update
|
|
463
464
|
end
|
|
464
465
|
|
|
465
|
-
nextm = @layout[m].next
|
|
466
466
|
if @layout[nextm].state == :closed
|
|
467
467
|
@layout[nextm].state = :open
|
|
468
468
|
@layout[nextm].toggled_state = true
|
|
@@ -493,13 +493,15 @@ EOS
|
|
|
493
493
|
m = (0 .. curpos).to_a.reverse.argfind { |i| @message_lines[i] }
|
|
494
494
|
return unless m
|
|
495
495
|
|
|
496
|
+
nextm = @layout[m].prev
|
|
497
|
+
return unless nextm
|
|
498
|
+
|
|
496
499
|
if @layout[m].toggled_state == true
|
|
497
500
|
@layout[m].state = :closed
|
|
498
501
|
@layout[m].toggled_state = false
|
|
499
502
|
update
|
|
500
503
|
end
|
|
501
504
|
|
|
502
|
-
nextm = @layout[m].prev
|
|
503
505
|
if @layout[nextm].state == :closed
|
|
504
506
|
@layout[nextm].state = :open
|
|
505
507
|
@layout[nextm].toggled_state = true
|
data/lib/sup/person.rb
CHANGED
data/lib/sup/poll.rb
CHANGED
data/lib/sup/search.rb
CHANGED
data/lib/sup/sent.rb
CHANGED
data/lib/sup/source.rb
CHANGED
data/lib/sup/thread.rb
CHANGED
data/lib/sup/undo.rb
CHANGED
data/lib/sup/update.rb
CHANGED
data/lib/sup/util.rb
CHANGED
|
@@ -632,39 +632,41 @@ end
|
|
|
632
632
|
## classes that inherit this can define initialize. however, you cannot call
|
|
633
633
|
## .new on the class. To get the instance of the class, call .instance;
|
|
634
634
|
## to create the instance, call init.
|
|
635
|
-
module
|
|
636
|
-
module
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
635
|
+
module Redwood
|
|
636
|
+
module Singleton
|
|
637
|
+
module ClassMethods
|
|
638
|
+
def instance; @instance; end
|
|
639
|
+
def instantiated?; defined?(@instance) && !@instance.nil?; end
|
|
640
|
+
def deinstantiate!; @instance = nil; end
|
|
641
|
+
def method_missing meth, *a, &b
|
|
642
|
+
raise "no #{name} instance defined in method call to #{meth}!" unless defined? @instance
|
|
643
|
+
|
|
644
|
+
## if we've been deinstantiated, just drop all calls. this is
|
|
645
|
+
## useful because threads that might be active during the
|
|
646
|
+
## cleanup process (e.g. polling) would otherwise have to
|
|
647
|
+
## special-case every call to a Singleton object
|
|
648
|
+
return nil if @instance.nil?
|
|
649
|
+
|
|
650
|
+
# Speed up further calls by defining a shortcut around method_missing
|
|
651
|
+
if meth.to_s[-1,1] == '='
|
|
652
|
+
# Argh! Inconsistency! Setters do not work like all the other methods.
|
|
653
|
+
class_eval "def self.#{meth}(a); @instance.send :#{meth}, a; end"
|
|
654
|
+
else
|
|
655
|
+
class_eval "def self.#{meth}(*a, &b); @instance.send :#{meth}, *a, &b; end"
|
|
656
|
+
end
|
|
656
657
|
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
658
|
+
@instance.send meth, *a, &b
|
|
659
|
+
end
|
|
660
|
+
def init *args
|
|
661
|
+
raise "there can be only one! (instance)" if instantiated?
|
|
662
|
+
@instance = new(*args)
|
|
663
|
+
end
|
|
662
664
|
end
|
|
663
|
-
end
|
|
664
665
|
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
666
|
+
def self.included klass
|
|
667
|
+
klass.private_class_method :allocate, :new
|
|
668
|
+
klass.extend ClassMethods
|
|
669
|
+
end
|
|
668
670
|
end
|
|
669
671
|
end
|
|
670
672
|
|
data/lib/sup/util/ncurses.rb
CHANGED
data/lib/sup/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sup
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.17.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- William Morgan
|
|
@@ -32,7 +32,7 @@ cert_chain:
|
|
|
32
32
|
+JMuDs+iWefpF4R3BySoOc1Q4WoES3+oc0qo37MsAZyfnQIPTZkyLZCMxeL6Mha4
|
|
33
33
|
hFc2yANBj8voaY5C74Cg2VqExtcnSaxUtW9wC4w5hOlg0AVfb1JWzg==
|
|
34
34
|
-----END CERTIFICATE-----
|
|
35
|
-
date: 2014-
|
|
35
|
+
date: 2014-04-11 00:00:00.000000000 Z
|
|
36
36
|
dependencies:
|
|
37
37
|
- !ruby/object:Gem::Dependency
|
|
38
38
|
name: xapian-ruby
|
|
@@ -365,7 +365,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
365
365
|
requirements:
|
|
366
366
|
- - ">="
|
|
367
367
|
- !ruby/object:Gem::Version
|
|
368
|
-
version: 1.9.
|
|
368
|
+
version: 1.9.3
|
|
369
369
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
370
370
|
requirements:
|
|
371
371
|
- - ">="
|
metadata.gz.sig
CHANGED
|
Binary file
|