Minor: Renamed method for readability.

This method isn't about disabling/enabling the "new icon", it's
only about the count.

For the "new icon" we need another enabler/disabler.
wilder-work
Sergio Martins 12 years ago
parent 39c3a25e62
commit 5856e428ba
  1. 4
      kmkernel.cpp
  2. 10
      kmsystemtray.cpp
  3. 4
      kmsystemtray.h

@ -540,7 +540,7 @@ void KMKernel::checkMail () //might create a new reader but won't show!!
void KMKernel::setSystrayUnreadCountEnabled(bool enabled)
{
GlobalSettings::self()->systemTrayShowUnreadItem()->setValue(enabled);
mSystemTray->setShowUnread(enabled);
mSystemTray->setShowUnreadCount(enabled);
GlobalSettings::self()->writeConfig();
}
@ -2096,7 +2096,7 @@ void KMKernel::toggleSystemTray()
// Set mode of systemtray. If mode has changed, tray will handle this.
if ( mSystemTray ) {
mSystemTray->setMode( GlobalSettings::self()->systemTrayPolicy() );
mSystemTray->setShowUnread( GlobalSettings::self()->systemTrayShowUnread() );
mSystemTray->setShowUnreadCount( GlobalSettings::self()->systemTrayShowUnread() );
}
}

@ -62,7 +62,7 @@ KMSystemTray::KMSystemTray(QObject *parent)
mDesktopOfMainWin( 0 ),
mMode( GlobalSettings::EnumSystemTrayPolicy::ShowOnUnread ),
mCount( 0 ),
mShowUnreadMail( true ),
mShowUnreadMailCount( true ),
mNewMessagesPopup( 0 ),
mSendQueued( 0 )
{
@ -142,11 +142,11 @@ KMSystemTray::~KMSystemTray()
{
}
void KMSystemTray::setShowUnread(bool showUnread)
void KMSystemTray::setShowUnreadCount(bool showUnreadCount)
{
if (mShowUnreadMail == showUnread)
if (mShowUnreadMailCount == showUnreadCount)
return;
mShowUnreadMail = showUnread;
mShowUnreadMailCount = showUnreadCount;
updateSystemTray();
}
@ -186,7 +186,7 @@ void KMSystemTray::updateCount()
setIconByName( "kmail" );
return;
}
if (mShowUnreadMail) {
if (mShowUnreadMailCount) {
const int overlaySize = KIconLoader::SizeSmallMedium;
const QString countString = QString::number( mCount );

@ -47,7 +47,7 @@ public:
/** destructor */
~KMSystemTray();
void setShowUnread(bool showUnread);
void setShowUnreadCount(bool showUnreadCount);
void setMode(int mode);
int mode() const;
@ -80,7 +80,7 @@ private:
int mMode;
int mCount;
bool mShowUnreadMail;
bool mShowUnreadMailCount;
QMenu *mNewMessagesPopup;
QAction *mSendQueued;
};

Loading…
Cancel
Save