500 def __remove(self): |
500 def __remove(self): |
501 """ |
501 """ |
502 Private slot to handle the Remove context menu action. |
502 Private slot to handle the Remove context menu action. |
503 """ |
503 """ |
504 itm = self.currentItem() |
504 itm = self.currentItem() |
505 res = E5MessageBox.question(self, |
505 res = E5MessageBox.yesNo(self, |
506 self.trUtf8("Remove Template"), |
506 self.trUtf8("Remove Template"), |
507 self.trUtf8("""<p>Do you really want to remove <b>{0}</b>?</p>""")\ |
507 self.trUtf8("""<p>Do you really want to remove <b>{0}</b>?</p>""")\ |
508 .format(itm.getName()), |
508 .format(itm.getName())) |
509 QMessageBox.StandardButtons(\ |
509 if not res: |
510 QMessageBox.No | \ |
|
511 QMessageBox.Yes), |
|
512 QMessageBox.No) |
|
513 if res != QMessageBox.Yes: |
|
514 return |
510 return |
515 |
511 |
516 if isinstance(itm, TemplateGroup): |
512 if isinstance(itm, TemplateGroup): |
517 self.removeGroup(itm) |
513 self.removeGroup(itm) |
518 else: |
514 else: |