From 28d4a74d4c51488f2b2eb65b1e49a0a531bc2cb2 Mon Sep 17 00:00:00 2001 From: Alex Stanev Date: Tue, 6 Dec 2011 16:09:19 +0200 Subject: [PATCH 1/4] Improvements for Chitanka store search --- src/calibre/gui2/store/stores/chitanka_plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/store/stores/chitanka_plugin.py b/src/calibre/gui2/store/stores/chitanka_plugin.py index a1a22797c8..58ef109dba 100644 --- a/src/calibre/gui2/store/stores/chitanka_plugin.py +++ b/src/calibre/gui2/store/stores/chitanka_plugin.py @@ -40,9 +40,9 @@ class ChitankaStore(BasicStoreConfig, StorePlugin): d.exec_() def search(self, query, max_results=10, timeout=60): - # check for cyrilic symbols before performing search + # check for cyrillic symbols before performing search uquery = unicode(query.strip(), 'utf-8') - reObj = re.search(u'^[а-яА-Я\\d]{4,}[а-яА-Я\\d\\s]*$', uquery) + reObj = re.search(u'^[а-яА-Я\\d\\s]{3,}$', uquery) if not reObj: return From 0c72fca935669803aa85280e2433b02d2748416f Mon Sep 17 00:00:00 2001 From: Alex Stanev Date: Tue, 6 Dec 2011 16:23:25 +0200 Subject: [PATCH 2/4] Improvements for e-knigi store search --- src/calibre/gui2/store/stores/eknigi_plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/calibre/gui2/store/stores/eknigi_plugin.py b/src/calibre/gui2/store/stores/eknigi_plugin.py index ee87b771be..7d88465f62 100644 --- a/src/calibre/gui2/store/stores/eknigi_plugin.py +++ b/src/calibre/gui2/store/stores/eknigi_plugin.py @@ -46,9 +46,9 @@ class eKnigiStore(BasicStoreConfig, StorePlugin): d.exec_() def search(self, query, max_results=10, timeout=60): - # check for cyrilic symbols before performing search + # check for cyrillic symbols before performing search uquery = unicode(query.strip(), 'utf-8') - reObj = re.search(u'^[а-яА-Я\\d]{2,}[а-яА-Я\\d\\s]*$', uquery) + reObj = re.search(u'^[а-яА-Я\\d\\s]{2,}$', uquery) if not reObj: return From e5ff044db3f3e7e55bb23da7d847790067250ee7 Mon Sep 17 00:00:00 2001 From: John Schember Date: Tue, 6 Dec 2011 19:34:48 -0500 Subject: [PATCH 3/4] Store: Make search entry have focus in search dialog. --- src/calibre/gui2/store/search/search.ui | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/src/calibre/gui2/store/search/search.ui b/src/calibre/gui2/store/search/search.ui index ba5cb2b975..83f42cd0d1 100644 --- a/src/calibre/gui2/store/search/search.ui +++ b/src/calibre/gui2/store/search/search.ui @@ -14,7 +14,7 @@ Get Books - + :/images/store.png:/images/store.png @@ -82,8 +82,8 @@ 0 0 - 173 - 106 + 193 + 127 @@ -254,6 +254,19 @@
widgets.h
+ + search_edit + search + results_view + store_list + select_all_stores + select_invert_stores + select_none_stores + configure + open_external + close + adv_search_button + From 92e18a475545596a4274a14a2bf1b217195188f0 Mon Sep 17 00:00:00 2001 From: John Schember Date: Tue, 6 Dec 2011 19:36:39 -0500 Subject: [PATCH 4/4] Store: Search, increase default max results per store to 15. --- src/calibre/gui2/store/search/search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/calibre/gui2/store/search/search.py b/src/calibre/gui2/store/search/search.py index 9413c51a6e..c8eb53ade9 100644 --- a/src/calibre/gui2/store/search/search.py +++ b/src/calibre/gui2/store/search/search.py @@ -252,7 +252,7 @@ class SearchDialog(QDialog, Ui_Dialog): # Milliseconds self.hang_time = self.config.get('hang_time', 75) * 1000 - self.max_results = self.config.get('max_results', 10) + self.max_results = self.config.get('max_results', 15) self.should_open_external = self.config.get('open_external', True) # Number of threads to run for each type of operation