mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
implement search in download diags
This commit is contained in:
parent
9d9f356479
commit
40d187eebc
1 changed files with 12 additions and 3 deletions
|
@ -44,7 +44,8 @@ class GetShared(QDialog):
|
||||||
self.onCellChanged)
|
self.onCellChanged)
|
||||||
self.form.table.verticalHeader().setDefaultSectionSize(
|
self.form.table.verticalHeader().setDefaultSectionSize(
|
||||||
self.parent.config['editLineSize'])
|
self.parent.config['editLineSize'])
|
||||||
self.form.search.setText("search not yet implemented")
|
self.connect(self.form.search, SIGNAL("textChanged(QString)"),
|
||||||
|
self.limit)
|
||||||
|
|
||||||
def fetchData(self):
|
def fetchData(self):
|
||||||
h = QHttp(self)
|
h = QHttp(self)
|
||||||
|
@ -71,8 +72,16 @@ class GetShared(QDialog):
|
||||||
self.typeChanged()
|
self.typeChanged()
|
||||||
self.limit()
|
self.limit()
|
||||||
|
|
||||||
def limit(self):
|
def limit(self, txt=""):
|
||||||
self.curList = self.allList
|
if not txt:
|
||||||
|
self.curList = self.allList
|
||||||
|
else:
|
||||||
|
txt = unicode(txt).lower()
|
||||||
|
self.curList = [
|
||||||
|
l for l in self.allList
|
||||||
|
if (txt in l[R_TITLE].lower() or
|
||||||
|
txt in l[R_DESCRIPTION].lower() or
|
||||||
|
txt in l[R_TAGS].lower())]
|
||||||
self.redraw()
|
self.redraw()
|
||||||
|
|
||||||
def redraw(self):
|
def redraw(self):
|
||||||
|
|
Loading…
Reference in a new issue