diff options
| author | fukachan <fukachan> | 2001-11-19 08:49:30 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2001-11-19 08:49:30 +0000 |
| commit | 822d556ebaa019f9bca50e1b39d8273babfb12ae (patch) | |
| tree | fcca1c7674ca6a0295198470f553a52fb9b49d2c /fml/lib/Mail/ThreadTrack | |
| parent | d73483302295faa4d0a1c58a3cfab4ef3c169557 (diff) | |
| download | fml8-822d556ebaa019f9bca50e1b39d8273babfb12ae.tar.gz fml8-822d556ebaa019f9bca50e1b39d8273babfb12ae.tar.bz2 fml8-822d556ebaa019f9bca50e1b39d8273babfb12ae.zip | |
split functions for list and summary.
"list" shows thread summary but "summary" shows thread summary +
article summary.
enhance fmlthread to provide CUI, oh this is useful !
Diffstat (limited to 'fml/lib/Mail/ThreadTrack')
| -rw-r--r-- | fml/lib/Mail/ThreadTrack/Print.pm | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/fml/lib/Mail/ThreadTrack/Print.pm b/fml/lib/Mail/ThreadTrack/Print.pm index af8bf132..8c937d0d 100644 --- a/fml/lib/Mail/ThreadTrack/Print.pm +++ b/fml/lib/Mail/ThreadTrack/Print.pm @@ -4,7 +4,7 @@ # All rights reserved. This program is free software; you can # redistribute it and/or modify it under the same terms as Perl itself. # -# $FML: Print.pm,v 1.15 2001/11/11 00:57:35 fukachan Exp $ +# $FML: Print.pm,v 1.16 2001/11/11 11:12:28 fukachan Exp $ # package Mail::ThreadTrack::Print; @@ -52,6 +52,21 @@ show a chain of article summary in each thread. # Arguments: $self varargs ... # Side Effects: none # Return Value: none +sub list +{ + my ($self, @opts) = @_; + + $self->_load_library(); + $self->db_open(); + $self->_do_list(@opts); + $self->db_close(); +} + + +# Descriptions: top level entrance for "show" mode +# Arguments: $self varargs ... +# Side Effects: none +# Return Value: none sub summary { my ($self, @opts) = @_; @@ -110,15 +125,28 @@ sub _load_library # SUMMARY MODE # +sub _do_summary +{ + my ($self) = @_; + $self->__do_summary( { mode => 'summary' }); +} + + +sub _do_list +{ + my ($self) = @_; + $self->__do_summary( { mode => 'list' }); +} + # Descriptions: get thread id list with status != 'open' and # show summary for the list # Arguments: $self # Side Effects: none # Return Value: none -sub _do_summary +sub __do_summary { - my ($thread) = @_; + my ($thread, $option) = @_; my $mode = $thread->get_mode || 'text'; # rh: thread id list picked from status.db @@ -130,7 +158,10 @@ sub _do_summary if (@$thread_id_list) { $thread->sort_thread_id($thread_id_list); $thread->_print_thread_summary($thread_id_list); - $thread->_print_message_summary($thread_id_list); + + if ($option->{ mode } eq 'summary') { + $thread->_print_message_summary($thread_id_list); + } } } |
