diff --git a/.gitignore b/.gitignore index 54f29cb..28f7c77 100644 --- a/.gitignore +++ b/.gitignore @@ -16,3 +16,4 @@ anki-1.0.1.tgz /anki-2.0.6.tgz /anki-2.0.7.tgz /anki-2.0.8.tgz +/anki-2.0.9.tgz diff --git a/0001-workaround-for-filter-tree-onclick-not-working-729.patch b/0001-workaround-for-filter-tree-onclick-not-working-729.patch deleted file mode 100644 index c9d3fad..0000000 --- a/0001-workaround-for-filter-tree-onclick-not-working-729.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 6ddc276d57de297e6fcb57ad68e55abbea5c4dc4 Mon Sep 17 00:00:00 2001 -From: Andreas Klauer -Date: Mon, 25 Feb 2013 22:03:55 +0100 -Subject: [PATCH] workaround for filter tree onclick not working (#729) - ---- - aqt/browser.py | 20 ++++++++------------ - 1 file changed, 8 insertions(+), 12 deletions(-) - -diff --git a/aqt/browser.py b/aqt/browser.py -index 53b2fc4..e5e88c7 100644 ---- a/aqt/browser.py -+++ b/aqt/browser.py -@@ -683,8 +683,8 @@ by clicking on one on the left.""")) - ###################################################################### - - class CallbackItem(QTreeWidgetItem): -- def __init__(self, name, onclick): -- QTreeWidgetItem.__init__(self, [name]) -+ def __init__(self, root, name, onclick): -+ QTreeWidgetItem.__init__(self, root, [name]) - self.onclick = onclick - - def setupTree(self): -@@ -698,7 +698,7 @@ by clicking on one on the left.""")) - - def buildTree(self): - self.form.tree.clear() -- root = self.form.tree.invisibleRootItem() -+ root = self.form.tree - self._systemTagTree(root) - self._decksTree(root) - self._modelTree(root) -@@ -752,9 +752,8 @@ by clicking on one on the left.""")) - (_("Leech"), "emblem-important.png", "tag:leech")) - for name, icon, cmd in tags: - item = self.CallbackItem( -- name, lambda c=cmd: self.setFilter(c)) -+ root, name, lambda c=cmd: self.setFilter(c)) - item.setIcon(0, QIcon(":/icons/" + icon)) -- root.addChild(item) - return root - - def _userTagTree(self, root): -@@ -762,19 +761,17 @@ by clicking on one on the left.""")) - if t.lower() == "marked" or t.lower() == "leech": - continue - item = self.CallbackItem( -- t, lambda t=t: self.setFilter("tag", t)) -+ root, t, lambda t=t: self.setFilter("tag", t)) - item.setIcon(0, QIcon(":/icons/anki-tag.png")) -- root.addChild(item) - - def _decksTree(self, root): - grps = self.col.sched.deckDueTree() - def fillGroups(root, grps, head=""): - for g in grps: - item = self.CallbackItem( -- g[0], lambda g=g: self.setFilter( -- "deck", head+g[0])) -+ root, g[0], lambda g=g: self.setFilter( -+ "deck", head+g[0])) - item.setIcon(0, QIcon(":/icons/deck16.png")) -- root.addChild(item) - newhead = head + g[0]+"::" - fillGroups(item, g[5], newhead) - fillGroups(root, grps) -@@ -782,9 +779,8 @@ by clicking on one on the left.""")) - def _modelTree(self, root): - for m in sorted(self.col.models.all(), key=itemgetter("name")): - mitem = self.CallbackItem( -- m['name'], lambda m=m: self.setFilter("mid", str(m['id']))) -+ root, m['name'], lambda m=m: self.setFilter("mid", str(m['id']))) - mitem.setIcon(0, QIcon(":/icons/product_design.png")) -- root.addChild(mitem) - # for t in m['tmpls']: - # titem = self.CallbackItem( - # t['name'], lambda m=m, t=t: self.setFilter( --- -1.8.1.4 - diff --git a/anki.spec b/anki.spec index 60e7bab..14fe393 100644 --- a/anki.spec +++ b/anki.spec @@ -1,8 +1,8 @@ %{!?python_sitelib: %global python_sitelib %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} Name: anki -Version: 2.0.8 -Release: 2%{?dist} +Version: 2.0.9 +Release: 1%{?dist} Summary: Flashcard program for using space repetition learning Group: Amusements/Games @@ -13,10 +13,6 @@ Source1: anki.svg # Config change: don't check for new updates. Patch0: anki-2.0.3-noupdate.patch -# Patch to fix filter selection in browser view -# https://anki.lighthouseapp.com/projects/100923/tickets/729-browser-filter-tree-doesnt-filter -# https://github.com/dae/anki/commit/6ddc276d57de297e6fcb57ad68e55abbea5c4dc4 -Patch1: 0001-workaround-for-filter-tree-onclick-not-working-729.patch BuildRequires: python2-devel, python-setuptools, python-sqlalchemy BuildRequires: desktop-file-utils, PyQt4, python-simplejson Requires: qt4, PyQt4 @@ -33,9 +29,10 @@ as possible. Anki is based on a theory called spaced repetition. %prep %setup -q -rm -rf libanki/thirdparty +mv thirdparty/send2trash . +rm -rf thirdparty +rmdir anki/~ %patch0 -p1 -b .noupdate -%patch1 -p1 -b .fix-browserview %build @@ -47,6 +44,8 @@ cp -R aqt %{buildroot}%{_datadir}/%{name}/ cp -R designer %{buildroot}%{_datadir}/%{name}/ cp -R anki %{buildroot}%{_datadir}/%{name}/ cp -R locale %{buildroot}%{_datadir}/%{name}/ +mkdir -p %{buildroot}%{_datadir}/%{name}/thirdparty +cp -R send2trash %{buildroot}%{_datadir}/%{name}/thirdparty/ install -d %{buildroot}%{_bindir} install -m 755 runanki %{buildroot}%{_bindir}/anki @@ -96,12 +95,17 @@ s:\(.*\):%dir \1:' >>anki.lang %{_datadir}/%{name}/aqt/ %{_datadir}/%{name}/designer/ %{_datadir}/%{name}/anki/ +%{_datadir}/%{name}/thirdparty/ %{_datadir}/applications/%{name}.desktop %{_datadir}/pixmaps/%{name}.* %{_datadir}/mime/packages/anki.xml %{_mandir}/man1/%{name}.* %changelog +* Mon Jun 03 2013 Christian Krause - 2.0.9-1 +- Update to new upstream version 2.0.9 (BZ 970052) +- Remove patch (issue was fixed upstream) + * Mon Apr 01 2013 Christian Krause - 2.0.8-2 - Add patch to fix filter selection in browser view: https://anki.lighthouseapp.com/projects/100923/tickets/729-browser-filter-tree-doesnt-filter diff --git a/sources b/sources index df50be4..776bc00 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -ee93fc1d1dce0d0b68431ec117d5f556 anki-2.0.8.tgz +c61bb6af11d5dc461aa3d92b4b3d22ce anki-2.0.9.tgz