[SCM] ktp-contact-list packaging branch, master, updated. debian/15.12.1-2-1070-g6c56f91
Maximiliano Curia
maxy at moszumanska.debian.org
Sat May 28 00:13:49 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-list.git;a=commitdiff;h=a8bc0c9
The following commit has been merged in the master branch:
commit a8bc0c9f359db1c73b78fb97f52e4bc081edd71f
Author: David Edmundson <kde at davidedmundson.co.uk>
Date: Sun Sep 1 14:21:06 2013 +0000
Enable Merge Contact Dialog in kpeople mode
BUG: 324301
REVIEW: 112427
---
main-widget.cpp | 28 ++++++++++++++++++++++++++++
main-widget.h | 2 ++
2 files changed, 30 insertions(+)
diff --git a/main-widget.cpp b/main-widget.cpp
index e9129a7..d03fe2e 100644
--- a/main-widget.cpp
+++ b/main-widget.cpp
@@ -60,6 +60,12 @@
#include <KStandardAction>
#include <KWindowSystem>
+#ifdef HAVE_KPEOPLE
+#include <kpeople/widgets/mergedialog.h>
+#include <KPeople/PersonsModel>
+#include <KPeople/PersonsModelFeature>
+#endif
+
#include "ui_main-widget.h"
#include "account-buttons-panel.h"
#include "contact-list-application.h"
@@ -77,6 +83,7 @@ MainWidget::MainWidget(QWidget *parent)
m_settingsDialog(NULL),
m_joinChatRoom(NULL),
m_makeCall(NULL),
+ m_mergeContacts(NULL),
m_contactListTypeGroup(NULL),
m_blockedFilterGroup(NULL),
m_quitAction(NULL)
@@ -255,6 +262,19 @@ void MainWidget::onMakeCallRequested()
KToolInvocation::kdeinitExec(QLatin1String("ktp-dialout-ui"));
}
+void MainWidget::onMergeContactsDialogRequested()
+{
+#ifdef HAVE_KPEOPLE
+ KPeople::MergeDialog* mergeDialog = new KPeople::MergeDialog(this);
+ //create a new model that queries all the data otherwise we will only show IM contacts
+ KPeople::PersonsModel* model = new KPeople::PersonsModel(mergeDialog);
+ mergeDialog->setPersonsModel(model);
+ model->startQuery(KPeople::PersonsModelFeature::allFeatures());
+ mergeDialog->show();
+ mergeDialog->setAttribute(Qt::WA_DeleteOnClose);
+#endif
+}
+
void MainWidget::closeEvent(QCloseEvent* e)
{
KSharedConfigPtr config = KGlobal::config();
@@ -396,6 +416,9 @@ void MainWidget::setupGlobalMenu()
if (!KStandardDirs::findExe("ktp-dialout-ui").isEmpty()) {
contacts->addAction(m_makeCall);
}
+ if (KTp::kpeopleEnabled()) {
+ contacts->addAction(m_mergeContacts);
+ }
contacts->addAction(m_settingsDialog);
contacts->addSeparator();
contacts->addAction(m_quitAction);
@@ -457,6 +480,10 @@ void MainWidget::setupToolBar()
settingsButtonMenu->addAction(m_makeCall);
}
+ if (KTp::kpeopleEnabled()) {
+ settingsButtonMenu->addAction(m_mergeContacts);
+ }
+
settingsButtonMenu->addSeparator();
settingsButtonMenu->addMenu(helpMenu());
@@ -524,6 +551,7 @@ void MainWidget::setupActions(const KConfigGroup& guiConfigGroup)
m_joinChatRoom = createAction(i18n("Join Chat Room..."), this, SLOT(onJoinChatRoomRequested()));
m_makeCall = createAction(i18n("Make a Call..."), this, SLOT(onMakeCallRequested()));
+ m_mergeContacts = createAction(i18n("Merge Contacts..."), this, SLOT(onMergeContactsDialogRequested()));
m_addContactAction = createAction(i18n("Add New Contacts..."), this, SLOT(onAddContactRequest()), KIcon("list-add-user"));
m_searchContactAction = createAction(i18n("Find Contact"), this, SLOT(toggleSearchWidget(bool)),
guiConfigGroup.readEntry("pin_filterbar", true), KIcon("edit-find-user"));
diff --git a/main-widget.h b/main-widget.h
index 7ec22a0..8592cea 100644
--- a/main-widget.h
+++ b/main-widget.h
@@ -88,6 +88,7 @@ private Q_SLOTS:
void onUsePerAccountPresenceTriggered();
void onJoinChatRoomRequested(); /** join chat room action is triggered */
void onMakeCallRequested();
+ void onMergeContactsDialogRequested();
void onCustomContextMenuRequested(const QPoint &point);
void onGenericOperationFinished(Tp::PendingOperation *operation); /** called when a Tp::PendingOperation finishes. Used to check for errors */
@@ -107,6 +108,7 @@ private:
KAction *m_settingsDialog;
KAction *m_joinChatRoom;
KAction *m_makeCall;
+ KAction *m_mergeContacts;
QActionGroup *m_contactListTypeGroup;
QActionGroup *m_blockedFilterGroup;
--
ktp-contact-list packaging
More information about the pkg-kde-commits
mailing list