From b3115aac97b0179940c0f2261d4fc98604dc16d0 Mon Sep 17 00:00:00 2001 From: Himura Kazuto Date: Fri, 17 Aug 2018 17:37:36 +0300 Subject: [PATCH] Fix bugs and improve things --- src/main.pyw | 7 +++++-- src/projector.py | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main.pyw b/src/main.pyw index 10676bd..e13e85a 100644 --- a/src/main.pyw +++ b/src/main.pyw @@ -145,6 +145,9 @@ class MainWindow(wx.Frame): self.prefer_audio = menu_file.Append(wx.ID_ANY, _("&Prefer No Video (fallback)"), kind=wx.ITEM_CHECK) self.prefer_audio.Check(False) + self.end_show_on_bg = menu_file.Append(wx.ID_ANY, _("&End show on BG Music Start"), kind=wx.ITEM_CHECK) + self.end_show_on_bg.Check(False) + self.auto_zad = menu_file.Append(wx.ID_ANY, _("Auto Show &ZAD with Sound"), kind=wx.ITEM_CHECK) self.auto_zad.Check(True) @@ -234,7 +237,7 @@ class MainWindow(wx.Frame): end_show_item = menu_play.Append(wx.ID_ANY, _("&End Show (Clear ZAD + Fade Out)\tEsc")) no_show_item = menu_play.Append(wx.ID_ANY, _("&Black Screen\tAlt+F1")) menu_play.AppendSeparator() - self.play_pause_bg_end_show_item = menu_play.Append(wx.ID_ANY, _("Play/Pause &Background + End Show\tF3")) + self.play_pause_bg_end_show_item = menu_play.Append(wx.ID_ANY, _("Play/Pause &Background (+ End Show)\tF3")) self.play_pause_bg_end_show_item.Enable(False) self.play_next_bg_item = menu_play.Append(wx.ID_ANY, _("Play &Next BG Track\tF4")) self.play_next_bg_item.Enable(False) @@ -1222,7 +1225,7 @@ class MainWindow(wx.Frame): def play_pause_bg_end_show(self, e=None): bg_started = self.play_pause_bg() - if bg_started: + if bg_started and self.end_show_on_bg.IsChecked(): self.end_show() # -------------------------------------------------- Text Window -------------------------------------------------- diff --git a/src/projector.py b/src/projector.py index 21613b0..6068a67 100644 --- a/src/projector.py +++ b/src/projector.py @@ -122,7 +122,7 @@ def update_time(self, e=None): if self.time_left < timedelta(seconds=1): def ui_upd(): - self.switch_to_images() + self.proj_window.switch_to_images() self.main_window.clear_zad(status=u"Poehali !!!") wx.CallAfter(ui_upd) return