-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathrunDialog.py
60 lines (50 loc) · 2.35 KB
/
runDialog.py
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
# -*- coding: ISO-8859-1 -*-
# generated by wxGlade 0.4 on Sat Dec 10 23:11:40 2005
import wx
def _(x): return x
class RunDialog(wx.Dialog):
def __init__(self, fileName, runPreviousArguments, runPreviousBeep, *args, **kwds):
#todo: replace choices = [] with choices = runPreviousArguments
# begin wxGlade: RunDialog.__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=[], style=wx.CB_DROPDOWN)
self.beep = wx.CheckBox(self, -1, _("Beep after execution of script"))
self.label = wx.StaticText(self, -1, _("Use Edit>Execute to run code snippets in shell"))
self.cancel = wx.Button(self, wx.ID_CANCEL, _("Cancel"))
self.ok = wx.Button(self, wx.ID_OK, _("Run"))
self.__set_properties()
self.__do_layout()
self.fileName.SetLabel("File name: "+fileName)
self.beep.SetValue(runPreviousBeep)
# end __init__
def __set_properties(self):
#todo: comment out self.arguments.SetSelection(-1)
# begin wxGlade: RunDialog.__set_properties
self.SetTitle(_("Stani's Python Editor - Run"))
self.label.Enable(False)
self.ok.SetDefault()
# end __set_properties
def __do_layout(self):
# begin wxGlade: RunDialog.__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, 4)
sizer_2.Add(self.argumentsLabel, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 4)
sizer_2.Add(self.arguments, 1, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 4)
sizer_1.Add(sizer_2, 1, wx.EXPAND, 0)
sizer_1.Add(self.beep, 1, wx.ALL, 4)
sizer_3.Add(self.label, 1, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 4)
sizer_3.Add(self.cancel, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 4)
sizer_3.Add(self.ok, 0, wx.ALL|wx.ALIGN_CENTER_VERTICAL, 4)
sizer_1.Add(sizer_3, 1, wx.EXPAND, 0)
self.SetSizer(sizer_1)
sizer_1.Fit(self)
self.Layout()
# end __do_layout
## def onOk(self, event): # wxGlade: RunDialog.<event_handler>
## return wx.ID_OK
# end RunDialog