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 Runtime
Commits
df1a495b
Commit
df1a495b
authored
Jun 29, 2021
by
Laurent Montel
😁
Browse files
Define if we want to reply to all or reply to author
parent
61f03551
Pipeline
#67975
failed with stage
in 24 minutes and 47 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
agents/newmailnotifier/newmailnotifieragentsettings.kcfg
View file @
df1a495b
...
...
@@ -43,5 +43,8 @@
<entry
name=
"replyMail"
key=
"replyMail"
type=
"Bool"
>
<default>
false
</default>
</entry>
<entry
name=
"replyMailType"
key=
"replyMailType"
type=
"Int"
>
<default>
0
</default>
</entry>
</group>
</kcfg>
agents/newmailnotifier/newmailnotifiersettingswidget.cpp
View file @
df1a495b
...
...
@@ -92,6 +92,7 @@ NewMailNotifierSettingsWidget::NewMailNotifierSettingsWidget(const KSharedConfig
mReplyMailTypeComboBox
=
new
QComboBox
(
parent
);
mReplyMailTypeComboBox
->
setObjectName
(
QStringLiteral
(
"mReplyMailTypeComboBox"
));
mReplyMailTypeComboBox
->
setEnabled
(
false
);
mReplyMailTypeComboBox
->
addItems
({
i18n
(
"Reply to Author"
),
i18n
(
"Reply to All"
)});
hboxLayout
->
addWidget
(
mReplyMailTypeComboBox
);
hboxLayout
->
addStretch
(
1
);
...
...
@@ -182,6 +183,8 @@ void NewMailNotifierSettingsWidget::load()
mTextToSpeakSetting
->
setEnabled
(
mTextToSpeak
->
isChecked
());
mTextToSpeakSetting
->
setText
(
settings
->
textToSpeak
());
mReplyMail
->
setChecked
(
settings
->
replyMail
());
mReplyMailTypeComboBox
->
setCurrentIndex
(
settings
->
replyMailType
());
updateReplyMail
(
mAllowToShowMail
->
isChecked
());
}
...
...
@@ -199,7 +202,7 @@ bool NewMailNotifierSettingsWidget::save() const
settings
->
setTextToSpeakEnabled
(
mTextToSpeak
->
isChecked
());
settings
->
setTextToSpeak
(
mTextToSpeakSetting
->
text
());
settings
->
setReplyMail
(
mReplyMail
->
isChecked
());
settings
->
setReplyMailType
(
mReplyMailTypeComboBox
->
currentIndex
());
settings
->
save
();
mNotify
->
save
();
...
...
agents/newmailnotifier/specialnotifierjob.cpp
View file @
df1a495b
...
...
@@ -151,7 +151,18 @@ void SpecialNotifierJob::emitNotification(const QPixmap &pixmap)
}
QStringList
lstActions
{
i18n
(
"Show mail..."
),
i18n
(
"Mark As Read"
),
i18n
(
"Delete"
)};
if
(
NewMailNotifierAgentSettings
::
replyMail
())
{
lstActions
<<
i18n
(
"Reply mail..."
);
switch
(
NewMailNotifierAgentSettings
::
replyMailType
())
{
case
0
:
lstActions
<<
i18n
(
"Reply to Author"
);
break
;
case
1
:
lstActions
<<
i18n
(
"Reply to All"
);
break
;
default:
qCWarning
(
NEWMAILNOTIFIER_LOG
)
<<
" Problem with NewMailNotifierAgentSettings::replyMailType() value: "
<<
NewMailNotifierAgentSettings
::
replyMailType
();
break
;
}
}
notification
->
setActions
(
lstActions
);
...
...
@@ -188,7 +199,7 @@ void SpecialNotifierJob::slotActivateNotificationAction(unsigned int index)
void
SpecialNotifierJob
::
slotReplyMessage
()
{
auto
job
=
new
NewMailNotifierReplyMessageJob
(
mItem
.
id
());
job
->
setReplyToAll
(
false
);
// TODO add support
job
->
setReplyToAll
(
NewMailNotifierAgentSettings
::
replyMailType
()
==
0
?
false
:
true
);
job
->
start
();
deleteLater
();
}
...
...
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