Commit 3b6e48f5 authored by Kåre Särs's avatar Kåre Särs

Search plugin: Add icons and reorganize checkboxes

parent 2deeae86
......@@ -71,6 +71,9 @@ m_kateApp(application)
m_ui.displayOptions->setIcon(KIcon("list-add"));
m_ui.searchButton->setIcon(KIcon("edit-find"));
m_ui.stopButton->setIcon(KIcon("process-stop"));
m_ui.optionsButton->setIcon(KIcon("configure"));
m_ui.searchPlaceCombo->setItemIcon(0, KIcon("text-plain"));
m_ui.searchPlaceCombo->setItemIcon(1, KIcon("folder"));
m_matchCase = new KAction(i18n("Match case"), this);
m_matchCase->setCheckable(true);
......@@ -116,6 +119,13 @@ void KatePluginSearchView::toggleSearchView()
if (!m_toolView->isVisible()) {
mainWindow()->showToolView(m_toolView);
m_ui.searchCombo->setFocus(Qt::OtherFocusReason);
if (m_ui.searchFolder->text().isEmpty()) {
KTextEditor::View* editView = mainWindow()->activeView();
if (editView && editView->document()) {
// upUrl as we want the folder not the file
m_ui.searchFolder->setUrl(editView->document()->url().upUrl());
}
}
}
else {
mainWindow()->hideToolView(m_toolView);
......
......@@ -154,7 +154,7 @@
</item>
</widget>
</item>
<item row="11" column="2">
<item row="12" column="2">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
......@@ -167,29 +167,6 @@
</property>
</spacer>
</item>
<item row="3" column="1">
<widget class="QLabel" name="label_4">
<property name="text">
<string>Search in</string>
</property>
<property name="alignment">
<set>Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="3" column="5" colspan="2">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="7" column="2" colspan="5">
<widget class="KUrlRequester" name="searchFolder">
<property name="mode">
......@@ -204,7 +181,7 @@
</property>
</widget>
</item>
<item row="3" column="2">
<item row="11" column="2">
<widget class="QCheckBox" name="recursiveCheckBox">
<property name="text">
<string>Recursive</string>
......@@ -214,20 +191,33 @@
</property>
</widget>
</item>
<item row="3" column="3">
<item row="11" column="3">
<widget class="QCheckBox" name="hiddenCheckBox">
<property name="text">
<string>Include hidden</string>
</property>
</widget>
</item>
<item row="3" column="4">
<item row="11" column="4">
<widget class="QCheckBox" name="symLinkCheckBox">
<property name="text">
<string>Follow symbolic links</string>
</property>
</widget>
</item>
<item row="11" column="5">
<spacer name="horizontalSpacer">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>40</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
</widget>
......
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