|
|
|
@ -138,7 +138,7 @@ static TQLabel* switchLabel[switchLabelCount] = {showEverything, showApplication
|
|
|
|
|
currentSortOrder = defaultSortOrder;
|
|
|
|
|
kapp->dcopClient()->setDefaultObject( objId() );
|
|
|
|
|
beagleJustStarted = false;
|
|
|
|
|
m_searchPixmap->setPixmap( BarIcon( "tqfind", 32 ) );
|
|
|
|
|
m_searchPixmap->setPixmap( BarIcon( "find", 32 ) );
|
|
|
|
|
|
|
|
|
|
TQTextCodec::setCodecForCStrings(TQTextCodec::codecForName( "utf8" ));
|
|
|
|
|
encodingRegexp = TQRegExp("%[\\dA-F][\\dA-F]");
|
|
|
|
@ -233,7 +233,7 @@ static TQString nameSwitches[showSwitchesCount] = {"everything", "applications",
|
|
|
|
|
void SearchDlg::searchChanged(const TQString & search)
|
|
|
|
|
{
|
|
|
|
|
TQString _search = search;
|
|
|
|
|
buttonFind->setEnabled(_search.tqreplace("*", TQString()).length()>2);
|
|
|
|
|
buttonFind->setEnabled(_search.replace("*", TQString()).length()>2);
|
|
|
|
|
if (!search.isEmpty() && displayed_results.count()==0 && tableHits->count()==1)
|
|
|
|
|
tableHits->clear();
|
|
|
|
|
if (search.isEmpty() && displayed_results.count()==0 && tableHits->count()==0)
|
|
|
|
@ -369,7 +369,7 @@ void SearchDlg::updatetqStatus()
|
|
|
|
|
if (displayAmount==1)
|
|
|
|
|
text=i18n("<b>%1 results</b> found.").tqarg(displayed_results.count());
|
|
|
|
|
else if (count==0)
|
|
|
|
|
text=i18n("<qt>No results.</qt>").tqreplace("<qt>",TQString()).tqreplace("</qt>",TQString());
|
|
|
|
|
text=i18n("<qt>No results.</qt>").replace("<qt>",TQString()).replace("</qt>",TQString());
|
|
|
|
|
else if (displayOffset==0)
|
|
|
|
|
text=i18n("Best <b>%1 results of %2</b> shown.").tqarg(tableHits->count()).tqarg(displayed_results.count());
|
|
|
|
|
else
|
|
|
|
@ -386,7 +386,7 @@ void SearchDlg::updatetqStatus()
|
|
|
|
|
void SearchDlg::search()
|
|
|
|
|
{
|
|
|
|
|
current_query.set(editSearch->lineEdit()->text());
|
|
|
|
|
if (current_query.get().tqreplace("*", TQString()).length()<3)
|
|
|
|
|
if (current_query.get().replace("*", TQString()).length()<3)
|
|
|
|
|
return;
|
|
|
|
|
|
|
|
|
|
editSearch->addToHistory(current_query.get());
|
|
|
|
@ -970,7 +970,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
|
|
|
|
|
|
|
|
|
|
KerryLabel *headerDirLabel = new KerryLabel(item);
|
|
|
|
|
TQString directory=url.directory();
|
|
|
|
|
int i = directory.tqfindRev('/');
|
|
|
|
|
int i = directory.findRev('/');
|
|
|
|
|
if (i>0)
|
|
|
|
|
directory=directory.mid(i+1);
|
|
|
|
|
headerDirLabel->setText(directory);
|
|
|
|
@ -1033,7 +1033,7 @@ void SearchDlg::insertResult(BeagleSearch::beagle_result_struct *result,int inde
|
|
|
|
|
|
|
|
|
|
KerryLabel *headerDirLabel = new KerryLabel(item);
|
|
|
|
|
TQString directory=url.directory();
|
|
|
|
|
int i = directory.tqfindRev('/');
|
|
|
|
|
int i = directory.findRev('/');
|
|
|
|
|
if (i>0)
|
|
|
|
|
directory=directory.mid(i+1);
|
|
|
|
|
headerDirLabel->setText(directory);
|
|
|
|
@ -1105,7 +1105,7 @@ void SearchDlg::searchHasOutput(BeagleSearch::BeagleResultList &items)
|
|
|
|
|
|
|
|
|
|
for (BeagleSearch::BeagleResultList::ConstIterator it = items.begin(); it != items.end(); ++it) {
|
|
|
|
|
BeagleSearch::beagle_result_struct* result = (*it);
|
|
|
|
|
if ((*(result->uri)).tqfind(encodingRegexp)>0) {
|
|
|
|
|
if ((*(result->uri)).find(encodingRegexp)>0) {
|
|
|
|
|
KURL kurl(*(result->uri));
|
|
|
|
|
*(result->uri)=kurl.url();
|
|
|
|
|
}
|
|
|
|
@ -1269,7 +1269,7 @@ void SearchDlg::slotOpen()
|
|
|
|
|
{
|
|
|
|
|
slotOpenEvolution(item->uri());
|
|
|
|
|
}
|
|
|
|
|
else if (item->uri().startsWith("mailbox:/") && item->uri().tqfind("thunderbird")>0)
|
|
|
|
|
else if (item->uri().startsWith("mailbox:/") && item->uri().find("thunderbird")>0)
|
|
|
|
|
{
|
|
|
|
|
slotOpenThunderbird(item->uri());
|
|
|
|
|
}
|
|
|
|
@ -1433,7 +1433,7 @@ void SearchDlg::searchLostOutput(BeagleSearch::VanishedURIList &items)
|
|
|
|
|
|
|
|
|
|
void SearchDlg::searchFinished()
|
|
|
|
|
{
|
|
|
|
|
m_searchPixmap->setPixmap( BarIcon( "tqfind", 32 ) );
|
|
|
|
|
m_searchPixmap->setPixmap( BarIcon( "find", 32 ) );
|
|
|
|
|
|
|
|
|
|
still_searching = false;
|
|
|
|
|
|
|
|
|
@ -1511,7 +1511,7 @@ bool SearchDlg::mimeTypeMatch( const TQString& mimeType, const TQStringList& mim
|
|
|
|
|
return true;
|
|
|
|
|
// Support for *mt == "image/*"
|
|
|
|
|
TQString tmp( mimeType );
|
|
|
|
|
if ( (*mt).endsWith("*") && tmp.tqreplace(TQRegExp("/.*"), "/*") == (*mt) )
|
|
|
|
|
if ( (*mt).endsWith("*") && tmp.replace(TQRegExp("/.*"), "/*") == (*mt) )
|
|
|
|
|
return true;
|
|
|
|
|
}
|
|
|
|
|
return false;
|
|
|
|
|