Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

better combined search results ordering

  • Loading branch information...
commit 22b8ef4583db66eb3e26fe28b2ee1e22142d2739 1 parent 76e4839
Alex Ehlke authored
View
10 TODO
@@ -29,8 +29,6 @@ drag-n-drop for folders into the Preferences table to install a dictionary
combine ~suffix entries back into main entry somehow (probably per dictionary, after detecting which dict it is)
--sanseido super daijirin sometimes returns multiple references to the same entry in search results, thereby messing up category search
-
.iso mounting somehow
File->New Window support
@@ -50,17 +48,23 @@ show word commonality
search method detection
+some kind of mouse hover furigana or something
+
+
BUGS:
the sample test ej,je dict shows twice as many entries as it should (misdetermining entry endpoint)
resize book select on switch
mouse-wheel scroll focus is wrong for the entry's scrollbar (scroll down in results list all the way, then entry scrolls too)
book selection combobox changes height sometimes
-webkit selection bg color is wrong
the search field clear button is showing after a delay
pressing 'Enter' in the search field with Japanese input method on doesn't work as expected
can't tab focus selectBook
+terminators: see kenkyusha shineiwa, `eat dog`
+
+look at entry `what`, collapse the first dict entry in it, it collapses the following 2 too.
+
epywing bugs:
'dame' in hiragana is broke in supa readers (see: kotonoko)
kojien 6 entries have link color text for the words only in the header
View
12 qtcreator/dictionary.ui
@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>675</width>
- <height>371</height>
+ <width>678</width>
+ <height>409</height>
</rect>
</property>
<property name="sizePolicy">
@@ -56,6 +56,12 @@
</property>
<item>
<widget class="MSearchToolbar" name="searchToolbar" native="true">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
<layout class="QHBoxLayout" name="horizontalLayout_12">
<property name="spacing">
<number>4</number>
@@ -398,7 +404,7 @@
<rect>
<x>0</x>
<y>0</y>
- <width>675</width>
+ <width>678</width>
<height>22</height>
</rect>
</property>
View
35 src/manabidict/epwingprotocol.py
@@ -31,39 +31,20 @@ def __init__(self, resource, parent=None):
#self.beginning.connect(self._begin)
def stop(self):
- print 'stop()'
self.exiting = True
def __del__(self):
- print 'EpwingRenderer.__del__'
self.exiting = True
- print 'wait()'
- #self.wait()
- print 'done waiting'
def render(self):
- #QTimer.singleShot(0, self, SIGNAL('beginning()'))
self.start()
- #@pyqtSlot()
def run(self):
if isinstance(self.resource, (list, tuple)):
self._render(self.render_entries(self.resource))
else:
self._render(self.render_entry(self.resource))
- #def bytesAvailable(self):
- #if self.content:
- #return len(self.content) - self.offset
-
- #def readData(self, maxSize):
- #if self.offset < len(self.content):
- #end = min(self.offset + maxSize, len(self.content))
- #data = self.content[self.offset:end]
- #self.offset = end
-
- #return data
-
def readAll(self):
content = self.content
self.content = ''
@@ -85,7 +66,6 @@ def _render(self, renderer):
QTimer.singleShot(0, self, SIGNAL('readyRead()'))
#time.sleep(0.2)
- print 'render finished'
#QTimer.singleShot(0, self, SIGNAL('finished()'))
def render_entry(self, entry):
@@ -118,11 +98,9 @@ def qrc_png_base64_data(path):
<table width="98%" class="dict-divider" onclick="toggle_entry('entry-{0}', 'arrow-down-{0}', 'arrow-up-{0}');">
<tr>
<td>
- <img src="data:image/png;base64,''',
- qrc_png_base64_data(':/images/DisclosureDown.png'),
+ <img src="data:image/png;base64,''', qrc_png_base64_data(':/images/DisclosureDown.png'),
'''" class="dict-divider-arrow" id="arrow-down-{0}" style="display:block">
- <img src="data:image/png;base64,''',
- qrc_png_base64_data(':/images/DisclosureUp.png'),
+ <img src="data:image/png;base64,''', qrc_png_base64_data(':/images/DisclosureUp.png'),
'''" class="dict-divider-arrow" id="arrow-up-{0}" style="display:none">
</td>
<td width="49%"><hr style="border-style:solid none none none; border-width:1px"></td>
@@ -225,19 +203,14 @@ def __init__(self, access_manager, request, url, operation, book_manager):
self.renderer.readyRead.connect(self.get_rendered_data)
self.renderer.render()
#self.setHeader(QNetworkRequest.ContentLengthHeader, QVariant(len(self.content)))
- print 'done with init'
def __del__(self):
- print 'EpwingReply.__del__'
- self.renderer.__del__()
+ #self.renderer.__del__()
+ self.renderer.stop()
self.renderer.wait()
- #del self.renderer
- #self.renderer.
- print 'done with __del__'
@pyqtSlot()
def _finished(self):
- print 'reply finished'
QTimer.singleShot(0, self, SIGNAL('finished()'))
def abort(self):
View
3  src/manabidict/ui/dictionary.py
@@ -830,7 +830,6 @@ def do_search(self, query=None, search_method=None, max_results_per_book=25):
results = list(islice(selected_book.search(
query, search_method=search_method), 0, max_results_per_book))
- #results = self.book_manager.search_all(query, search_method='prefix')#, container=container)
self.show_results(results)
def show_results(self, results):
@@ -860,6 +859,8 @@ def add_result(heading, result):
if isinstance(results, dict):
def sort_key(e):
+ return e[1]
+ print e
key = e[0]
return key.lower().strip()
View
1  src/manabidict/ui/mlistwidget2.py
@@ -38,7 +38,6 @@ def __init__(self, parent = None):
def focusInEvent(self, event):
'''Shift the focus to the proxy line edit.
'''
- print 'mlistwidget focus in'
MListWidget.focusInEvent(self, event)
self.proxy_widget.setFocus()
event.accept()
Please sign in to comment.
Something went wrong with that request. Please try again.