From 994974fb59afea4e781c99b0019c4d425f4ee714 Mon Sep 17 00:00:00 2001 From: Charles Haley <> Date: Sat, 21 May 2011 19:34:23 +0100 Subject: [PATCH] Add tooltip listing all colors available --- src/calibre/gui2/preferences/create_custom_column.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calibre/gui2/preferences/create_custom_column.py b/src/calibre/gui2/preferences/create_custom_column.py index 180c3aed7a..3a245580dd 100644 --- a/src/calibre/gui2/preferences/create_custom_column.py +++ b/src/calibre/gui2/preferences/create_custom_column.py @@ -132,6 +132,9 @@ class CreateCustomColumn(QDialog, Ui_QCreateCustomColumn): self.use_decorations.setChecked(c['display'].get('use_decorations', False)) elif ct == '*text': self.is_names.setChecked(c['display'].get('is_names', False)) + + all_colors = [unicode(s) for s in list(QColor.colorNames())] + self.enum_colors_label.setToolTip('

' + ', '.join(all_colors) + '

') self.exec_() def shortcut_activated(self, url): @@ -253,7 +256,6 @@ class CreateCustomColumn(QDialog, Ui_QCreateCustomColumn): c = [v.strip() for v in unicode(self.enum_colors.text()).split(',')] else: c = [] - print c, len(c) if len(c) != 0 and len(c) != len(l): return self.simple_error('', _('The colors box must be empty or ' 'contain the same number of items as the value box'))