Commit a4579a60 authored by Dominik Haumann's avatar Dominik Haumann

folder: add "up" button to navigate one folder up

parent bdc642b3
......@@ -100,6 +100,7 @@ m_curResultTree(0)
m_ui.optionsButton->setIcon(KIcon("configure"));
m_ui.searchPlaceCombo->setItemIcon(0, KIcon("text-plain"));
m_ui.searchPlaceCombo->setItemIcon(1, KIcon("folder"));
m_ui.folderUpButton->setIcon(KIcon("go-up"));
m_ui.currentFolderButton->setIcon(KIcon("view-refresh"));
m_ui.newTabButton->setIcon(KIcon("tab-new"));
......@@ -134,6 +135,7 @@ m_curResultTree(0)
connect(m_ui.searchButton, SIGNAL(clicked()), this, SLOT(startSearch()));
connect(m_ui.searchCombo, SIGNAL(returnPressed()), this, SLOT(startSearch()));
connect(m_ui.folderRequester, SIGNAL(returnPressed()), this, SLOT(startSearch()));
connect(m_ui.folderUpButton, SIGNAL(clicked()), this, SLOT(navigageFolderUp()));
connect(m_ui.currentFolderButton, SIGNAL(clicked()), this, SLOT(setCurrentFolder()));
connect(m_ui.filterCombo, SIGNAL(returnPressed()), this, SLOT(startSearch()));
......@@ -170,6 +172,12 @@ KatePluginSearchView::~KatePluginSearchView()
delete m_toolView;
}
void KatePluginSearchView::navigageFolderUp()
{
// navigate one folder up
m_ui.folderRequester->setUrl(m_ui.folderRequester->url().upUrl());
}
void KatePluginSearchView::setCurrentFolder()
{
if (!mainWindow()) {
......
......@@ -66,6 +66,7 @@ public:
public Q_SLOTS:
void startSearch();
void setSearchString(const QString &pattern);
void navigageFolderUp();
void setCurrentFolder();
void setSearchPlace(int place);
......
......@@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>377</width>
<height>110</height>
<width>449</width>
<height>118</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout" rowstretch="0,1" columnstretch="0,1,0,0,0,0">
......@@ -170,7 +170,7 @@
</property>
</widget>
</item>
<item row="10" column="2" colspan="5">
<item row="10" column="2" colspan="6">
<widget class="KComboBox" name="filterCombo">
<property name="editable">
<bool>true</bool>
......@@ -198,7 +198,7 @@
</property>
</spacer>
</item>
<item row="1" column="1" colspan="6">
<item row="1" column="1" colspan="7">
<widget class="Line" name="line">
<property name="orientation">
<enum>Qt::Horizontal</enum>
......@@ -242,11 +242,8 @@
</property>
</spacer>
</item>
<item row="8" column="6">
<item row="8" column="7">
<widget class="QToolButton" name="currentFolderButton">
<property name="text">
<string>...</string>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
......@@ -272,6 +269,13 @@
</property>
</widget>
</item>
<item row="8" column="6">
<widget class="QToolButton" name="folderUpButton">
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</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