def trigger(): title = mw.windowTitle() mw.setWindowTitle("Anki - autoplay") mw.progress.timer(300, lambda: mw.setWindowTitle(title), False, requiresCollection=False)
def card_title(self): self.overview_title() old_subdeck_name = self.subdeck_name self.subdeck_name = mw.col.decks.get(mw.reviewer.card.did)['name'] if old_subdeck_name == self.subdeck_name: return if self.subdeck_name == self.deck_name: self.overview_title() return mw.setWindowTitle(self.deck_name + '(' + self.subdeck_name[len(self.deck_name):] + ')' + title_separator + self.profile_string + self.prog_name)
def card_title(self): self.overview_title() old_subdeck_name = self.subdeck_name self.subdeck_name = mw.col.decks.get(mw.reviewer.card.did)['name'] if old_subdeck_name == self.subdeck_name: return if self.subdeck_name == self.deck_name: self.overview_title() return mw.setWindowTitle( subdeck_format.format( parent=self.deck_name, child=self.subdeck_name[(len(self.deck_name) + 2):]) + title_separator + self.profile_string + self.prog_name)
def card_title(self): """Set the window title when we are reviewing.""" self.overview_title() old_subdeck_name = self.subdeck_name self.subdeck_name = mw.col.decks.get(mw.reviewer.card.did)['name'] if old_subdeck_name == self.subdeck_name: return if self.subdeck_name == self.deck_name: self.overview_title() return mw.setWindowTitle( subdeck_format.format( parent=self.deck_name, child=self.subdeck_name[(len(self.deck_name) + 2):]) + title_separator + self.profile_string + self.prog_name)
def set_window_title_to_anki(): mw.setWindowTitle(u'Anki')
def overview_title(self): """Set the window title when we are at the overview.""" mw.setWindowTitle(self.get_deck_name() + title_separator + self.profile_string + self.prog_name)
def deck_browser_title(self): """Set the window title when we are in the deck browser.""" mw.setWindowTitle(self.get_profile_string() + self.prog_name)
def removeCondensedAudioInProgressMessage(): title = mw.windowTitle() msg = " (Condensed Audio Exporting in Progress)" if msg in title: mw.setWindowTitle(title.replace(msg, ""))
def addCondensedAudioInProgressMessage(): title = mw.windowTitle() msg = " (Condensed Audio Exporting in Progress)" if msg not in title: mw.setWindowTitle(title + msg)
def overview_title(self): mw.setWindowTitle(self.get_deck_name() + title_separator + self.profile_string + self.prog_name)
def deck_browser_title(self): mw.setWindowTitle(self.get_profile_string() + self.prog_name)