Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KDE PIM Add-ons
Commits
b73a20ad
Commit
b73a20ad
authored
Jul 11, 2021
by
Laurent Montel
😁
Browse files
Fix icons + fix show remove/edit actions
parent
fecd4ff7
Pipeline
#69921
passed with stage
in 41 minutes and 55 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
kmail/checkbeforedeletemailplugins/confirmbeforedeleting/confirmbeforedeletingwidget.cpp
View file @
b73a20ad
...
...
@@ -75,12 +75,12 @@ void ConfirmBeforeDeletingWidget::initializeItem(QTreeWidgetItem *item, const Co
void
ConfirmBeforeDeletingWidget
::
slotCustomContextMenuRequested
(
const
QPoint
&
p
)
{
QMenu
menu
(
this
);
menu
.
addAction
(
QIcon
::
fromTheme
(
QStringLiteral
(
"document-open"
)),
i18n
(
"Add Rule..."
),
this
,
&
ConfirmBeforeDeletingWidget
::
slotAddRule
)
;
QTreeWidgetItem
*
item
=
mTreeWidget
->
currentItem
(
);
if
(
item
)
{
menu
.
addAction
(
QIcon
::
fromTheme
(
QStringLiteral
(
"document-
open
"
)),
i18n
(
"Edit Rule..."
),
this
,
&
ConfirmBeforeDeletingWidget
::
slotEditRule
);
const
int
selectedItemCount
{
mTreeWidget
->
selectedItems
().
count
()}
;
menu
.
addAction
(
QIcon
::
fromTheme
(
QStringLiteral
(
"list-add"
)),
i18n
(
"Add Rule..."
),
this
,
&
ConfirmBeforeDeletingWidget
::
slotAddRule
);
if
(
selectedItemCount
>
0
)
{
menu
.
addAction
(
QIcon
::
fromTheme
(
QStringLiteral
(
"document-
edit
"
)),
i18n
(
"Edit Rule..."
),
this
,
&
ConfirmBeforeDeletingWidget
::
slotEditRule
);
menu
.
addSeparator
();
menu
.
addAction
(
QIcon
::
fromTheme
(
QStringLiteral
(
"
edit-delet
e"
)),
i18n
(
"Remove Rule"
),
this
,
&
ConfirmBeforeDeletingWidget
::
slotRemoveRule
);
menu
.
addAction
(
QIcon
::
fromTheme
(
QStringLiteral
(
"
list-remov
e"
)),
i18n
(
"Remove Rule"
),
this
,
&
ConfirmBeforeDeletingWidget
::
slotRemoveRule
);
}
menu
.
exec
(
QCursor
::
pos
());
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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