Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Utilities
Kate
Commits
8c125d2a
Commit
8c125d2a
authored
Jan 17, 2022
by
Kåre Särs
Browse files
S&R: Disable folder options for In Open File(s)
parent
9ac0c31d
Pipeline
#124851
passed with stage
in 6 minutes and 38 seconds
Changes
1
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
addons/search/plugin_search.cpp
View file @
8c125d2a
...
...
@@ -401,11 +401,6 @@ KatePluginSearchView::KatePluginSearchView(KTextEditor::Plugin *plugin, KTextEdi
connect
(
m_ui
.
displayOptions
,
&
QToolButton
::
toggled
,
this
,
&
KatePluginSearchView
::
toggleOptions
);
connect
(
m_ui
.
searchPlaceCombo
,
static_cast
<
void
(
QComboBox
::*
)(
int
)
>
(
&
QComboBox
::
currentIndexChanged
),
this
,
&
KatePluginSearchView
::
searchPlaceChanged
);
connect
(
m_ui
.
searchPlaceCombo
,
static_cast
<
void
(
QComboBox
::*
)(
int
)
>
(
&
QComboBox
::
currentIndexChanged
),
this
,
[
this
](
int
)
{
if
(
m_ui
.
searchPlaceCombo
->
currentIndex
()
==
MatchModel
::
Folder
)
{
m_ui
.
displayOptions
->
setChecked
(
true
);
}
});
connect
(
m_ui
.
stopButton
,
&
QPushButton
::
clicked
,
this
,
&
KatePluginSearchView
::
stopClicked
);
...
...
@@ -817,6 +812,14 @@ void KatePluginSearchView::searchPlaceChanged()
int
searchPlace
=
m_ui
.
searchPlaceCombo
->
currentIndex
();
const
bool
inFolder
=
(
searchPlace
==
MatchModel
::
Folder
);
if
(
searchPlace
<
MatchModel
::
Folder
)
{
m_ui
.
displayOptions
->
setChecked
(
false
);
m_ui
.
displayOptions
->
setEnabled
(
false
);
}
else
{
m_ui
.
displayOptions
->
setEnabled
(
true
);
m_ui
.
displayOptions
->
setChecked
(
true
);
}
m_ui
.
filterCombo
->
setEnabled
(
searchPlace
>=
MatchModel
::
Folder
);
m_ui
.
excludeCombo
->
setEnabled
(
searchPlace
>=
MatchModel
::
Folder
);
m_ui
.
folderRequester
->
setEnabled
(
inFolder
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment