Templates/TemplateViewer.py

changeset 541
00e1a5d060c5
parent 539
87f9bce38a44
child 564
b3d966393ba9
--- a/Templates/TemplateViewer.py	Tue Aug 31 13:39:24 2010 +0200
+++ b/Templates/TemplateViewer.py	Tue Aug 31 16:38:06 2010 +0200
@@ -502,15 +502,11 @@
         Private slot to handle the Remove context menu action.
         """
         itm = self.currentItem()
-        res = E5MessageBox.question(self,
+        res = E5MessageBox.yesNo(self,
             self.trUtf8("Remove Template"),
             self.trUtf8("""<p>Do you really want to remove <b>{0}</b>?</p>""")\
-                .format(itm.getName()),
-            QMessageBox.StandardButtons(\
-                QMessageBox.No | \
-                QMessageBox.Yes),
-            QMessageBox.No)
-        if res != QMessageBox.Yes:
+                .format(itm.getName()))
+        if not res:
             return
 
         if isinstance(itm, TemplateGroup):
@@ -966,4 +962,4 @@
         names = []
         for group in list(self.groups.values()):
             names.extend(group.getEntryNames(start))
-        return sorted(names)
\ No newline at end of file
+        return sorted(names)

eric ide

mercurial