def show(): """Show the manager window.""" window.deiconify() window.lift(TK_ROOT) window.grab_set() utils.center_win(window, TK_ROOT) window.after(100, UI['details'].refresh)
def show(): """Show the manager window.""" window.deiconify() window.lift(TK_ROOT) window.grab_set() utils.center_win(window, TK_ROOT) window.after(100, UI["details"].refresh)
def show_window() -> None: window.deiconify() window.lift() utils.center_win(window, TK_ROOT) # Load our game data! ui_refresh_game() window.update() UI['game_details'].refresh() UI['back_details'].refresh()
def show(quote_pack): """Display the editing window.""" global voice_item, config, config_mid voice_item = quote_pack win.title('BEE2 - Configure "' + voice_item.selitem_data.name + '"') notebook = UI['tabs'] quote_data = quote_pack.config os.makedirs('config/voice', exist_ok=True) config = ConfigFile('voice/' + quote_pack.id + '.cfg') config_mid = ConfigFile('voice/MID_' + quote_pack.id + '.cfg') # Clear the transcript textbox text = UI['trans'] text['state'] = 'normal' text.delete(1.0, END) text['state'] = 'disabled' # Destroy all the old tabs for tab in TABS.values(): try: notebook.forget(tab) except TclError as e: pass tab.destroy() TABS.clear() for group in quote_data.find_all('quotes', 'group'): make_tab( group, config, is_mid=False, ) mid_quotes = list(quote_data.find_all('quotes', 'midchamber')) if len(mid_quotes) > 0: frame = make_tab( mid_quotes[0], config_mid, is_mid=True, ) frame.nb_text = '' config.save() config_mid.save() add_tabs() win.deiconify() win.lift(win.winfo_parent()) utils.center_win(win) # Center inside the parent
def show(self, e=None): # The first time we're shown, decode the text. # That way we don't need to do it on startup. if self.text is not None: parsed_text = tkMarkdown.convert(self.text) self.textbox.set_text(parsed_text) self.text = None self.deiconify() self.update_idletasks() utils.center_win(self, TK_ROOT)
def open_win(self, _=None, force_open=False): if self._readonly and not force_open: TK_ROOT.bell() return 'break' # Tell tk to stop processing this event self.win.deiconify() self.win.lift(self.parent) self.win.grab_set() self.win.focus_force() # Focus here to deselect the textbox utils.center_win(self.win, parent=self.parent) self.sel_item(self.selected) self.win.after(2, self.flow_items)
def open_win(self, _=None, force_open=False): if self._readonly and not force_open: TK_ROOT.bell() return 'break' # Tell tk to stop processing this event self.win.deiconify() self.win.lift(self.parent) self.win.grab_set() self.win.focus_force() # Focus here to deselect the textbox utils.center_win(self.win, parent=self.parent) self.flow_items() self.sel_item(self.selected)
def show(quote_pack): """Display the editing window.""" global voice_item, config_sp, config_coop, config_mid_sp, config_mid_coop voice_item = quote_pack win.title('BEE2 - Configure "' + voice_item.name + '"') notebook = UI['tabs'] quote_data = quote_pack.config os.makedirs('config/voice', exist_ok=True) config_sp = ConfigFile('voice/SP_' + quote_pack.id + '.cfg') config_coop = ConfigFile('voice/COOP_' + quote_pack.id + '.cfg') config_mid_sp = ConfigFile('voice/MID_SP_' + quote_pack.id + '.cfg') config_mid_coop = ConfigFile('voice/MID_COOP_' + quote_pack.id + '.cfg') # Clear the transcript textbox text = UI['trans'] text['state'] = 'normal' text.delete(1.0, END) text['state'] = 'disabled' # Destroy all the old tabs for tab in itertools.chain( TABS_SP.values(), TABS_COOP.values(), ): try: notebook.forget(tab) except TclError: pass tab.destroy() TABS_SP.clear() TABS_COOP.clear() add_tabs(quote_data, 'quotes_sp', TABS_SP, config_sp) add_tabs(quote_data, 'quotes_coop', TABS_COOP, config_coop) config_sp.save() config_coop.save() config_mid_sp.save() config_mid_coop.save() refresh() win.deiconify() win.lift(win.winfo_parent()) utils.center_win(win) # Center inside the parent
def open_win(self, e=None, force_open=False): if self._readonly and not force_open: TK_ROOT.bell() return 'break' # Tell tk to stop processing this event self.win.deiconify() self.win.lift(self.parent) if self.modal: self.win.grab_set() self.win.focus_force() # Focus here to deselect the textbox # If we have a sound sampler, hold the system open while the window # is so it doesn't snap open/closed while finding files. if self.sampler is not None and self.sampler_held_open is False: self.sampler_held_open = True self.sampler.system.open_ref() utils.center_win(self.win, parent=self.parent) self.sel_item(self.selected) self.win.after(2, self.flow_items)
def show(quote_pack): """Display the editing window.""" global voice_item, config, config_mid, config_resp if voice_item is not None: return voice_item = quote_pack win.title(_('BEE2 - Configure "{}"').format(voice_item.selitem_data.name)) notebook = UI['tabs'] quote_data = quote_pack.config os.makedirs('config/voice', exist_ok=True) config = ConfigFile('voice/' + quote_pack.id + '.cfg') config_mid = ConfigFile('voice/MID_' + quote_pack.id + '.cfg') config_resp = ConfigFile('voice/RESP_' + quote_pack.id + '.cfg') # Clear the transcript textbox text = UI['trans'] text['state'] = 'normal' text.delete(1.0, END) text['state'] = 'disabled' # Destroy all the old tabs for tab in TABS.values(): try: notebook.forget(tab) except TclError: pass tab.destroy() TABS.clear() for group in quote_data.find_all('quotes', 'group'): make_tab(group, config, TabTypes.NORM) # Merge all blocks into one mid_quotes = Property( 'midChamber', list( itertools.chain.from_iterable( quote_data.find_all('quotes', 'midChamber')))) if len(mid_quotes): make_tab( mid_quotes, config_mid, TabTypes.MIDCHAMBER, ) responses = Property( 'CoopResponses', list( itertools.chain.from_iterable( quote_data.find_all('quotes', 'CoopResponses'))), ) if len(responses): make_tab( responses, config_resp, TabTypes.RESPONSE, ) config.save() config_mid.save() config_resp.save() add_tabs() win.deiconify() utils.center_win(win) # Center inside the parent win.lift()
def show(): """Display the option window.""" win.deiconify() contextWin.hide_context() # Ensure this closes utils.center_win(win)
def show(): win.deiconify() contextWin.hide_context() # Ensure this closes utils.center_win(win)
def show(self, e=None): self.deiconify() self.update_idletasks() utils.center_win(self, TK_ROOT)
def show() -> None: """Display the option window.""" win.deiconify() contextWin.hide_context() # Ensure this closes utils.center_win(win)
def show_window() -> None: """Show the window.""" drag_man.load_icons() window.deiconify() utils.center_win(window, TK_ROOT)
def show(quote_pack): """Display the editing window.""" global voice_item, config, config_mid, config_resp voice_item = quote_pack win.title('BEE2 - Configure "' + voice_item.selitem_data.name + '"') notebook = UI['tabs'] quote_data = quote_pack.config os.makedirs('config/voice', exist_ok=True) config = ConfigFile('voice/' + quote_pack.id + '.cfg') config_mid = ConfigFile('voice/MID_' + quote_pack.id + '.cfg') config_resp = ConfigFile('voice/RESP_' + quote_pack.id + '.cfg') # Clear the transcript textbox text = UI['trans'] text['state'] = 'normal' text.delete(1.0, END) text['state'] = 'disabled' # Destroy all the old tabs for tab in TABS.values(): try: notebook.forget(tab) except TclError: pass tab.destroy() TABS.clear() for group in quote_data.find_all('quotes', 'group'): make_tab( group, config, TabTypes.NORM ) # Merge all blocks into one mid_quotes = Property( 'midChamber', list(itertools.chain.from_iterable( quote_data.find_all('quotes', 'midChamber') )) ) if len(mid_quotes): make_tab( mid_quotes, config_mid, TabTypes.MIDCHAMBER, ) responses = Property( 'CoopResponses', list(itertools.chain.from_iterable( quote_data.find_all('quotes', 'CoopResponses') )), ) if len(responses): make_tab( responses, config_resp, TabTypes.RESPONSE, ) config.save() config_mid.save() config_resp.save() add_tabs() win.deiconify() win.lift(win.winfo_parent()) utils.center_win(win) # Center inside the parent
def show_window(): window.deiconify() window.lift() utils.center_win(window, TK_ROOT) # Load our game data! ui_refresh_game()
def show_window() -> None: """Show the window.""" window.deiconify() utils.center_win(window, TK_ROOT)