[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:11:19 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-list.git;a=commitdiff;h=35676b4
The following commit has been merged in the master branch:
commit 35676b455afbc0f3dddb630767a04e810eb62c84
Author: Rohan Garg <rohangarg at kubuntu.org>
Date: Wed Sep 5 16:19:21 2012 +0530
Add context menu entry to modify contact notifications
---
CMakeLists.txt | 1 +
context-menu.cpp | 14 ++++++++++++++
context-menu.h | 1 +
3 files changed, 16 insertions(+)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7cb36cf..ca90ccf 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -69,6 +69,7 @@ target_link_libraries (ktp-contactlist
${KDE4_KDEUI_LIBS}
${KDE4_KIO_LIBS}
${KDE4_KCMUTILS_LIBS}
+ ${KDE4_KNOTIFYCONFIG_LIBRARY}
)
# Install:
diff --git a/context-menu.cpp b/context-menu.cpp
index 10f3d90..9201a0d 100644
--- a/context-menu.cpp
+++ b/context-menu.cpp
@@ -27,6 +27,9 @@
#include <KToolInvocation>
#include <KInputDialog>
#include <KMessageBox>
+#include <KStandardAction>
+#include <KActionCollection>
+#include <KNotifyConfigWidget>
#include <KTp/Models/accounts-model.h>
#include <KTp/Models/contact-model-item.h>
@@ -146,6 +149,12 @@ KMenu* ContextMenu::contactContextMenu(const QModelIndex &index)
action->setEnabled(true);
}
+ menu->addSeparator();
+ action = menu->addAction(i18n("Configure notifications"));
+ action->setEnabled(true);
+ connect(action, SIGNAL(triggered()),
+ SLOT(onNotificationConfigured()));
+
// add "goto" submenu for navigating to links the contact has in presence message
// first check to see if there are any links in the contact's presence message
QStringList contactLinks;
@@ -567,3 +576,8 @@ void ContextMenu::onResendAuthorization()
connect(op, SIGNAL(finished(Tp::PendingOperation*)),
m_mainWidget, SIGNAL(genericOperationFinished(Tp::PendingOperation*)));
}
+
+void ContextMenu::onNotificationConfigured()
+{
+ KNotifyConfigWidget::configure(m_mainWidget, QLatin1String("ktelepathy"));
+}
diff --git a/context-menu.h b/context-menu.h
index 5a30c6d..481c7f4 100644
--- a/context-menu.h
+++ b/context-menu.h
@@ -62,6 +62,7 @@ private Q_SLOTS:
void onOpenLinkTriggered(QAction *action); /** triggered from custom contact menu when user clicks contact link */
void onRerequestAuthorization();
void onResendAuthorization();
+ void onNotificationConfigured();
private:
ContactListWidget *m_mainWidget;
--
ktp-contact-list packaging
More information about the pkg-kde-commits
mailing list