Commit 9a89195e authored by Christoph Cullmann's avatar Christoph Cullmann

fix stop button of search and replace plugin

stop button no longer did show up
now it does again
code now uses widget name an not just index to make usage more clear
parent de2370c7
......@@ -952,7 +952,7 @@ void KatePluginSearchView::startSearch()
m_ui.displayOptions->setDisabled(true);
m_ui.replaceCheckedBtn->setDisabled(true);
m_ui.replaceButton->setDisabled(true);
m_ui.stopAndNext->setCurrentIndex(1);
m_ui.stopAndNext->setCurrentWidget(m_ui.stopButton);
m_ui.replaceCombo->setDisabled(true);
m_ui.searchPlaceCombo->setDisabled(true);
m_ui.useRegExp->setDisabled(true);
......@@ -1175,7 +1175,7 @@ void KatePluginSearchView::searchDone()
m_ui.newTabButton->setDisabled(false);
m_ui.searchCombo->setDisabled(false);
m_ui.searchButton->setDisabled(false);
m_ui.stopAndNext->setCurrentIndex(0);
m_ui.stopAndNext->setCurrentWidget(m_ui.nextButton);
m_ui.displayOptions->setDisabled(false);
m_ui.replaceCombo->setDisabled(false);
m_ui.searchPlaceCombo->setDisabled(false);
......@@ -1377,7 +1377,7 @@ void KatePluginSearchView::replaceChecked()
return;
}
m_ui.stopAndNext->setCurrentIndex(1);
m_ui.stopAndNext->setCurrentWidget(m_ui.stopButton);
m_ui.displayOptions->setChecked(false);
m_ui.displayOptions->setDisabled(true);
m_ui.newTabButton->setDisabled(true);
......@@ -1425,7 +1425,7 @@ void KatePluginSearchView::replaceStatus(const QUrl &url, int replacedInFile, in
void KatePluginSearchView::replaceDone()
{
m_ui.stopAndNext->setCurrentIndex(0);
m_ui.stopAndNext->setCurrentWidget(m_ui.nextButton);
m_ui.replaceCombo->setDisabled(false);
m_ui.newTabButton->setDisabled(false);
m_ui.searchCombo->setDisabled(false);
......@@ -2002,7 +2002,7 @@ void KatePluginSearchView::onResize(const QSize& size)
m_ui.gridLayout->addWidget(m_ui.searchCombo, 0, 1, 1, 8);
m_ui.gridLayout->addWidget(m_ui.findLabel, 0, 0);
m_ui.gridLayout->addWidget(m_ui.searchButton, 1, 0, 1, 2);
m_ui.gridLayout->addWidget(m_ui.nextButton, 1, 2);
m_ui.gridLayout->addWidget(m_ui.stopAndNext, 1, 2);
m_ui.gridLayout->addWidget(m_ui.searchPlaceCombo, 1, 3, 1, 3);
m_ui.gridLayout->addWidget(m_ui.displayOptions, 1, 6);
m_ui.gridLayout->addWidget(m_ui.matchCase, 1, 7);
......@@ -2023,7 +2023,7 @@ void KatePluginSearchView::onResize(const QSize& size)
m_ui.gridLayout->addWidget(m_ui.searchCombo, 0, 2);
m_ui.gridLayout->addWidget(m_ui.findLabel, 0, 1);
m_ui.gridLayout->addWidget(m_ui.searchButton, 0, 3);
m_ui.gridLayout->addWidget(m_ui.nextButton, 0, 4);
m_ui.gridLayout->addWidget(m_ui.stopAndNext, 0, 4);
m_ui.gridLayout->addWidget(m_ui.searchPlaceCombo, 0, 5, 1, 4);
m_ui.gridLayout->addWidget(m_ui.matchCase, 1, 5);
m_ui.gridLayout->addWidget(m_ui.useRegExp, 1, 6);
......
......@@ -64,30 +64,6 @@
<property name="currentIndex">
<number>0</number>
</property>
<widget class="QWidget" name="page_3">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="nextButton">
<property name="enabled">
<bool>false</bool>
......@@ -99,47 +75,14 @@
<string>Next</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="stopButtonPage">
<property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<property name="spacing">
<number>0</number>
</property>
<property name="leftMargin">
<number>0</number>
</property>
<property name="topMargin">
<number>0</number>
</property>
<property name="rightMargin">
<number>0</number>
</property>
<property name="bottomMargin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="stopButton">
<property name="sizePolicy">
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<property name="toolTip">
<string>Stop</string>
</property>
<property name="text">
<string>Stop</string>
</property>
</widget>
</item>
</layout>
</widget>
</widget>
</item>
<item row="0" column="5" colspan="5">
......
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