1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
|
#!/usr/bin/env python
# -*- coding: ISO-8859-1 -*-
# generated by wxGlade 0.4 on Sat Dec 10 23:11:40 2005
import wx
class RunWinPdbDialog(wx.Dialog):
def __init__(self, fileName, runPreviousArguments, runPreviousException, *args, **kwds):
#todo: replace choices = [] with choices = runPreviousArguments
# begin wxGlade: RunWinPdbDialog.__init__
kwds["style"] = wx.DEFAULT_DIALOG_STYLE
wx.Dialog.__init__(self, *args, **kwds)
self.fileName = wx.StaticText(self, -1, "File")
self.argumentsLabel = wx.StaticText(self, -1, "Arguments")
self.arguments = wx.ComboBox(self, -1, choices=runPreviousArguments, style=wx.CB_DROPDOWN)
self.exception = wx.CheckBox(self, -1, "Show dialog to launch debugger at unhandled exceptions")
self.label = wx.StaticText(self, -1, "Only one script at the time can be run with Winpdb")
self.cancel = wx.Button(self, wx.ID_CANCEL, "Cancel")
self.ok = wx.Button(self, wx.ID_OK, "Run")
self.__set_properties()
self.__do_layout()
# end wxGlade
self.fileName.SetLabel("File name: "+fileName)
self.exception.SetValue(runPreviousException)
#self.exit.SetValue(runPreviousExit)
def __set_properties(self):
#todo: comment out self.arguments.SetSelection(-1)
# begin wxGlade: RunWinPdbDialog.__set_properties
self.SetTitle("Stani's Python Editor - Run with WinPdb")
#self.arguments.SetSelection(-1)
self.label.Enable(False)
# end wxGlade
def __do_layout(self):
# begin wxGlade: RunWinPdbDialog.__do_layout
sizer_1 = wx.BoxSizer(wx.VERTICAL)
sizer_3 = wx.BoxSizer(wx.HORIZONTAL)
sizer_2 = wx.BoxSizer(wx.HORIZONTAL)
sizer_1.Add(self.fileName, 1, wx.ALL|wx.ADJUST_MINSIZE, 4)
sizer_2.Add(self.argumentsLabel, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 4)
sizer_2.Add(self.arguments, 1, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 4)
sizer_1.Add(sizer_2, 1, wx.EXPAND, 0)
sizer_1.Add(self.exception, 0, wx.ALL|wx.ADJUST_MINSIZE, 4)
sizer_3.Add(self.label, 1, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 4)
sizer_3.Add(self.cancel, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 4)
sizer_3.Add(self.ok, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL|wx.ADJUST_MINSIZE, 4)
sizer_1.Add(sizer_3, 1, wx.EXPAND, 0)
self.SetAutoLayout(True)
self.SetSizer(sizer_1)
sizer_1.Fit(self)
sizer_1.SetSizeHints(self)
self.Layout()
# end wxGlade
## def onOk(self, event): # wxGlade: RunDialog.<event_handler>
## return wx.ID_OK
# end of class RunWinPdbDialog
|