Commit 2deeae86 authored by Kåre Särs's avatar Kåre Särs

Search Plugin: Combine the stop and search location combo for simper UI

parent 1e872d5a
......@@ -125,7 +125,7 @@ void KatePluginSearchView::toggleSearchView()
void KatePluginSearchView::startSearch()
{
m_ui.searchButton->setDisabled(true);
m_ui.stopButton->setDisabled(false);
m_ui.locationStop->setCurrentIndex(1);
m_ui.optionsButton->setDisabled(true);
m_ui.displayOptions->setChecked (false);
m_ui.displayOptions->setDisabled(true);
......@@ -151,12 +151,14 @@ void KatePluginSearchView::startSearch()
void KatePluginSearchView::toggleOptions(bool show)
{
m_ui.stackedWidget->setCurrentIndex((show) ? 1:0);
searchPlaceChanged();
}
void KatePluginSearchView::searchPlaceChanged()
{
bool disable = (m_ui.searchPlaceCombo->currentIndex() == 0);
if (!disable) {
m_ui.displayOptions->setChecked(true);
}
m_ui.recursiveCheckBox->setDisabled(disable);
m_ui.hiddenCheckBox->setDisabled(disable);
m_ui.symLinkCheckBox->setDisabled(disable);
......@@ -181,7 +183,7 @@ void KatePluginSearchView::matchFound(const QString &fileName, int line, const Q
void KatePluginSearchView::searchDone()
{
m_ui.searchButton->setDisabled(false);
m_ui.stopButton->setDisabled(true);
m_ui.locationStop->setCurrentIndex(0);
m_ui.optionsButton->setDisabled(false);
m_ui.displayOptions->setDisabled(false);
......
......@@ -167,20 +167,6 @@
</property>
</spacer>
</item>
<item row="3" column="2">
<widget class="KComboBox" name="searchPlaceCombo">
<item>
<property name="text">
<string>Open files</string>
</property>
</item>
<item>
<property name="text">
<string>Folder</string>
</property>
</item>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_4">
<property name="text">
......@@ -189,36 +175,9 @@
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
<property name="buddy">
<cstring>searchPlaceCombo</cstring>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QCheckBox" name="recursiveCheckBox">
<property name="text">
<string>Recursive</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="5">
<widget class="QCheckBox" name="symLinkCheckBox">
<property name="text">
<string>Follow symbolic links</string>
</property>
</widget>
</item>
<item row="3" column="4">
<widget class="QCheckBox" name="hiddenCheckBox">
<property name="text">
<string>Include hidden</string>
</property>
</widget>
</item>
<item row="3" column="6">
<item row="3" column="5" colspan="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
......@@ -245,6 +204,30 @@
</property>
</widget>
</item>
<item row="3" column="2">
<widget class="QCheckBox" name="recursiveCheckBox">
<property name="text">
<string>Recursive</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="3">
<widget class="QCheckBox" name="hiddenCheckBox">
<property name="text">
<string>Include hidden</string>
</property>
</widget>
</item>
<item row="3" column="4">
<widget class="QCheckBox" name="symLinkCheckBox">
<property name="text">
<string>Follow symbolic links</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
......@@ -260,13 +243,45 @@
</widget>
</item>
<item row="0" column="2">
<widget class="KPushButton" name="stopButton">
<property name="enabled">
<bool>false</bool>
</property>
<property name="text">
<string>Stop</string>
<widget class="QStackedWidget" name="locationStop">
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="page_3">
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="KComboBox" name="searchPlaceCombo">
<item>
<property name="text">
<string>in Open files</string>
</property>
</item>
<item>
<property name="text">
<string>in Folder</string>
</property>
</item>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="page_4">
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="KPushButton" name="stopButton">
<property name="text">
<string>Stop</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
</layout>
......@@ -291,13 +306,8 @@
<tabstops>
<tabstop>searchCombo</tabstop>
<tabstop>searchButton</tabstop>
<tabstop>stopButton</tabstop>
<tabstop>optionsButton</tabstop>
<tabstop>displayOptions</tabstop>
<tabstop>searchPlaceCombo</tabstop>
<tabstop>recursiveCheckBox</tabstop>
<tabstop>hiddenCheckBox</tabstop>
<tabstop>symLinkCheckBox</tabstop>
<tabstop>searchFolder</tabstop>
<tabstop>filterCombo</tabstop>
<tabstop>searchResults</tabstop>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment