Cleaned up some code in audioRecorder's GUI

This commit is contained in:
Manuel Cortez 2019-01-04 17:33:44 -06:00
parent 2804400910
commit fdfeb2a90b

View File

@ -10,20 +10,17 @@ class audioRecorderDialog(widgetUtils.BaseDialog):
sizer = wx.BoxSizer(wx.VERTICAL) sizer = wx.BoxSizer(wx.VERTICAL)
self.play = wx.Button(panel, -1, _("&Play")) self.play = wx.Button(panel, -1, _("&Play"))
self.play.Disable() self.play.Disable()
self.pause = wx.Button(panel, -1, _("&Pause"))
self.pause.Disable()
self.record = wx.Button(panel, -1, _("&Record")) self.record = wx.Button(panel, -1, _("&Record"))
self.record.SetFocus() self.record.SetFocus()
self.discard = wx.Button(panel, -1, _("&Discard")) self.discard = wx.Button(panel, -1, _("&Discard"))
self.discard.Disable() self.discard.Disable()
ok = wx.Button(panel, wx.ID_OK, _("&Add")) self.ok = wx.Button(panel, wx.ID_OK, _("&Add"))
cancel = wx.Button(panel, wx.ID_CANCEL, _("&Cancel")) cancel = wx.Button(panel, wx.ID_CANCEL, _("&Cancel"))
btnSizer = wx.BoxSizer(wx.HORIZONTAL) btnSizer = wx.BoxSizer(wx.HORIZONTAL)
btnSizer2 = wx.BoxSizer(wx.HORIZONTAL) btnSizer2 = wx.BoxSizer(wx.HORIZONTAL)
btnSizer.Add(self.play, 0, wx.ALL, 5) btnSizer.Add(self.play, 0, wx.ALL, 5)
btnSizer.Add(self.pause, 0, wx.ALL, 5)
btnSizer.Add(self.record, 0, wx.ALL, 5) btnSizer.Add(self.record, 0, wx.ALL, 5)
btnSizer2.Add(ok, 0, wx.ALL, 5) btnSizer2.Add(self.ok, 0, wx.ALL, 5)
btnSizer2.Add(cancel, 0, wx.ALL, 5) btnSizer2.Add(cancel, 0, wx.ALL, 5)
sizer.Add(btnSizer, 0, wx.ALL, 5) sizer.Add(btnSizer, 0, wx.ALL, 5)
sizer.Add(btnSizer2, 0, wx.ALL, 5) sizer.Add(btnSizer2, 0, wx.ALL, 5)