Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def success():
self._header.SetLabel(i18n._('finished_title'))
self._subheader.SetLabel(i18n._('finished_msg'))
self._running_img.Hide()
self._check_mark.Show()
self.Layout()
container.Add(wx_util.h0(self, self.title), 0, wx.LEFT | wx.RIGHT, PADDING)
container.AddSpacer(30)
if self.widgets.required_args:
container.Add(wx_util.h1(self, i18n._("required_args_msg")), 0, wx.LEFT | wx.RIGHT, PADDING)
container.AddSpacer(5)
container.Add(wx_util.horizontal_rule(self), *STD_LAYOUT)
container.AddSpacer(20)
self.CreateComponentGrid(container, self.widgets.required_args, cols=self._num_req_cols)
container.AddSpacer(10)
if self.widgets.optional_args:
# container.AddSpacer(10)
container.Add(wx_util.h1(self, i18n._("optional_args_msg")), 0, wx.LEFT | wx.RIGHT, PADDING)
container.AddSpacer(5)
container.Add(wx_util.horizontal_rule(self), *STD_LAYOUT)
container.AddSpacer(20)
self.CreateComponentGrid(container, self.widgets.optional_args, cols=self._num_opt_cols)
self.SetSizer(container)
def _init_components(self):
self.cancel_button = self.button(i18n._('cancel'), wx.ID_CANCEL, event_id=int(events.WINDOW_CANCEL))
self.stop_button = self.button(i18n._('stop'), wx.ID_OK, event_id=int(events.WINDOW_STOP))
self.start_button = self.button(i18n._('start'), wx.ID_OK, event_id=int(events.WINDOW_START))
self.close_button = self.button(i18n._("close"), wx.ID_OK, event_id=int(events.WINDOW_CLOSE))
self.restart_button = self.button(i18n._('restart'), wx.ID_OK, event_id=int(events.WINDOW_RESTART))
self.edit_button = self.button(i18n._('edit'), wx.ID_OK, event_id=int(events.WINDOW_EDIT))
self.running_animation = wx.animate.GIFAnimationCtrl(self, -1, image_repository.loader)
self.buttons = [self.cancel_button, self.start_button, self.stop_button, self.close_button, self.restart_button, self.edit_button]
def _init_components(self):
self.cancel_button = self.button(i18n._('cancel'), wx.ID_CANCEL, event_id=int(events.WINDOW_CANCEL))
self.stop_button = self.button(i18n._('stop'), wx.ID_OK, event_id=int(events.WINDOW_STOP))
self.start_button = self.button(i18n._('start'), wx.ID_OK, event_id=int(events.WINDOW_START))
self.close_button = self.button(i18n._("close"), wx.ID_OK, event_id=int(events.WINDOW_CLOSE))
self.restart_button = self.button(i18n._('restart'), wx.ID_OK, event_id=int(events.WINDOW_RESTART))
self.edit_button = self.button(i18n._('edit'), wx.ID_OK, event_id=int(events.WINDOW_EDIT))
self.progress_bar = wx.Gauge(self, range=100)
self.buttons = [self.cancel_button, self.start_button,
self.stop_button, self.close_button,
self.restart_button, self.edit_button]
def running():
self._header.SetLabel(i18n._("running_title"))
self._subheader.SetLabel(i18n._('running_msg'))
self._check_mark.Hide()
self._settings_img.Hide()
self._running_img.Show()
self._error_symbol.Hide()
self.Layout()
def _init_components(self):
self.cancel_button = self.button(i18n._('cancel'), wx.ID_CANCEL, event_id=int(events.WINDOW_CANCEL))
self.stop_button = self.button(i18n._('stop'), wx.ID_OK, event_id=int(events.WINDOW_STOP))
self.start_button = self.button(i18n._('start'), wx.ID_OK, event_id=int(events.WINDOW_START))
self.close_button = self.button(i18n._("close"), wx.ID_OK, event_id=int(events.WINDOW_CLOSE))
self.restart_button = self.button(i18n._('restart'), wx.ID_OK, event_id=int(events.WINDOW_RESTART))
self.edit_button = self.button(i18n._('edit'), wx.ID_OK, event_id=int(events.WINDOW_EDIT))
self.running_animation = wx.animate.GIFAnimationCtrl(self, -1, image_repository.loader)
self.buttons = [self.cancel_button, self.start_button, self.stop_button, self.close_button, self.restart_button, self.edit_button]
def _init_components(self):
self.text = wx.StaticText(self, label=i18n._("status"))
self.cmd_textbox = wx.TextCtrl(
self, -1, "",
style=wx.TE_MULTILINE | wx.TE_READONLY | wx.TE_RICH)
if self.build_spec.get('monospace_display'):
pointsize = self.cmd_textbox.GetFont().GetPointSize()
font = wx.Font(pointsize, wx.FONTFAMILY_MODERN,
wx.FONTWEIGHT_NORMAL, wx.FONTWEIGHT_BOLD, False)
self.cmd_textbox.SetFont(font)
def __init__(self):
self.button_text = i18n._('browse')
self.parent = None
self.widget = None
self.button = None
def __init__(self, data):
self.data = data
# parent
self.panel = None
self.button_text = i18n._('browse')
# Widgets
self.title = None
self.help_msg = None
self.text_box = None
self.button = None
self.panel = None
def build_app(build_spec):
app = wx.App(False)
i18n.load(build_spec['language_dir'], build_spec['language'], build_spec['encoding'])
imagesPaths = image_repository.loadImages(build_spec['image_dir'])
gapp = GooeyApplication(merge(build_spec, imagesPaths))
# wx.lib.inspection.InspectionTool().Show()
gapp.Show()
return app