From 0538430fac5dbc7e0c7c9d13854b7f9ec4c02ad6 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 4 Dec 2010 13:26:45 +0900 Subject: [PATCH] add unique window title to selective study --- ankiqt/ui/activetags.py | 7 ++++--- ankiqt/ui/main.py | 6 ++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/ankiqt/ui/activetags.py b/ankiqt/ui/activetags.py index 88a1af8a1..5477f4be4 100644 --- a/ankiqt/ui/activetags.py +++ b/ankiqt/ui/activetags.py @@ -9,7 +9,7 @@ from ankiqt.ui.utils import saveGeom, restoreGeom class ActiveTagsChooser(QDialog): - def __init__(self, parent, active, inactive): + def __init__(self, parent, active, inactive, title): QDialog.__init__(self, parent, Qt.Window) self.parent = parent self.deck = self.parent.deck @@ -17,6 +17,7 @@ class ActiveTagsChooser(QDialog): self.inactive = inactive self.dialog = ankiqt.forms.activetags.Ui_Dialog() self.dialog.setupUi(self) + self.setWindowTitle(title) self.connect(self.dialog.buttonBox, SIGNAL("helpRequested()"), self.onHelp) self.rebuildTagList() @@ -114,6 +115,6 @@ class ActiveTagsChooser(QDialog): QDesktopServices.openUrl(QUrl(ankiqt.appWiki + "SelectiveStudy")) -def show(parent, active, inactive): - at = ActiveTagsChooser(parent, active, inactive) +def show(parent, active, inactive, title): + at = ActiveTagsChooser(parent, active, inactive, title) at.exec_() diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py index ab7c9be3b..b0f23ad2e 100755 --- a/ankiqt/ui/main.py +++ b/ankiqt/ui/main.py @@ -1535,10 +1535,12 @@ later by using File>Close. self.mainWin.tabWidget.setCurrentIndex(self.config['studyOptionsScreen']) def onNewCategoriesClicked(self): - ui.activetags.show(self, "newActive", "newInactive") + ui.activetags.show(self, "newActive", "newInactive", + _("Limit New Cards")) def onRevCategoriesClicked(self): - ui.activetags.show(self, "revActive", "revInactive") + ui.activetags.show(self, "revActive", "revInactive", + _("Limit Reviews")) def onFailedMaxChanged(self): try: