mirror of
https://bitbucket.org/smil3y/kde-extraapps.git
synced 2025-02-23 18:32:53 +00:00
kdeplasma-addons: remove non-operational incommingmsg bits
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
6db39d7067
commit
5b4f518906
2 changed files with 11 additions and 65 deletions
|
@ -49,17 +49,15 @@
|
||||||
#include <KLocale>
|
#include <KLocale>
|
||||||
|
|
||||||
IncomingMsg::IncomingMsg(QObject *parent, const QVariantList &args)
|
IncomingMsg::IncomingMsg(QObject *parent, const QVariantList &args)
|
||||||
: Plasma::Applet(parent, args),
|
: Plasma::Applet(parent, args),
|
||||||
mEvolutionLabel(0), mEvolutionIconLabel(0),
|
mXChatLabel(0), mXChatIconLabel(0),
|
||||||
mXChatLabel(0), mXChatIconLabel(0),
|
mKopeteLabel(0), mKopeteIconLabel(0),
|
||||||
mKopeteLabel(0), mKopeteIconLabel(0),
|
mPidginLabel(0), mPidginIconLabel(0),
|
||||||
mPidginLabel(0), mPidginIconLabel(0),
|
mQutIMLabel(0), mQutIMIconLabel(0),
|
||||||
mQutIMLabel(0), mQutIMIconLabel(0),
|
mErrorLabel(0), mLayout(0),
|
||||||
mErrorLabel(0), mLayout(0),
|
mXChatLayout(0), mKopeteLayout(0),
|
||||||
mEvolutionLayout(0), mXChatLayout(0),
|
mPidginLayout(0), mQutIMLayout(0),
|
||||||
mKopeteLayout(0), mPidginLayout(0),
|
mQutIUnreadCount(0)
|
||||||
mQutIMLayout(0),
|
|
||||||
mQutIUnreadCount(0)
|
|
||||||
{
|
{
|
||||||
// this will get us the standard applet background, for free!
|
// this will get us the standard applet background, for free!
|
||||||
setBackgroundHints(DefaultBackground);
|
setBackgroundHints(DefaultBackground);
|
||||||
|
@ -104,45 +102,6 @@ void IncomingMsg::configChanged()
|
||||||
mShowQutIM = cg.readEntry("showQutIM", true);
|
mShowQutIM = cg.readEntry("showQutIM", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void IncomingMsg::initEvolutionLayout()
|
|
||||||
{
|
|
||||||
/* test for the evolution dbus interface */
|
|
||||||
// TODO find out why evolution does not expose dbus on a kde session here
|
|
||||||
// QDBusInterface evolutionDBusTest( "org.freedesktop.Notification",
|
|
||||||
// "‘/org/freedesktop/Notifications",
|
|
||||||
// "org.freedesktop.Notifications" );
|
|
||||||
// QDBusReply<QString>evolutionReply = evolutionDBusTest.call( "New Email" );
|
|
||||||
// if(/*!evolutionReply.isValid()*/false)
|
|
||||||
// kDebug() << "Evolution DBus interface test error: " << evolutionReply.error();
|
|
||||||
// else{
|
|
||||||
// QDBusConnection mDBus = QDBusConnection::sessionBus();
|
|
||||||
//
|
|
||||||
// if( !mDBus.connect ( "org.gnome.evolution", "/Evolution", "org.gnome.evolution.mail.dbus.Signal",
|
|
||||||
// "Newmail",
|
|
||||||
// this, SLOT(slotNewMail()) ) )
|
|
||||||
// kDebug() << "Could not connect Evolution to slot.";
|
|
||||||
// else{
|
|
||||||
// mEvolutionLayout = new QGraphicsLinearLayout(Qt::Horizontal);
|
|
||||||
// mEvolutionLabel = new Plasma::Label(this);
|
|
||||||
// mEvolutionLabel->setText( i18n("No new mail."));
|
|
||||||
// KIcon icon( "evolution" );
|
|
||||||
// mEvolutionIconLabel = new Plasma::Label(this);
|
|
||||||
// mEvolutionIconLabel->setMinimumWidth(32);
|
|
||||||
// mEvolutionIconLabel->setMinimumHeight(32);
|
|
||||||
// KIconEffect effect;
|
|
||||||
// mEvolutionIconLabel->nativeWidget()->setPixmap(
|
|
||||||
// effect.apply( icon.pixmap(32,32), KIconEffect::ToGray, 1, QColor(),QColor(), true )
|
|
||||||
// );
|
|
||||||
//
|
|
||||||
// mEvolutionLayout->addItem(mEvolutionIconLabel);
|
|
||||||
// mEvolutionLayout->addItem(mEvolutionLabel);
|
|
||||||
// mEvolutionLayout->setAlignment(mEvolutionLabel, Qt::AlignLeft);
|
|
||||||
//
|
|
||||||
// mLayout->addItem(mEvolutionLayout);
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
}
|
|
||||||
|
|
||||||
void IncomingMsg::initXChatLayout()
|
void IncomingMsg::initXChatLayout()
|
||||||
{
|
{
|
||||||
/* test for the xchat dbus interface */
|
/* test for the xchat dbus interface */
|
||||||
|
@ -362,7 +321,6 @@ void IncomingMsg::initLayout()
|
||||||
{
|
{
|
||||||
mLayout = new QGraphicsLinearLayout(Qt::Vertical);
|
mLayout = new QGraphicsLinearLayout(Qt::Vertical);
|
||||||
|
|
||||||
//initEvolutionLayout();
|
|
||||||
initXChatLayout();
|
initXChatLayout();
|
||||||
initKopeteLayout();
|
initKopeteLayout();
|
||||||
initPidginLayout();
|
initPidginLayout();
|
||||||
|
@ -419,15 +377,6 @@ void IncomingMsg::configAccepted()
|
||||||
initLayout();
|
initLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
void IncomingMsg::slotNewEvolutionMail()
|
|
||||||
{
|
|
||||||
if (mEvolutionIconLabel) {
|
|
||||||
KIcon icon("evolution");
|
|
||||||
mEvolutionIconLabel->nativeWidget()->setPixmap(icon.pixmap(32, 32));
|
|
||||||
mEvolutionLabel->setText(i18n("Your Evolution mail count has changed."));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void IncomingMsg::slotNewXChatIM()
|
void IncomingMsg::slotNewXChatIM()
|
||||||
{
|
{
|
||||||
KIcon icon("xchat");
|
KIcon icon("xchat");
|
||||||
|
|
|
@ -51,7 +51,6 @@ public:
|
||||||
protected:
|
protected:
|
||||||
void createConfigurationInterface(KConfigDialog *parent);
|
void createConfigurationInterface(KConfigDialog *parent);
|
||||||
|
|
||||||
void initEvolutionLayout();
|
|
||||||
void initXChatLayout();
|
void initXChatLayout();
|
||||||
void initKopeteLayout();
|
void initKopeteLayout();
|
||||||
void initPidginLayout();
|
void initPidginLayout();
|
||||||
|
@ -69,13 +68,12 @@ private:
|
||||||
void updateQutIMStatus(bool saveIcon);
|
void updateQutIMStatus(bool saveIcon);
|
||||||
|
|
||||||
// text labels
|
// text labels
|
||||||
Plasma::Label *mEvolutionLabel, *mEvolutionIconLabel,
|
Plasma::Label *mXChatLabel,
|
||||||
*mXChatLabel,
|
|
||||||
*mXChatIconLabel, *mKopeteLabel, *mKopeteIconLabel,
|
*mXChatIconLabel, *mKopeteLabel, *mKopeteIconLabel,
|
||||||
*mPidginLabel, *mPidginIconLabel, *mQutIMLabel,
|
*mPidginLabel, *mPidginIconLabel, *mQutIMLabel,
|
||||||
*mQutIMIconLabel, *mErrorLabel;
|
*mQutIMIconLabel, *mErrorLabel;
|
||||||
|
|
||||||
QGraphicsLinearLayout *mLayout, *mEvolutionLayout,
|
QGraphicsLinearLayout *mLayout,
|
||||||
*mXChatLayout, *mKopeteLayout, *mPidginLayout,
|
*mXChatLayout, *mKopeteLayout, *mPidginLayout,
|
||||||
*mQutIMLayout;
|
*mQutIMLayout;
|
||||||
|
|
||||||
|
@ -87,7 +85,6 @@ private:
|
||||||
Ui::incomingmsgConfig ui;
|
Ui::incomingmsgConfig ui;
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
void slotNewEvolutionMail();
|
|
||||||
void slotNewPidginIM();
|
void slotNewPidginIM();
|
||||||
void slotNewKopeteIM(const QString&);
|
void slotNewKopeteIM(const QString&);
|
||||||
void slotNewXChatIM();
|
void slotNewXChatIM();
|
||||||
|
|
Loading…
Add table
Reference in a new issue