[SCM] ktp-contact-runner packaging branch, master, updated. debian/15.12.1-2-244-g38a1f58
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 17:50:23 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-runner.git;a=commitdiff;h=14ce401
The following commit has been merged in the master branch:
commit 14ce401cba6fa81a46541701d13c3159440e6de3
Author: Dan Vrátil <dan at progdan.cz>
Date: Sun Mar 11 04:08:52 2012 +0100
Initial working version
---
.gitignore | 3 +
CMakeLists.txt | 28 +++--
cmake/modules/COPYING-CMAKE-SCRIPTS | 22 ++++
cmake/modules/FindKTp.cmake | 38 +++++++
contactrunner.cpp | 212 ++++++++++++++++++++++++++++++++++++
contactrunner.h | 57 ++++++++++
ktp-contact-runner.cpp | 33 ------
ktp-contact-runner.desktop | 104 ------------------
ktp-contact-runner.h | 23 ----
plasma-runner-ktp-contact.desktop | 14 +++
runner.png | Bin 15845 -> 0 bytes
11 files changed, 367 insertions(+), 167 deletions(-)
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..5ff87c2
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,3 @@
+*.kdev4
+*~
+build
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d29dce0..6dfb858 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,26 +1,40 @@
-project(plasma-ktp-contact-runner)
+project(KTPContactRunner)
+
+set(IS_KTP_INTERNAL_MODULE TRUE)
+
+set(CMAKE_MODULE_PATH
+ ${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules
+ ${CMAKE_MODULE_PATH})
# Find the required Libaries
find_package(KDE4 REQUIRED)
+find_package(TelepathyQt4 REQUIRED)
+find_package(KTp REQUIRED)
include(KDE4Defaults)
+
add_definitions (${QT_DEFINITIONS} ${KDE4_DEFINITIONS})
include_directories(
${CMAKE_SOURCE_DIR}
${CMAKE_BINARY_DIR}
${KDE4_INCLUDES}
+ ${TELEPATHY_QT4_INCLUDE_DIR}
+ ${KTP_INCLUDE_DIR}
)
# We add our source code here
-set(ktp-contact-runner_SRCS ktp-contact-runner.cpp)
+set(runner_SRCS contactrunner.cpp)
-kde4_add_plugin(krunner_ktp-contact-runner ${ktp-contact-runner_SRCS})
-target_link_libraries(krunner_ktp-contact-runner
- ${KDE4_PLASMA_LIBS} ${KDE4_KDEUI_LIBS})
+kde4_add_plugin(krunner_ktp_contacts ${runner_SRCS})
+target_link_libraries(krunner_ktp_contacts
+ ${KDE4_PLASMA_LIBS}
+ ${KDE4_KDEUI_LIBS}
+ ${TELEPATHY_QT4_LIBRARIES}
+ ${KTP_MODELS_LIBRARIES})
-install(TARGETS krunner_ktp-contact-runner
+install(TARGETS krunner_ktp_contacts
DESTINATION ${PLUGIN_INSTALL_DIR})
-install(FILES ktp-contact-runner.desktop
+install(FILES plasma-runner-ktp-contact.desktop
DESTINATION ${SERVICES_INSTALL_DIR})
diff --git a/cmake/modules/COPYING-CMAKE-SCRIPTS b/cmake/modules/COPYING-CMAKE-SCRIPTS
new file mode 100644
index 0000000..4b41776
--- /dev/null
+++ b/cmake/modules/COPYING-CMAKE-SCRIPTS
@@ -0,0 +1,22 @@
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions
+are met:
+
+1. Redistributions of source code must retain the copyright
+ notice, this list of conditions and the following disclaimer.
+2. Redistributions in binary form must reproduce the copyright
+ notice, this list of conditions and the following disclaimer in the
+ documentation and/or other materials provided with the distribution.
+3. The name of the author may not be used to endorse or promote products
+ derived from this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
diff --git a/cmake/modules/FindKTp.cmake b/cmake/modules/FindKTp.cmake
new file mode 100644
index 0000000..8facd12
--- /dev/null
+++ b/cmake/modules/FindKTp.cmake
@@ -0,0 +1,38 @@
+# Try to find the KTp library
+# KTP_FOUND
+# KTP_INCLUDE_DIR
+# KTP_LIBRARIES
+# KTP_MODELS_LIBRARIES
+# KTP_WIDGETS_LIBRARIES
+
+# Copyright (c) 2011, Dario Freddi <drf at kde.org>
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
+
+if (NOT IS_KTP_INTERNAL_MODULE)
+ message (FATAL_ERROR "KTp can be used just from internal components at this time")
+endif (NOT IS_KTP_INTERNAL_MODULE)
+
+SET (KTP_FIND_REQUIRED ${KTp_FIND_REQUIRED})
+if (KTP_INCLUDE_DIRS AND KTP_LIBRARIES)
+ # Already in cache, be silent
+ set(KTP_FIND_QUIETLY TRUE)
+endif (KTP_INCLUDE_DIRS AND KTP_LIBRARIES)
+
+find_path(KTP_INCLUDE_DIR
+ NAMES KTp/presence.h
+ PATHS ${KDE4_INCLUDE_DIR}
+)
+
+find_library(KTP_LIBRARIES NAMES ktpcommoninternalsprivate )
+find_library(KTP_MODELS_LIBRARIES NAMES ktpmodelsprivate )
+find_library(KTP_WIDGETS_LIBRARIES NAMES ktpwidgetsprivate )
+
+include(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(KTp DEFAULT_MSG
+ KTP_LIBRARIES
+ KTP_MODELS_LIBRARIES
+ KTP_INCLUDE_DIR)
+
+mark_as_advanced(KTP_INCLUDE_DIRS KTP_LIBRARIES)
diff --git a/contactrunner.cpp b/contactrunner.cpp
new file mode 100644
index 0000000..fe56cb1
--- /dev/null
+++ b/contactrunner.cpp
@@ -0,0 +1,212 @@
+/*
+ Copyright (C) 2012 Dan Vratil <dan at progdan.cz>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "contactrunner.h"
+
+#include <KDebug>
+#include <KIcon>
+#include <TelepathyQt/ContactManager>
+#include <TelepathyQt/Contact>
+#include <TelepathyQt/AvatarData>
+#include <TelepathyQt/Connection>
+#include <TelepathyQt/ConnectionManager>
+#include <TelepathyQt/AccountManager>
+#include <TelepathyQt/AccountFactory>
+#include <TelepathyQt/PendingOperation>
+#include <TelepathyQt/PendingReady>
+#include <TelepathyQt/Types>
+#include <TelepathyQt/Constants>
+
+#include <KTp/Models/accounts-model-item.h>
+#include <KTp/Models/contact-model-item.h>
+
+ContactRunner::ContactRunner(QObject* parent, const QVariantList& args):
+ Plasma::AbstractRunner(parent, args),
+ m_accountsModel(0),
+ m_proxyModel(0)
+{
+ Q_UNUSED(args);
+
+ setObjectName("IM Contacts Runner");
+
+ addSyntax(Plasma::RunnerSyntax(":q:", i18n("Finds all IM contacts matching :q:.")));
+
+ Tp::registerTypes();
+
+ Tp::AccountFactoryPtr accountFactory = Tp::AccountFactory::create(
+ QDBusConnection::sessionBus(),
+ Tp::Features() << Tp::Account::FeatureCore
+ << Tp::Account::FeatureAvatar
+ << Tp::Account::FeatureCapabilities
+ << Tp::Account::FeatureProtocolInfo
+ << Tp::Account::FeatureProfile);
+
+ Tp::ConnectionFactoryPtr connectionFactory = Tp::ConnectionFactory::create(
+ QDBusConnection::sessionBus(),
+ Tp::Features() << Tp::Connection::FeatureCore
+ << Tp::Connection::FeatureRosterGroups
+ << Tp::Connection::FeatureRoster
+ << Tp::Connection::FeatureSelfContact);
+
+ Tp::ContactFactoryPtr contactFactory = Tp::ContactFactory::create(
+ Tp::Features() << Tp::Contact::FeatureAlias
+ << Tp::Contact::FeatureAvatarData
+ << Tp::Contact::FeatureSimplePresence
+ << Tp::Contact::FeatureCapabilities);
+
+ Tp::ChannelFactoryPtr channelFactory = Tp::ChannelFactory::create(QDBusConnection::sessionBus());
+
+ m_accountManager = Tp::AccountManager::create(accountFactory, connectionFactory, channelFactory, contactFactory);
+ connect(m_accountManager->becomeReady(Tp::AccountManager::FeatureCore),
+ SIGNAL(finished(Tp::PendingOperation*)),
+ this, SLOT(accountManagerReady(Tp::PendingOperation*)));
+}
+
+ContactRunner::~ContactRunner()
+{
+ delete m_accountsModel;
+}
+
+void ContactRunner::accountManagerReady(Tp::PendingOperation* operation)
+{
+ if (operation->isError()) {
+ kWarning() << operation->errorMessage();
+ return;
+ }
+
+ kDebug() << "Accounts manager is ready!";
+
+ m_accountsModel = new AccountsModel(this);
+ m_accountsModel->setAccountManager(m_accountManager);
+
+ m_proxyModel = new AccountsFilterModel(this);
+ m_proxyModel->setSourceModel(m_accountsModel);
+ m_proxyModel->setSortMode(AccountsFilterModel::DoNotSort);
+ m_proxyModel->setFilterKeyColumn(0);
+ m_proxyModel->setDisplayNameFilterMatchFlags(Qt::MatchContains | Qt::MatchRecursive);
+ m_proxyModel->setPresenceTypeFilterFlags(AccountsFilterModel::ShowAll);
+}
+
+
+void ContactRunner::match(Plasma::RunnerContext& context)
+{
+ const QString term = context.query();
+ if ((term.length() < 3) || !context.isValid()) {
+ return;
+ }
+
+ if (!m_accountsModel || !m_proxyModel || !m_accountManager->isReady())
+ return;
+
+ m_proxyModel->setDisplayNameFilterString(term);
+
+ int accountsCnt = m_proxyModel->rowCount();
+ kDebug() << "Matching result in" << accountsCnt <<"accounts";
+ for (int i = 0; (i < accountsCnt) && context.isValid(); i++) {
+
+ QModelIndex accountIndex = m_proxyModel->index(i, 0);
+
+ int contactsCount = m_proxyModel->rowCount(accountIndex);
+ kDebug() << "Matching results in" << accountIndex.data(AccountsModel::DisplayNameRole).toString() << ":" << contactsCount;
+
+ for (int j = 0; (j < contactsCount) && context.isValid(); j++) {
+
+ QModelIndex contactIndex = m_proxyModel->index(j, 0, accountIndex);
+
+ QString name = contactIndex.data(AccountsModel::AliasRole).toString();
+
+ Plasma::QueryMatch match(this);
+
+ match.setText(name.append(" (%1)").arg(accountIndex.data(AccountsModel::DisplayNameRole).toString()));
+ match.setId(accountIndex.data(AccountsModel::IdRole).toString() + "," +
+ contactIndex.data(AccountsModel::IdRole).toString());
+ match.setType(Plasma::QueryMatch::ExactMatch);
+
+ QString iconFile = contactIndex.data(AccountsModel::AvatarRole).toString();
+ if (QFile::exists(iconFile)) {
+ match.setIcon(QIcon(iconFile));
+ } else {
+ QString iconName;
+
+ switch (contactIndex.data(AccountsModel::PresenceTypeRole).toInt()) {
+ case Tp::ConnectionPresenceTypeAvailable:
+ iconName = "im-user";
+ break;
+ case Tp::ConnectionPresenceTypeBusy:
+ iconName = "im-busy";
+ break;
+ case Tp::ConnectionPresenceTypeAway:
+ case Tp::ConnectionPresenceTypeExtendedAway:
+ iconName = "im-away";
+ break;
+ case Tp::ConnectionPresenceTypeHidden:
+ case Tp::ConnectionPresenceTypeOffline:
+ iconName = "im-offline";
+ break;
+ default:
+ iconName = "im-offline";
+ }
+ match.setIcon(QIcon::fromTheme("im-user"));
+ }
+
+ QString status = contactIndex.data(AccountsModel::PresenceStatusRole).toString();
+ QString statusMessage = contactIndex.data(AccountsModel::PresenceMessageRole).toString();
+
+ if (status.isEmpty() && !statusMessage.isEmpty())
+ match.setSubtext(statusMessage);
+ else if (!status.isEmpty() && !statusMessage.isEmpty())
+ match.setSubtext(status.replace(0, 1, status.left(1).toUpper()) + " | " + statusMessage);
+ else if (!status.isEmpty() && statusMessage.isEmpty())
+ match.setSubtext(status.replace(0, 1, status.left(1).toUpper()));
+
+ context.addMatch(term, match);
+ }
+ }
+}
+
+void ContactRunner::run(const Plasma::RunnerContext& context, const Plasma::QueryMatch& match)
+{
+ /* Remove the ID prefix added by Krunner */
+ QString id = match.id().remove("KRunnerKTPContacts_");
+
+ QStringList ids = id.split(",", QString::SkipEmptyParts);
+ if (ids.count() != 2) {
+ kWarning() << "Received invalid ID" << ids;
+ return;
+ }
+
+ AccountsModelItem *accountItem = qobject_cast< AccountsModelItem* >(m_accountsModel->accountItemForId(ids.first()));
+ if (!accountItem) {
+ kWarning() << "Account" << ids.first() << "not found in the model!";
+ return;
+ }
+
+ ContactModelItem *item = qobject_cast< ContactModelItem* >(m_accountsModel->contactItemForId(ids.first(), ids.at(1)));
+ if (!item) {
+ kWarning() << "Item" << match.id() << "not found in the model!";
+ return;
+ }
+
+ Tp::AccountPtr account = accountItem->account();
+ Tp::ContactPtr contact = item->contact();
+
+ Tp::ChannelRequestHints hints;
+ hints.setHint("org.freedesktop.Telepathy.ChannelRequest","DelegateToPreferredHandler", QVariant(true));
+ account->ensureTextChat(contact, QDateTime::currentDateTime(), "org.freedesktop.Telepathy.Client.KDE.TextUi", hints);
+}
+
+#include "contactrunner.moc"
diff --git a/contactrunner.h b/contactrunner.h
new file mode 100644
index 0000000..fdd7497
--- /dev/null
+++ b/contactrunner.h
@@ -0,0 +1,57 @@
+/*
+ Copyright (C) 2012 Dan Vratil <dan at progdan.cz>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef KTPCONTACTRUNNER_H
+#define KTPCONTACTRUNNER_H
+
+#include <Plasma/AbstractRunner>
+#include <KIcon>
+
+#include <KTp/Models/accounts-model.h>
+#include <KTp/Models/accounts-filter-model.h>
+#include <KTp/Models/groups-model.h>
+#include <KTp/Models/flat-model-proxy.h>
+#include <TelepathyQt/AccountManager>
+
+namespace Tp {
+ class PendingOperation;
+}
+
+class ContactRunner : public Plasma::AbstractRunner
+{
+ Q_OBJECT
+
+ public:
+ ContactRunner( QObject *parent, const QVariantList& args );
+ ~ContactRunner();
+
+ void match(Plasma::RunnerContext &context);
+ void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match);
+
+ private Q_SLOTS:
+ void accountManagerReady(Tp::PendingOperation *operation);
+
+ private:
+ AccountsModel *m_accountsModel;
+ FlatModelProxy *m_flatModelProxy;
+ AccountsFilterModel *m_proxyModel;
+ Tp::AccountManagerPtr m_accountManager;
+};
+
+K_EXPORT_PLASMA_RUNNER(KRunnerKTPContacts, ContactRunner)
+
+#endif /* KTPCONTACTRUNNER_H */
diff --git a/ktp-contact-runner.cpp b/ktp-contact-runner.cpp
deleted file mode 100644
index 6857216..0000000
--- a/ktp-contact-runner.cpp
+++ /dev/null
@@ -1,33 +0,0 @@
-#include "ktp-contact-runner.h"
-
-#include <KDebug>
-#include <KIcon>
-
-ktp-contact-runner::ktp-contact-runner(QObject *parent, const QVariantList& args)
- : Plasma::AbstractRunner(parent, args)
-{
- Q_UNUSED(args);
- setObjectName("ktp-contact-runner");
-}
-
-ktp-contact-runner::~ktp-contact-runner()
-{
-}
-
-
-void ktp-contact-runner::match(Plasma::RunnerContext &context)
-{
-
- const QString term = context.query();
- if (term.length() < 3) {
- return;
- }
- //TODO
-}
-
-void ktp-contact-runner::run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match)
-{
- Q_UNUSED(context)
-}
-
-#include "ktp-contact-runner.moc"
diff --git a/ktp-contact-runner.desktop b/ktp-contact-runner.desktop
deleted file mode 100644
index 6d0e4c3..0000000
--- a/ktp-contact-runner.desktop
+++ /dev/null
@@ -1,104 +0,0 @@
-[Desktop Entry]
-Name=ktp-contact-runner
-Name[ast]=ktp-contact-runner
-Name[bg]=ktp-contact-runner
-Name[bs]=ktp-contact-runner
-Name[ca]=ktp-contact-runner
-Name[ca at valencia]=ktp-contact-runner
-Name[cs]=ktp-contact-runner
-Name[da]=ktp-contact-runner
-Name[de]=ktp-contact-runner
-Name[el]=ktp-contact-runner
-Name[en_GB]=ktp-contact-runner
-Name[eo]=ktp-contact-runner
-Name[es]=ktp-contact-runner
-Name[et]=ktp-contact-runner
-Name[fi]=ktp-contact-runner
-Name[fr]=ktp-contact-runner
-Name[ga]=ktp-contact-runner
-Name[gl]=ktp-contact-runner
-Name[hu]=ktp-contact-runner
-Name[it]=ktp-contact-runner
-Name[ja]=ktp-contact-runner
-Name[kk]=ktp-contact-runner
-Name[km]=ktp-contact-runner
-Name[ko]=ktp-contact-runner
-Name[lv]=ktp-contact-runner
-Name[nb]=ktp-contact-runner
-Name[nds]=ktp-contact-runner
-Name[nl]=ktp-contact-runner
-Name[nn]=ktp-contact-runner
-Name[pa]=ktp-contact-runner
-Name[pl]=ktp-contact-runner
-Name[pt]=ktp-contact-runner
-Name[pt_BR]=ktp-contact-runner
-Name[ro]=ktp-contact-runner
-Name[ru]=ktp-contact-runner
-Name[sk]=ktp-contact-runner
-Name[sq]=ktp-contact-runner
-Name[sr]=ktp-contact-runner
-Name[sr at ijekavian]=ktp-contact-runner
-Name[sr at ijekavianlatin]=ktp-contact-runner
-Name[sr at latin]=ktp-contact-runner
-Name[sv]=ktp-contact-runner
-Name[tr]=ktp-contact-runner
-Name[ug]=ktp-contact-runner
-Name[uk]=ktp-contact-runner
-Name[x-test]=xxktp-contact-runnerxx
-Name[zh_CN]=ktp-contact-runner
-Name[zh_TW]=ktp-contact-runner
-Comment=ktp-contact-runner runner
-Comment[ast]=Llanzador pa ktp-contact-runner
-Comment[bs]=ktp-contact-runner izvršilac
-Comment[ca]=Llançador de ktp-contact-runner
-Comment[ca at valencia]=Llançador de ktp-contact-runner
-Comment[cs]=ktp-contact-runner runner
-Comment[da]=ktp-contact-runner-runner
-Comment[el]=εκτελεστής ktp-contact-runner
-Comment[en_GB]=ktp-contact-runner runner
-Comment[es]=Lanzador para ktp-contact-runner
-Comment[et]=ktp-contact-runner käivitaja
-Comment[fi]=ktp-contact-runner-suoritusohjelma
-Comment[fr]=Lanceur ktp-contact-runner
-Comment[ga]=Feidhmitheoir ktp-contact-runner
-Comment[gl]=Executor ktp-contact-runner
-Comment[hu]=ktp-contact-runner-futtató
-Comment[it]=Esecutore di ktp-contact-runner
-Comment[ja]=ktp-contact-runner runner
-Comment[kk]=ktp-contact-runner жеккіші
-Comment[km]=កម្មវិធីរត់ ktp-contact-runner
-Comment[ko]=ktp-contact-runner 실행기
-Comment[lv]=ktp-contact-runner darbinātājs
-Comment[nb]=ktp-contact-runner-kjører
-Comment[nds]=ktp-contact-runner-Dreger
-Comment[nl]=ktp-contact-runner-starter
-Comment[nn]=ktp-contact-runner-køyrar
-Comment[pa]=ktp-contact-runner ਰਨਰ
-Comment[pl]=Uruchamianie ktp-contact-runner
-Comment[pt]=Execução do ktp-contact-runner
-Comment[pt_BR]=Execução do ktp-contact-runner
-Comment[ro]=Lansator ktp-contact-runner
-Comment[ru]=Способ запуска ktp-contact-runner
-Comment[sk]=ktp-contact-runner runner
-Comment[sq]=ktp-contact-runner runner
-Comment[sr]=ktp-contact-runner извођач
-Comment[sr at ijekavian]=ktp-contact-runner извођач
-Comment[sr at ijekavianlatin]=ktp-contact-runner izvođač
-Comment[sr at latin]=ktp-contact-runner izvođač
-Comment[sv]=Körning av ktp-contact-runner
-Comment[tr]=ktp-contact-runner çalıştırıcı
-Comment[uk]=Засіб запуску ktp-contact-runner
-Comment[x-test]=xxktp-contact-runner runnerxx
-Comment[zh_CN]=ktp-contact-runner 启动器
-Comment[zh_TW]=ktp-contact-runner 執行器
-Icon=
-
-X-KDE-ServiceTypes=Plasma/Runner
-Type=Service
-X-KDE-Library=krunner_ktp-contact-runner
-X-KDE-PluginInfo-Author=%{AUTHOR}
-X-KDE-PluginInfo-Email=%{EMAIL}
-X-KDE-PluginInfo-Name=ktp-contact-runner
-X-KDE-PluginInfo-Version=0.1
-X-KDE-PluginInfo-License=GPL
-X-KDE-PluginInfo-EnabledByDefault=true
diff --git a/ktp-contact-runner.h b/ktp-contact-runner.h
deleted file mode 100644
index b0c2cc9..0000000
--- a/ktp-contact-runner.h
+++ /dev/null
@@ -1,23 +0,0 @@
-
-#ifndef KTP-CONTACT-RUNNER_H
-#define KTP-CONTACT-RUNNER_H
-
-#include <plasma/abstractrunner.h>
-#include <KIcon>
-
-// Define our plasma Runner
-class ktp-contact-runner : public Plasma::AbstractRunner {
- Q_OBJECT
-
-public:
- // Basic Create/Destroy
- ktp-contact-runner( QObject *parent, const QVariantList& args );
- ~ktp-contact-runner();
-
- void match(Plasma::RunnerContext &context);
- void run(const Plasma::RunnerContext &context, const Plasma::QueryMatch &match);
-};
-// This is the command that links your applet to the .desktop file
-K_EXPORT_PLASMA_RUNNER(ktp-contact-runner, ktp-contact-runner)
-
-#endif
diff --git a/plasma-runner-ktp-contact.desktop b/plasma-runner-ktp-contact.desktop
new file mode 100644
index 0000000..26fe56b
--- /dev/null
+++ b/plasma-runner-ktp-contact.desktop
@@ -0,0 +1,14 @@
+[Desktop Entry]
+Name=Instant Messaging Contacts
+Comment=Start chat with any of your IM contacts
+Icon=user-online
+
+X-KDE-ServiceTypes=Plasma/Runner
+Type=Service
+X-KDE-Library=krunner_ktp_contacts
+X-KDE-PluginInfo-Author=Dan Vratil
+X-KDE-PluginInfo-Email=dan at progdan.cz
+X-KDE-PluginInfo-Name=KRunnerKTPContacts
+X-KDE-PluginInfo-Version=0.1
+X-KDE-PluginInfo-License=GPL
+X-KDE-PluginInfo-EnabledByDefault=true
diff --git a/runner.png b/runner.png
deleted file mode 100644
index ba1c4d3..0000000
Binary files a/runner.png and /dev/null differ
--
ktp-contact-runner packaging
More information about the pkg-kde-commits
mailing list