From 0f0efc1ca17d94bf2540d6a792270a742e0ecaf6 Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Sat, 28 May 2011 19:42:36 +0100 Subject: [PATCH] Some improvements to the number format tooltips. --- src/calibre/gui2/preferences/create_custom_column.py | 12 ++++++++++++ src/calibre/gui2/preferences/create_custom_column.ui | 8 +++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/calibre/gui2/preferences/create_custom_column.py b/src/calibre/gui2/preferences/create_custom_column.py index f3fe8f03a3..8eaa2dd7d9 100644 --- a/src/calibre/gui2/preferences/create_custom_column.py +++ b/src/calibre/gui2/preferences/create_custom_column.py @@ -182,6 +182,18 @@ class CreateCustomColumn(QDialog, Ui_QCreateCustomColumn): getattr(self, 'enum_'+x).setVisible(col_type == 'enumeration') self.use_decorations.setVisible(col_type in ['text', 'composite', 'enumeration']) self.is_names.setVisible(col_type == '*text') + if col_type == 'int': + self.number_format_box.setToolTip('
' +
+ _('Examples: The format {0:0>4d}
'
+ 'gives a 4-digit number with leading zeros. The format '
+ '{0:d} days
prints the number then the word "days"')+ '
' +
+ _('Examples: The format {0:.1f}
gives a floating '
+ 'point number with 1 digit after the decimal point. The format '
+ 'Price: $ {0:,.2f}
prints '
+ '"Price $ " then displays the number with 2 digits '
+ 'after the decimal point and thousands separated by commas.') + '