From 5b4f5189066bb46611f381a34fe8732e99100894 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Thu, 24 Aug 2023 03:57:25 +0300 Subject: [PATCH] kdeplasma-addons: remove non-operational incommingmsg bits Signed-off-by: Ivailo Monev --- .../applets/incomingmsg/incomingmsg.cpp | 69 +++---------------- .../applets/incomingmsg/incomingmsg.h | 7 +- 2 files changed, 11 insertions(+), 65 deletions(-) diff --git a/kdeplasma-addons/applets/incomingmsg/incomingmsg.cpp b/kdeplasma-addons/applets/incomingmsg/incomingmsg.cpp index 5754c357..012cd934 100644 --- a/kdeplasma-addons/applets/incomingmsg/incomingmsg.cpp +++ b/kdeplasma-addons/applets/incomingmsg/incomingmsg.cpp @@ -49,17 +49,15 @@ #include IncomingMsg::IncomingMsg(QObject *parent, const QVariantList &args) - : Plasma::Applet(parent, args), - mEvolutionLabel(0), mEvolutionIconLabel(0), - mXChatLabel(0), mXChatIconLabel(0), - mKopeteLabel(0), mKopeteIconLabel(0), - mPidginLabel(0), mPidginIconLabel(0), - mQutIMLabel(0), mQutIMIconLabel(0), - mErrorLabel(0), mLayout(0), - mEvolutionLayout(0), mXChatLayout(0), - mKopeteLayout(0), mPidginLayout(0), - mQutIMLayout(0), - mQutIUnreadCount(0) + : Plasma::Applet(parent, args), + mXChatLabel(0), mXChatIconLabel(0), + mKopeteLabel(0), mKopeteIconLabel(0), + mPidginLabel(0), mPidginIconLabel(0), + mQutIMLabel(0), mQutIMIconLabel(0), + mErrorLabel(0), mLayout(0), + mXChatLayout(0), mKopeteLayout(0), + mPidginLayout(0), mQutIMLayout(0), + mQutIUnreadCount(0) { // this will get us the standard applet background, for free! setBackgroundHints(DefaultBackground); @@ -104,45 +102,6 @@ void IncomingMsg::configChanged() 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" ); -// QDBusReplyevolutionReply = 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() { /* test for the xchat dbus interface */ @@ -362,7 +321,6 @@ void IncomingMsg::initLayout() { mLayout = new QGraphicsLinearLayout(Qt::Vertical); - //initEvolutionLayout(); initXChatLayout(); initKopeteLayout(); initPidginLayout(); @@ -419,15 +377,6 @@ void IncomingMsg::configAccepted() 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() { KIcon icon("xchat"); diff --git a/kdeplasma-addons/applets/incomingmsg/incomingmsg.h b/kdeplasma-addons/applets/incomingmsg/incomingmsg.h index 6773c4d2..6fe95139 100644 --- a/kdeplasma-addons/applets/incomingmsg/incomingmsg.h +++ b/kdeplasma-addons/applets/incomingmsg/incomingmsg.h @@ -51,7 +51,6 @@ public: protected: void createConfigurationInterface(KConfigDialog *parent); - void initEvolutionLayout(); void initXChatLayout(); void initKopeteLayout(); void initPidginLayout(); @@ -69,13 +68,12 @@ private: void updateQutIMStatus(bool saveIcon); // text labels - Plasma::Label *mEvolutionLabel, *mEvolutionIconLabel, - *mXChatLabel, + Plasma::Label *mXChatLabel, *mXChatIconLabel, *mKopeteLabel, *mKopeteIconLabel, *mPidginLabel, *mPidginIconLabel, *mQutIMLabel, *mQutIMIconLabel, *mErrorLabel; - QGraphicsLinearLayout *mLayout, *mEvolutionLayout, + QGraphicsLinearLayout *mLayout, *mXChatLayout, *mKopeteLayout, *mPidginLayout, *mQutIMLayout; @@ -87,7 +85,6 @@ private: Ui::incomingmsgConfig ui; private slots: - void slotNewEvolutionMail(); void slotNewPidginIM(); void slotNewKopeteIM(const QString&); void slotNewXChatIM();