From b8d8862562e11a5f48b573dc17346dfdd94fe3de Mon Sep 17 00:00:00 2001 From: Christophe Dumez Date: Mon, 24 Aug 2009 10:18:11 +0000 Subject: [PATCH] - Redesigned search tab to improve usability - Started work on categorized searching but not yet functional --- Changelog | 1 + src/Icons/gnome-shutdown.png | Bin 1448 -> 0 bytes src/Icons/oxygen/tab-close.png | Bin 0 -> 1349 bytes src/icons.qrc | 2 +- src/search.ui | 134 ++++++++++++++------------------- src/searchEngine.cpp | 19 ++--- src/searchEngine.h | 1 - 7 files changed, 64 insertions(+), 93 deletions(-) delete mode 100644 src/Icons/gnome-shutdown.png create mode 100644 src/Icons/oxygen/tab-close.png diff --git a/Changelog b/Changelog index 769539ab4..a184ff23e 100644 --- a/Changelog +++ b/Changelog @@ -10,6 +10,7 @@ - FEATURE: Added "Unread" item to RSS feed list to display all unread news - FEATURE: If a torrent contains a torrent file, process downloaded torrent file too - BUGFIX: torrent resume code rewrited + - COSMETIC: Redesigned search tab to improve usability - COSMETIC: Redesigned RSS tab to improve usability * Sun Aug 21 2009 - Christophe Dumez - v1.4.1 diff --git a/src/Icons/gnome-shutdown.png b/src/Icons/gnome-shutdown.png deleted file mode 100644 index 4758764ebefc88197e0b7447533f6abb97f7e470..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1448 zcmV;Z1y}lsP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01ejw01ejxLMWSf00007bV*G`2iOM% z2o4ZBV04lI00k&XL_t(Y$GufwOjBnR|J{4(*Z;k(#oh|Eg_wnHE|F#PMM>0bX4!n0 z5gjpe1-8gQ)VGaD+`|@~f{Wr5WHWRA!7_ugOlKDN!Y1IuR2Daf*aT_8L0c$j`D5=b z{k}awYYS%C9=4NwH#a%wJHK;&zjMz8{$u0*&RMmyVw)^06|yWpt0;<=Qp)i>&j=wh zA>^(`qdwknwCTjZ2H3Hya^vLWRAXLlp0ufGGjd&dP;1lx$AM7_S&pLL=R@1Y3+VUv zhYbdO`L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B{RDw{0uzQ}e(Jf|_|m3Zm`E5rpbpz$g=PD=VQ-OH~#eNeNU3OaQkzC@tk0E@0-; zg|OUd#*MxE&~c+lae^iikOG}(s`>~{aYBRhf31=GgA zJY&U5L>t@SC@#V1_C~n(??;EX2?1X#+y_2H&*3T*mX#vf)Q&N=)2R6xSRlbdXT?j6@K{o7|vGghR$XKcd-VGH#~>C&9{>__V*)m?rdEB zvKrIXtVSpx0<6Du?3}akS#E}b%Y+<_Dmsr;(&5BEiG;NuKc`H<0pzB(kRGb85Dpx*$$!uLY`#ig3$;*1GrXm8BZQN z0ZZ;=aD-qu^fUKt%vFoUQpA3mYn0iy1R=7lx(1D239-~(AS@x?-3`g*M(BzkhKvmG zHZycN1ed@633ERG0_I6MYVZ-90u}YjV6kA~@e}a;(gl8sh*&TPITS`;TN_%B9z~pM z!G+J9D0ufhC3B+F;Zg9nRc<+*0KE&|$0OnOf)3Qk2ta7*!RWE6xOt`q)~WfRgeY%J zhPG2M@Lo=MSe6ZYcVJ#tI)b%sj0O-l2;c-BL<%GEqYpFZOv0s$-=WcD!V_DzAk}Cb zQ5gnfs+;gtVAGU|_5)8%%pkFv27p0DJsMWeN2i>?;_7;!r!QHmxzpk7kK&x$ck)b1 z%E2Jv!W5vx3?65j@hYV>fHyNOYY*gR$J&?8qa8r9rHJ%&>1sOLpl@*y(s1bcm9)cZ zR>yx|FozzR<)9xG&U&K=;Gu;b*<wdK`M5&OTswaP91$$v2d}rX00000NkvXX Hu0mjff){o0 literal 0 HcmV?d00001 diff --git a/src/icons.qrc b/src/icons.qrc index 1b953ca15..61c379a9f 100644 --- a/src/icons.qrc +++ b/src/icons.qrc @@ -1,6 +1,5 @@ - Icons/gnome-shutdown.png Icons/rss32.png Icons/money.png Icons/sphere2.png @@ -95,6 +94,7 @@ Icons/oxygen/edit-copy.png Icons/oxygen/bt_settings.png Icons/oxygen/document-new.png + Icons/oxygen/tab-close.png Icons/oxygen/webui.png Icons/oxygen/list-remove.png Icons/oxygen/connection.png diff --git a/src/search.ui b/src/search.ui index f5036472f..a1cba6a6f 100644 --- a/src/search.ui +++ b/src/search.ui @@ -13,39 +13,9 @@ Search - + - - - 6 - - - 0 - - - - - - 16777215 - 35 - - - - - Sans Serif - 9 - 75 - false - true - false - false - - - - Search Pattern: - - - + @@ -60,26 +30,52 @@ - - - - 34 - 29 - - - - - - - - :/Icons/oxygen/edit_clear.png:/Icons/oxygen/edit_clear.png - - - - 30 - 21 - - + + + + All categories + + + + + Movies + + + + + TV shows + + + + + Music + + + + + Games + + + + + Anime + + + + + Software + + + + + Pictures + + + + + Books + + @@ -95,33 +91,10 @@ - - - - false - - - - 16777215 - 29 - - - - Stop - - - - - - - Search engines... - - - - + @@ -150,7 +123,7 @@ - 400 + 200 0 @@ -233,6 +206,13 @@ + + + + Search engines... + + + diff --git a/src/searchEngine.cpp b/src/searchEngine.cpp index f018cf2dc..343a30caf 100644 --- a/src/searchEngine.cpp +++ b/src/searchEngine.cpp @@ -60,7 +60,7 @@ SearchEngine::SearchEngine(bittorrent *BTSession, QSystemTrayIcon *myTrayIcon, b createCompleter(); // Add close tab button closeTab_button = new QPushButton(); - closeTab_button->setIcon(QIcon(QString::fromUtf8(":/Icons/gnome-shutdown.png"))); + closeTab_button->setIcon(QIcon(QString::fromUtf8(":/Icons/oxygen/tab-close.png"))); closeTab_button->setFlat(true); connect(closeTab_button, SIGNAL(clicked()), this, SLOT(closeTab_button_clicked())); tabWidget->setCornerWidget(closeTab_button); @@ -200,6 +200,8 @@ void SearchEngine::on_search_button_clicked(){ if(searchProcess->state() != QProcess::NotRunning){ searchProcess->kill(); searchProcess->waitForFinished(); + search_button->setText("Search"); + return; } if(searchTimeout->isActive()) { searchTimeout->stop(); @@ -306,12 +308,7 @@ void SearchEngine::searchStarted(){ // Update SearchEngine widgets search_status->setText(tr("Searching...")); search_status->repaint(); - stop_search_button->setEnabled(true); - stop_search_button->repaint(); - // clear results window ... not needed since we got Tabbed - //SearchListModel->removeRows(0, SearchListModel->rowCount()); - // Clear previous results urls too - //searchResultsUrls.clear(); + search_button->setText("Stop"); } // Download the given item from search results list @@ -464,8 +461,7 @@ void SearchEngine::searchFinished(int exitcode,QProcess::ExitStatus){ } if(currentSearchTab) currentSearchTab->getCurrentLabel()->setText(tr("Results", "i.e: Search results")+QString::fromUtf8(" (")+misc::toQString(nb_search_results)+QString::fromUtf8("):")); - search_button->setEnabled(true); - stop_search_button->setEnabled(false); + search_button->setText("Search"); } // SLOT to append one line to search results list @@ -527,11 +523,6 @@ void SearchEngine::closeTab_button_clicked(){ } } -void SearchEngine::on_clearPatternButton_clicked() { - search_pattern->clear(); - search_pattern->setFocus(); -} - // Download selected items in search results list void SearchEngine::on_download_button_clicked(){ //QModelIndexList selectedIndexes = currentSearchTab->getCurrentTreeView()->selectionModel()->selectedIndexes(); diff --git a/src/searchEngine.h b/src/searchEngine.h index fea63f75a..17a5dd495 100644 --- a/src/searchEngine.h +++ b/src/searchEngine.h @@ -90,7 +90,6 @@ class SearchEngine : public QWidget, public Ui::search_engine{ void updateNova(); void saveSearchHistory(); void on_enginesButton_clicked(); - void on_clearPatternButton_clicked(); void propagateSectionResized(int index, int oldsize , int newsize); void saveResultsColumnsWidth(); void downloadFinished(int exitcode, QProcess::ExitStatus);