Remove text alignment from rating/bool type columns

This commit is contained in:
Kovid Goyal 2010-05-20 09:22:05 -06:00
parent 0376c0a6ef
commit a28c63dc1f

View File

@ -111,6 +111,10 @@ class BooksView(QTableView): # {{{
ac = a if self._model.sorted_on[1] == Qt.AscendingOrder else d ac = a if self._model.sorted_on[1] == Qt.AscendingOrder else d
ac.setCheckable(True) ac.setCheckable(True)
ac.setChecked(True) ac.setChecked(True)
if col not in ('ondevice', 'rating', 'inlibrary') and \
(not self.model().is_custom_column(col) or \
self.model().custom_columns[col]['datatype'] not in ('bool',
'rating')):
m = self.column_header_context_menu.addMenu( m = self.column_header_context_menu.addMenu(
_('Change text alignment for %s') % name) _('Change text alignment for %s') % name)
al = self._model.alignment_map.get(col, 'left') al = self._model.alignment_map.get(col, 'left')