Project/ProjectSourcesBrowser.py

changeset 541
00e1a5d060c5
parent 538
7f1a56e80124
child 564
b3d966393ba9
--- a/Project/ProjectSourcesBrowser.py	Tue Aug 31 13:39:24 2010 +0200
+++ b/Project/ProjectSourcesBrowser.py	Tue Aug 31 16:38:06 2010 +0200
@@ -803,15 +803,11 @@
             fn = itm.fileName()
         except AttributeError:
             fn = itm.dirName()
-        res = E5MessageBox.question(self,
+        res = E5MessageBox.yesNo(self,
             self.trUtf8("Class Diagram"),
             self.trUtf8("""Include class attributes?"""),
-            QMessageBox.StandardButtons(\
-                QMessageBox.No | \
-                QMessageBox.Yes),
-            QMessageBox.Yes)
-        self.classDiagram = UMLClassDiagram(fn, self, 
-            noAttrs = (res != QMessageBox.Yes))
+            yesDefault = True)
+        self.classDiagram = UMLClassDiagram(fn, self, noAttrs = not res)
         self.classDiagram.show()
         
     def __showImportsDiagram(self):
@@ -824,15 +820,11 @@
         except AttributeError:
             fn = itm.dirName()
         package = os.path.isdir(fn) and fn or os.path.dirname(fn)
-        res = E5MessageBox.question(self,
+        res = E5MessageBox.yesNo(self,
             self.trUtf8("Imports Diagram"),
-            self.trUtf8("""Include imports from external modules?"""),
-            QMessageBox.StandardButtons(\
-                QMessageBox.No | \
-                QMessageBox.Yes),
-            QMessageBox.No)
+            self.trUtf8("""Include imports from external modules?"""))
         self.importsDiagram = ImportsDiagram(package, self, 
-            showExternalImports = (res == QMessageBox.Yes))
+            showExternalImports = res)
         self.importsDiagram.show()
         
     def __showPackageDiagram(self):
@@ -845,28 +837,21 @@
         except AttributeError:
             fn = itm.dirName()
         package = os.path.isdir(fn) and fn or os.path.dirname(fn)
-        res = E5MessageBox.question(self,
+        res = E5MessageBox.yesNo(self,
             self.trUtf8("Package Diagram"),
             self.trUtf8("""Include class attributes?"""),
-            QMessageBox.StandardButtons(\
-                QMessageBox.No | \
-                QMessageBox.Yes),
-            QMessageBox.Yes)
-        self.packageDiagram = PackageDiagram(package, self, 
-            noAttrs = (res != QMessageBox.Yes))
+            yesDefault = True)
+        self.packageDiagram = PackageDiagram(package, self, noAttrs = not res)
         self.packageDiagram.show()
         
     def __showApplicationDiagram(self):
         """
         Private method to handle the application diagram context menu action.
         """
-        res = E5MessageBox.question(self,
+        res = E5MessageBox.yesNo(self,
             self.trUtf8("Application Diagram"),
             self.trUtf8("""Include module names?"""),
-            QMessageBox.StandardButtons(\
-                QMessageBox.No | \
-                QMessageBox.Yes),
-            QMessageBox.Yes)
+            yesDefault = True)
         self.applicationDiagram = ApplicationDiagram(self.project, self, 
-            noModules = (res != QMessageBox.Yes))
-        self.applicationDiagram.show()
\ No newline at end of file
+            noModules = not res)
+        self.applicationDiagram.show()

eric ide

mercurial