(self, message)
| 2930 | |
| 2931 | # Format predefined text on message reply. |
| 2932 | def quoted_text(self, message): |
| 2933 | if not BMConfigParser().safeGetBoolean('bitmessagesettings', 'replybelow'): |
| 2934 | return '\n\n------------------------------------------------------\n' + message |
| 2935 | |
| 2936 | quoteWrapper = textwrap.TextWrapper(replace_whitespace = False, |
| 2937 | initial_indent = '> ', |
| 2938 | subsequent_indent = '> ', |
| 2939 | break_long_words = False, |
| 2940 | break_on_hyphens = False) |
| 2941 | def quote_line(line): |
| 2942 | # Do quote empty lines. |
| 2943 | if line == '' or line.isspace(): |
| 2944 | return '> ' |
| 2945 | # Quote already quoted lines, but do not wrap them. |
| 2946 | elif line[0:2] == '> ': |
| 2947 | return '> ' + line |
| 2948 | # Wrap and quote lines/paragraphs new to this message. |
| 2949 | else: |
| 2950 | return quoteWrapper.fill(line) |
| 2951 | return '\n'.join([quote_line(l) for l in message.splitlines()]) + '\n\n' |
| 2952 | |
| 2953 | def setSendFromComboBox(self, address = None): |
| 2954 | if address is None: |
no test coverage detected