Add customized tweak values to the tooltips

This commit is contained in:
Kovid Goyal 2011-02-11 09:05:43 -07:00
parent b3b9325294
commit 65dd616aac

View File

@ -111,7 +111,10 @@ class Tweaks(QAbstractListModel): # {{{
if role == Qt.ToolTipRole:
tt = _('This tweak has it default value')
if tweak.is_customized:
tt = _('This tweak has been customized')
tt = '<p>'+_('This tweak has been customized')
tt += '<pre>'
for varn, val in tweak.custom_values.iteritems():
tt += '%s = %r\n\n'%(varn, val)
return tt
if role == Qt.UserRole:
return tweak