20 |
20 |
21 from .FormSelectionDialog import FormSelectionDialog |
21 from .FormSelectionDialog import FormSelectionDialog |
22 from .CreateParametersDialog import CreateParametersDialog |
22 from .CreateParametersDialog import CreateParametersDialog |
23 from .PyramidDialog import PyramidDialog |
23 from .PyramidDialog import PyramidDialog |
24 from .DistributionTypeSelectionDialog import DistributionTypeSelectionDialog |
24 from .DistributionTypeSelectionDialog import DistributionTypeSelectionDialog |
|
25 from .PyramidRoutesDialog import PyramidRoutesDialog |
25 |
26 |
26 import Utilities |
27 import Utilities |
27 from Globals import isWindowsPlatform |
28 from Globals import isWindowsPlatform |
28 import UI.PixmapCache |
29 import UI.PixmapCache |
29 |
30 |
205 """<p>Show views matching a given URL.</p>""" |
206 """<p>Show views matching a given URL.</p>""" |
206 )) |
207 )) |
207 self.showViewsAct.triggered[()].connect(self.__showMatchingViews) |
208 self.showViewsAct.triggered[()].connect(self.__showMatchingViews) |
208 self.actions.append(self.showViewsAct) |
209 self.actions.append(self.showViewsAct) |
209 |
210 |
210 self.showRoutesAct = E5Action(self.trUtf8('Show All Routes'), |
211 self.showRoutesAct = E5Action(self.trUtf8('Show Routes'), |
211 self.trUtf8('Show All &Routes'), |
212 self.trUtf8('Show &Routes'), |
212 0, 0, |
213 0, 0, |
213 self,'pyramid_show_routes') |
214 self,'pyramid_show_routes') |
214 self.showRoutesAct.setStatusTip(self.trUtf8( |
215 self.showRoutesAct.setStatusTip(self.trUtf8( |
215 'Show all URL dispatch routes used by a Pyramid application')) |
216 'Show all URL dispatch routes used by a Pyramid application')) |
216 self.showRoutesAct.setWhatsThis(self.trUtf8( |
217 self.showRoutesAct.setWhatsThis(self.trUtf8( |
217 """<b>Show All Routes</b>""" |
218 """<b>Show Routes</b>""" |
218 """<p>Show all URL dispatch routes used by a Pyramid application""" |
219 """<p>Show all URL dispatch routes used by a Pyramid application""" |
219 """ in the order in which they are evaluated.</p>""" |
220 """ in the order in which they are evaluated.</p>""" |
220 )) |
221 )) |
221 self.showRoutesAct.triggered[()].connect(self.__showRoutes) |
222 self.showRoutesAct.triggered[()].connect(self.__showRoutes) |
222 self.actions.append(self.showRoutesAct) |
223 self.actions.append(self.showRoutesAct) |
223 |
224 |
224 self.showTweensAct = E5Action(self.trUtf8('Show All Tween Objects'), |
225 self.showTweensAct = E5Action(self.trUtf8('Show Tween Objects'), |
225 self.trUtf8('Show All &Tween Objects'), |
226 self.trUtf8('Show &Tween Objects'), |
226 0, 0, |
227 0, 0, |
227 self,'pyramid_show_routes') |
228 self,'pyramid_show_routes') |
228 self.showTweensAct.setStatusTip(self.trUtf8( |
229 self.showTweensAct.setStatusTip(self.trUtf8( |
229 'Show all implicit and explicit tween objects used by a Pyramid application')) |
230 'Show all implicit and explicit tween objects used by a Pyramid application')) |
230 self.showTweensAct.setWhatsThis(self.trUtf8( |
231 self.showTweensAct.setWhatsThis(self.trUtf8( |
231 """<b>Show All Tween Objects</b>""" |
232 """<b>Show Tween Objects</b>""" |
232 """<p>Show all implicit and explicit tween objects used by a""" |
233 """<p>Show all implicit and explicit tween objects used by a""" |
233 """ Pyramid application.</p>""" |
234 """ Pyramid application.</p>""" |
234 )) |
235 )) |
235 self.showTweensAct.triggered[()].connect(self.__showTweens) |
236 self.showTweensAct.triggered[()].connect(self.__showTweens) |
236 self.actions.append(self.showTweensAct) |
237 self.actions.append(self.showTweensAct) |
950 |
951 |
951 def __showRoutes(self): |
952 def __showRoutes(self): |
952 """ |
953 """ |
953 Private slot showing all URL dispatch routes. |
954 Private slot showing all URL dispatch routes. |
954 """ |
955 """ |
955 # TODO: use a specialized dialog parsing the output of proutes |
956 title = self.trUtf8("Show Routes") |
956 title = self.trUtf8("Show All Routes") |
|
957 try: |
957 try: |
958 projectPath = self.__projectPath() |
958 projectPath = self.__projectPath() |
959 except PyramidNoProjectSelectedException: |
959 except PyramidNoProjectSelectedException: |
960 E5MessageBox.warning(self.__ui, |
960 E5MessageBox.warning(self.__ui, |
961 title, |
961 title, |
962 self.trUtf8('No current Pyramid project selected or no Pyramid project' |
962 self.trUtf8('No current Pyramid project selected or no Pyramid project' |
963 ' created yet. Aborting...')) |
963 ' created yet. Aborting...')) |
964 return |
964 return |
965 |
965 |
966 cmd = self.getPyramidCommand("proutes") |
966 dia = PyramidRoutesDialog(self) |
967 args = [] |
967 res = dia.start(projectPath) |
968 args.append("development.ini") |
|
969 |
|
970 dia = PyramidDialog(title, fixed=True, linewrap=False) |
|
971 res = dia.startProcess(cmd, args, projectPath) |
|
972 if res: |
968 if res: |
973 dia.exec_() |
969 dia.exec_() |
974 |
970 |
975 def __showTweens(self): |
971 def __showTweens(self): |
976 """ |
972 """ |
977 Private slot showing all implicit and explicit tween objects. |
973 Private slot showing all implicit and explicit tween objects. |
978 """ |
974 """ |
979 title = self.trUtf8("Show All Tween Objects") |
975 title = self.trUtf8("Show Tween Objects") |
980 try: |
976 try: |
981 projectPath = self.__projectPath() |
977 projectPath = self.__projectPath() |
982 except PyramidNoProjectSelectedException: |
978 except PyramidNoProjectSelectedException: |
983 E5MessageBox.warning(self.__ui, |
979 E5MessageBox.warning(self.__ui, |
984 title, |
980 title, |