Skip to content

Commit

Permalink
Simplified show_window
Browse files Browse the repository at this point in the history
  • Loading branch information
LexiconCode committed Mar 1, 2021
1 parent 2450684 commit caaeb0f
Showing 1 changed file with 3 additions and 16 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from castervoice.lib import settings, textformat
from castervoice.lib import settings, textformat, utilities
from castervoice.lib.merge.ccrmerging2.hooks.base_hook import BaseHook
from castervoice.lib.merge.ccrmerging2.hooks.events.event_types import EventType
from castervoice.lib import printer
Expand All @@ -8,21 +8,8 @@
from dragonfly.windows.window import Window

def show_window():
title = None
engine = get_current_engine().name
if engine == 'natlink':
import natlinkstatus # pylint: disable=import-error
status = natlinkstatus.NatlinkStatus()
if status.NatlinkIsEnabled() == 1:
if six.PY2:
title = "Messages from Python Macros"
else:
title= "Messages from Natlink"
else:
title = "Caster: Status Window"
if engine != 'natlink':
title = "Caster: Status Window"
windows = Window.get_matching_windows(title=title)
window_title = utilities.get_caster_messaging_window()
windows = Window.get_matching_windows(title=window_title)
if windows:
windows[0].set_foreground()

Expand Down

0 comments on commit caaeb0f

Please sign in to comment.