# -*- 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()
        # end wxGlade
        self.fileName.SetLabel("File name: "+fileName)
        self.beep.SetValue(runPreviousBeep)
        
    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 wxGlade

    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 wxGlade

##    def onOk(self, event): # wxGlade: RunDialog.<event_handler>
##        return wx.ID_OK

# end of class RunDialog


