Commit 2b774468 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add info about verbose mail notification as in kmail

parent e996da6d
......@@ -51,7 +51,8 @@ using namespace Akonadi;
NewMailNotifierAgent::NewMailNotifierAgent( const QString &id )
: AgentBase( id ),
mNotifierEnabled(true),
mCheckMailInProgress(false)
mCheckMailInProgress(false),
mVerboseNotification(true)
{
KGlobal::locale()->insertCatalog( "newmailnotifieragent" );
Akonadi::AttributeFactory::registerAttribute<NewMailNotifierAttribute>();
......@@ -82,6 +83,7 @@ NewMailNotifierAgent::NewMailNotifierAgent( const QString &id )
KConfigGroup group( KGlobal::config(), "General" );
mNotifierEnabled = group.readEntry( "enabled", true);
mVerboseNotification = group.readEntry("verboseNotification", true);
if (mNotifierEnabled) {
mTimer.setSingleShot( true );
......@@ -101,6 +103,18 @@ void NewMailNotifierAgent::setEnableNotifier(bool b)
}
}
void NewMailNotifierAgent::setVerboseMailNotification(bool b)
{
mVerboseNotification = b;
KConfigGroup group( KGlobal::config(), "General" );
group.writeEntry( "verboseNotification", mVerboseNotification);
}
bool NewMailNotifierAgent::verboseMailNotification() const
{
return mVerboseNotification;
}
void NewMailNotifierAgent::clearAll()
{
mNewMails.clear();
......
......@@ -43,6 +43,10 @@ public:
void setEnableNotifier(bool b);
bool enabledNotifier() const;
void setVerboseMailNotification(bool b);
bool verboseMailNotification() const;
void printDebug();
protected:
......@@ -63,6 +67,7 @@ private:
QStringList mInstanceNameInProgress;
bool mNotifierEnabled;
bool mCheckMailInProgress;
bool mVerboseNotification;
};
#endif
......@@ -7,6 +7,12 @@
<method name="enabledNotifier" >
<arg type="b" direction="out"/>
</method>
<method name="setVerboseMailNotification" >
<arg type="b" direction="in"/>
</method>
<method name="verboseMailNotification" >
<arg type="b" direction="out"/>
</method>
<method name="printDebug" />
</interface>
</node>
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