From e5cd66db2d49b3d0226ebf63ab5df5e290d182f9 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 3 Mar 2012 12:35:38 +0100 Subject: Cleaner and more common-looking prompts --- alot/commands/globals.py | 6 +++--- alot/commands/thread.py | 4 ++-- alot/ui.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'alot') diff --git a/alot/commands/globals.py b/alot/commands/globals.py index 4d4ef3a2..29de7145 100644 --- a/alot/commands/globals.py +++ b/alot/commands/globals.py @@ -546,7 +546,7 @@ class ComposeCommand(Command): self.envelope.add('From', fromstring) else: cmpl = AccountCompleter() - fromaddress = yield ui.prompt(prefix='From>', completer=cmpl, + fromaddress = yield ui.prompt(prefix='From: ', completer=cmpl, tab=1) if fromaddress is None: ui.notify('canceled') @@ -602,7 +602,7 @@ class ComposeCommand(Command): completer = ContactsCompleter(abooks) else: completer = None - to = yield ui.prompt(prefix='To>', + to = yield ui.prompt(prefix='To: ', completer=completer) if to == None: ui.notify('canceled') @@ -611,7 +611,7 @@ class ComposeCommand(Command): if settings.get('ask_subject') and \ not 'Subject' in self.envelope.headers: - subject = yield ui.prompt(prefix='Subject>') + subject = yield ui.prompt(prefix='Subject: ') logging.debug('SUBJECT: "%s"' % subject) if subject == None: ui.notify('canceled') diff --git a/alot/commands/thread.py b/alot/commands/thread.py index db30c442..17120c18 100644 --- a/alot/commands/thread.py +++ b/alot/commands/thread.py @@ -607,7 +607,7 @@ class SaveAttachmentCommand(Command): if self.all: msg = ui.current_buffer.get_selected_message() if not self.path: - self.path = yield ui.prompt(prefix='save attachments to:', + self.path = yield ui.prompt(prefix='save attachments to: ', text=os.path.join('~', ''), completer=pcomplete) if self.path: @@ -630,7 +630,7 @@ class SaveAttachmentCommand(Command): attachment = focus.get_attachment() filename = attachment.get_filename() if not self.path: - msg = 'save attachment (%s) to:' % filename + msg = 'save attachment (%s) to: ' % filename initialtext = os.path.join('~', filename) self.path = yield ui.prompt(prefix=msg, completer=pcomplete, diff --git a/alot/ui.py b/alot/ui.py index e218ace4..4a5b5b3d 100644 --- a/alot/ui.py +++ b/alot/ui.py @@ -122,7 +122,7 @@ class UI(object): self.inputwrap.set_root(helpwrap) self.inputwrap.select_cancel_only = not relay_rest - def prompt(self, prefix='>', text=u'', completer=None, tab=0, history=[]): + def prompt(self, prefix=': ', text=u'', completer=None, tab=0, history=[]): """prompt for text input :param prefix: text to print before the input field -- cgit v1.2.3