include own files check option on search

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@2391 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
alexandrut 2010-02-22 21:44:43 +00:00
parent f3e507d59a
commit 103e4517e9
2 changed files with 21 additions and 23 deletions

View File

@ -565,10 +565,12 @@ void SearchDialog::searchKeywords()
/* call to core */ /* call to core */
std::list<DirDetails> initialResults; std::list<DirDetails> initialResults;
std::list<DirDetails> * finalResults = 0; std::list<DirDetails> * finalResults = 0;
//rsFiles -> SearchKeywords(words, initialResults,DIR_FLAGS_LOCAL | DIR_FLAGS_REMOTE | DIR_FLAGS_NETWORK_WIDE | DIR_FLAGS_BROWSABLE); uint32_t flags = DIR_FLAGS_REMOTE | DIR_FLAGS_NETWORK_WIDE | DIR_FLAGS_BROWSABLE;
rsFiles -> SearchKeywords(words, initialResults,DIR_FLAGS_REMOTE | DIR_FLAGS_NETWORK_WIDE | DIR_FLAGS_BROWSABLE); if (ui.checkBox->isChecked())
flags |= DIR_FLAGS_LOCAL;
rsFiles -> SearchKeywords(words, initialResults,flags);
/* which extensions do we use? */ /* which extensions do we use? */
QString qExt, qName; QString qExt, qName;
int extIndex; int extIndex;
@ -1090,7 +1092,8 @@ void SearchDialog::resultsToTree(std::string txt,qulonglong searchId, const std:
void SearchDialog::selectSearchResults(int index) void SearchDialog::selectSearchResults(int index)
{ {
index = (index == -1)?ui.FileTypeComboBox->currentIndex():index; int cindex = ui.FileTypeComboBox->currentIndex();
index = (index == -1) ? (cindex == -1 ? 0 : cindex):index;
QString alltypes = FileTypeExtensionMap->value(index); QString alltypes = FileTypeExtensionMap->value(index);
QStringList types = alltypes.split(" "); QStringList types = alltypes.split(" ");

View File

@ -502,13 +502,7 @@
<property name="styleSheet"> <property name="styleSheet">
<string notr="true"/> <string notr="true"/>
</property> </property>
<layout class="QGridLayout" name="gridLayout_4"> <layout class="QGridLayout" name="gridLayout_2">
<property name="bottomMargin">
<number>4</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="0"> <item row="0" column="0">
<widget class="QFrame" name="frame"> <widget class="QFrame" name="frame">
<property name="maximumSize"> <property name="maximumSize">
@ -1041,14 +1035,8 @@ border-image: url(:/images/btn_26_pressed.png) 4;
</widget> </widget>
</item> </item>
<item row="2" column="0"> <item row="2" column="0">
<layout class="QGridLayout" name="gridLayout_2"> <layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="topMargin"> <item>
<number>4</number>
</property>
<property name="horizontalSpacing">
<number>6</number>
</property>
<item row="0" column="0">
<widget class="QPushButton" name="cloaseallsearchresultsButton"> <widget class="QPushButton" name="cloaseallsearchresultsButton">
<property name="toolTip"> <property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt; <string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
@ -1104,20 +1092,27 @@ border-image: url(:/images/btn_26_pressed.png) 4;
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item>
<widget class="QCheckBox" name="checkBox">
<property name="text">
<string>Include own files</string>
</property>
</widget>
</item>
<item>
<spacer> <spacer>
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="sizeHint" stdset="0"> <property name="sizeHint" stdset="0">
<size> <size>
<width>351</width> <width>218</width>
<height>20</height> <height>21</height>
</size> </size>
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="0" column="2"> <item>
<widget class="QPushButton" name="pushButtonDownload"> <widget class="QPushButton" name="pushButtonDownload">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>