[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:06:22 UTC 2016
Gitweb-URL: http://git.debian.org/?p=pkg-kde/applications/ktp-contact-list.git;a=commitdiff;h=b225687
The following commit has been merged in the master branch:
commit b2256870d367b9c87e5e3db032dc42e838fd6feb
Author: Martin Klapetek <martin.klapetek at gmail.com>
Date: Fri May 6 15:11:49 2011 +0200
Switch error notifications to KNotification
Reviewed-by: Francesco Nwokeka
REVIEW: 101309
---
CMakeLists.txt | 1 +
main-widget.cpp | 59 +++++++-------------------------------
telepathy-kde-contactlist.notifyrc | 44 ++++++++++++++++++++++++++++
3 files changed, 55 insertions(+), 49 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b68d136..919df77 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -62,6 +62,7 @@ target_link_libraries (telepathy-kde-contactlist
install (TARGETS telepathy-kde-contactlist
DESTINATION ${BIN_INSTALL_DIR}
)
+install(FILES telepathy-kde-contactlist.notifyrc DESTINATION ${DATA_INSTALL_DIR}/telepathy-kde-contactlist)
install (PROGRAMS telepathy-kde-contactlist.desktop
DESTINATION ${XDG_APPS_INSTALL_DIR}
diff --git a/main-widget.cpp b/main-widget.cpp
index 2a00fab..bd2ce1e 100644
--- a/main-widget.cpp
+++ b/main-widget.cpp
@@ -48,6 +48,7 @@
#include <KSharedConfig>
#include <KFileDialog>
#include <KStandardShortcut>
+#include <KNotification>
#include "ui_main-widget.h"
#include "account-button.h"
@@ -62,7 +63,7 @@
#define PREFERRED_TEXTCHAT_HANDLER "org.freedesktop.Telepathy.Client.KDE.TextUi"
#define PREFERRED_FILETRANSFER_HANDLER "org.freedesktop.Telepathy.Client.KDE.FileTransfer"
-#define PREFERRED_AUDIO_VIDEO_HANDLER "org.freedesktop.Telepathy.Client.telepathy_kde_call_ui"
+#define PREFERRED_AUDIO_VIDEO_HANDLER "org.freedesktop.Telepathy.Client.KDE.CallUi"
bool kde_tp_filter_contacts_by_publication_status(const Tp::ContactPtr &contact)
{
@@ -540,56 +541,16 @@ void MainWidget::startFileTransferChannel(const QModelIndex &index)
void MainWidget::showMessageToUser(const QString& text, const MainWidget::SystemMessageType type)
{
- QFrame *msgFrame = new QFrame(m_contactsListView);
- msgFrame->setAttribute(Qt::WA_DeleteOnClose);
- msgFrame->setMinimumSize(QSize(m_contactsListView->viewport()->width(), 55));
- msgFrame->setFrameShape(QFrame::Box);
- msgFrame->setFrameShadow(QFrame::Plain);
- msgFrame->setAutoFillBackground(true);
- msgFrame->setLineWidth(1);
-
- if(type == MainWidget::SystemMessageError) {
- msgFrame->setStyleSheet("background-color: #FFCBCB; color: #FF2222;");
- }
- else if(type == MainWidget::SystemMessageInfo) {
- msgFrame->setStyleSheet("color: #2222FF;");
+ //The pointer is automatically deleted when the event is closed
+ KNotification *notification;
+ if (type == MainWidget::SystemMessageError) {
+ notification = new KNotification("telepathyError", this);
+ } else {
+ notification = new KNotification("telepathyInfo", this);
}
- QHBoxLayout *layout = new QHBoxLayout(msgFrame);
- QVBoxLayout *closeBtLayout = new QVBoxLayout(msgFrame);
-
- QLabel *message = new QLabel(text, msgFrame);
- message->setAlignment(Qt::AlignVCenter);
-
- QToolButton *closeButton = new QToolButton(msgFrame);
- closeButton->setText("x");
- closeButton->setAutoRaise(true);
- closeButton->setMaximumSize(QSize(16,16));
-
- connect(closeButton, SIGNAL(clicked(bool)), msgFrame, SLOT(close()));
-
- closeBtLayout->addWidget(closeButton);
- closeBtLayout->addStretch(-1);
-
- layout->addWidget(message);
- layout->addLayout(closeBtLayout);
-
- msgFrame->show();
-
- QPropertyAnimation *a = new QPropertyAnimation(msgFrame, "pos");
- a->setParent(msgFrame);
- a->setDuration(4000);
- a->setEasingCurve(QEasingCurve::OutExpo);
- a->setStartValue(QPointF(m_contactsListView->viewport()->pos().x(),
- m_contactsListView->viewport()->pos().y()+m_contactsListView->viewport()->height()));
-
- a->setEndValue(QPointF(m_contactsListView->viewport()->pos().x(),
- m_contactsListView->viewport()->pos().y()+m_contactsListView->viewport()->height()-50));
- a->start();
-
- if(type == MainWidget::SystemMessageInfo) {
- QTimer::singleShot(4500, msgFrame, SLOT(close()));
- }
+ notification->setText(text);
+ notification->sendEvent();
}
void MainWidget::addOverlayButtons()
diff --git a/telepathy-kde-contactlist.notifyrc b/telepathy-kde-contactlist.notifyrc
new file mode 100644
index 0000000..b339b1e
--- /dev/null
+++ b/telepathy-kde-contactlist.notifyrc
@@ -0,0 +1,44 @@
+[Global]
+IconName=dialog-error
+Name=Instant messaging
+Name[da]=Instant messaging
+Name[de]=Instant Messaging
+Name[et]=Kiirsuhtlus
+Name[nds]=Kortnarichten
+Name[nl]=Instant Messaging
+Name[pt]=Mensagem instantânea
+Name[pt_BR]=Mensagens instantâneas
+Name[sv]=Direktmeddelanden
+Name[uk]=Миттєвий обмін повідомленнями
+Name[x-test]=xxInstant messagingxx
+Comment=Instant messaging
+Comment[da]=Instant messaging
+Comment[de]=Instant Messaging
+Comment[et]=Kiirsuhtlus
+Comment[nds]=Kortnarichten
+Comment[nl]=Instant Messaging
+Comment[pt]=Mensagem instantânea
+Comment[pt_BR]=Mensagens instantâneas
+Comment[sv]=Direktmeddelanden
+Comment[uk]=Миттєвий обмін повідомленнями
+Comment[x-test]=xxInstant messagingxx
+
+[Event/telepathyError]
+Name=Instant messaging error
+Name[cs]=Chyba v instantní komunikaci
+Name[x-test]=xxInstant messaging errorxx
+Comment=An error occured within instant messaging
+Comment[cs]=Chybová zpráva instantní komunikace
+Comment[x-test]=xxAn error occured within instant messagingxx
+Sound=KDE-Im-Cant-Connect.ogg
+Action=Popup|Sound
+
+[Event/telepathyInfo]
+Name=Instant messaging info message
+Name[cs]=Informační zpráva instantní komunikace
+Name[x-test]=xxInstant messaging infoxx
+Comment=A general info message from instant messaging
+Comment[cs]=Informační zpráva instantní komunikace
+Comment[x-test]=xxA general info message from instant messagingxx
+Sound=KDE-Im-Low-Priority-Message.ogg
+Action=Popup|Sound
\ No newline at end of file
--
ktp-contact-list packaging
More information about the pkg-kde-commits
mailing list