Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

qtlib: add 'labels' option to CommonMsgBox to set button labels

Changeset 32a3be9d0378

Parent 922b431dece8

by Yuki KODAMA

Changes to one file · Browse files at 32a3be9d0378 Showing diff from parent 922b431dece8 Diff from another changeset...

 
190
191
192
193
 
194
195
196
197
 
 
198
199
200
 
190
191
192
 
193
194
195
196
197
198
199
200
201
202
@@ -190,11 +190,13 @@
  return pixmap    def CommonMsgBox(icon, title, main, text='', buttons=QtGui.QMessageBox.Close, - parent=None): + labels=[], parent=None):   msg = QtGui.QMessageBox(parent)   msg.setIcon(icon)   msg.setWindowTitle(title)   msg.setStandardButtons(buttons) + for button_id, label in labels: + msg.setButtonText(button_id, label)   msg.setText('<b>%s</b>' % main)   info = ''   for line in text.split('\n'):