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) ...@@ -71,6 +71,9 @@ m_kateApp(application)
m_ui.displayOptions->setIcon(KIcon("list-add")); m_ui.displayOptions->setIcon(KIcon("list-add"));
m_ui.searchButton->setIcon(KIcon("edit-find")); m_ui.searchButton->setIcon(KIcon("edit-find"));
m_ui.stopButton->setIcon(KIcon("process-stop")); 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 = new KAction(i18n("Match case"), this);
m_matchCase->setCheckable(true); m_matchCase->setCheckable(true);
...@@ -116,6 +119,13 @@ void KatePluginSearchView::toggleSearchView() ...@@ -116,6 +119,13 @@ void KatePluginSearchView::toggleSearchView()
if (!m_toolView->isVisible()) { if (!m_toolView->isVisible()) {
mainWindow()->showToolView(m_toolView); mainWindow()->showToolView(m_toolView);
m_ui.searchCombo->setFocus(Qt::OtherFocusReason); 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 { else {
mainWindow()->hideToolView(m_toolView); mainWindow()->hideToolView(m_toolView);
......
...@@ -154,7 +154,7 @@ ...@@ -154,7 +154,7 @@
</item> </item>
</widget> </widget>
</item> </item>
<item row="11" column="2"> <item row="12" column="2">
<spacer name="verticalSpacer"> <spacer name="verticalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Vertical</enum> <enum>Qt::Vertical</enum>
...@@ -167,29 +167,6 @@ ...@@ -167,29 +167,6 @@
</property> </property>
</spacer> </spacer>
</item> </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"> <item row="7" column="2" colspan="5">
<widget class="KUrlRequester" name="searchFolder"> <widget class="KUrlRequester" name="searchFolder">
<property name="mode"> <property name="mode">
...@@ -204,7 +181,7 @@ ...@@ -204,7 +181,7 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="2"> <item row="11" column="2">
<widget class="QCheckBox" name="recursiveCheckBox"> <widget class="QCheckBox" name="recursiveCheckBox">
<property name="text"> <property name="text">
<string>Recursive</string> <string>Recursive</string>
...@@ -214,20 +191,33 @@ ...@@ -214,20 +191,33 @@
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="3"> <item row="11" column="3">
<widget class="QCheckBox" name="hiddenCheckBox"> <widget class="QCheckBox" name="hiddenCheckBox">
<property name="text"> <property name="text">
<string>Include hidden</string> <string>Include hidden</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="3" column="4"> <item row="11" column="4">
<widget class="QCheckBox" name="symLinkCheckBox"> <widget class="QCheckBox" name="symLinkCheckBox">
<property name="text"> <property name="text">
<string>Follow symbolic links</string> <string>Follow symbolic links</string>
</property> </property>
</widget> </widget>
</item> </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> </layout>
</widget> </widget>
</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