[Konversation-devel] [Bug 237544] Notifications appear empty in awesome window manager
Eike Hein
hein at kde.org
Mon May 17 04:48:44 CEST 2010
https://bugs.kde.org/show_bug.cgi?id=237544
Eike Hein <hein at kde.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |FIXED
--- Comment #4 from Eike Hein <hein kde org> 2010-05-17 04:48:42 ---
commit fa49cee5e4804387ca212b55375accb62e5e7332
Author: Eike Hein <hein at kde.org>
Date: Mon May 17 04:46:48 2010 +0200
Replace <qt> tags in our KNotification event paylods with <html> tags.
The <qt> was introduced to denote a Qt rich-text document, and used to
be necessary to make the HTML entities we substitute for the pointy
brackets around nicknames work. Using HTML entities was necessary to
avoid the nicknames getting parsed as tags and dropped as unknown. How-
ever, KNotification now forwards popup requests to freedesktop.org-
compliant frontends via D-Bus, and those frontends may not be implemen-
ted using Qt and thus can't handle the <qt> tag (an example of this is
apparently the Awesome window manager). KNotify also makes no attempt
to filter them from the payload. According to the Qt 4 documentation,
<qt> is now a synonym for <html> that is provided for backward compati-
bility. Thus, we now use <html>. This was also adviced by KNotify main-
tainer Olivier Goffart.
BUG:237544
CCMAIL:ogoffart at kde.org
diff --git a/ChangeLog b/ChangeLog
index 90b2660..1556aec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -113,6 +113,10 @@ Changes since 1.2.3:
* The frame that used to be around the main window's tab widget when
the tab bar was located either at the bottom or top position has
been removed.
+* Improved compatibility with freedesktop.org-compliant notification
+ frontends other than KDE's. Other frontends could previously show
+ empty notification message contents due to non-standard content in
+ the messages.
Changes from 1.2.2 to 1.2.3:
diff --git a/src/notificationhandler.cpp b/src/notificationhandler.cpp
index a86c709..dfef708 100644
--- a/src/notificationhandler.cpp
+++ b/src/notificationhandler.cpp
@@ -48,7 +48,7 @@ namespace Konversation
QString cleanedMessage = removeIrcMarkup(message);
QString forKNotify = Qt::escape(cleanedMessage);
- KNotification::event(QString::fromLatin1("message"),
QString("<qt><%1> %2</qt>").arg(fromNick).arg(forKNotify), QPixmap(),
m_mainWindow);
+ KNotification::event(QString::fromLatin1("message"),
QString("<html><%1> %2</html>").arg(fromNick).arg(forKNotify), QPixmap(),
m_mainWindow);
if(!Preferences::self()->trayNotifyOnlyOwnNick())
{
@@ -76,7 +76,7 @@ namespace Konversation
QString cleanedMessage = removeIrcMarkup(message);
QString forKNotify = Qt::escape(cleanedMessage);
- KNotification::event(QString::fromLatin1("nick"),
QString("<qt><%1> %2</qt>").arg(fromNick).arg(forKNotify), QPixmap(),
m_mainWindow);
+ KNotification::event(QString::fromLatin1("nick"),
QString("<html><%1> %2</html>").arg(fromNick).arg(forKNotify), QPixmap(),
m_mainWindow);
startTrayNotification(chatWin);
@@ -102,7 +102,7 @@ namespace Konversation
QString cleanedMessage = removeIrcMarkup(message);
QString forKNotify = Qt::escape(cleanedMessage);
- KNotification::event(QString::fromLatin1("queryMessage"),
QString("<qt><%1> %2</qt>").arg(fromNick).arg(forKNotify), QPixmap(),
m_mainWindow);
+ KNotification::event(QString::fromLatin1("queryMessage"),
QString("<html><%1> %2</html>").arg(fromNick).arg(forKNotify), QPixmap(),
m_mainWindow);
startTrayNotification(chatWin);
@@ -318,9 +318,9 @@ namespace Konversation
QString forKNotify = Qt::escape(cleanedMessage);
if(fromNick.isEmpty())
- KNotification::event(QString::fromLatin1("highlight"),
QString("<qt>(%1) *** %2</qt>").arg(chatWin->getName()).arg(forKNotify),
QPixmap(), m_mainWindow);
+ KNotification::event(QString::fromLatin1("highlight"),
QString("<html>(%1) *** %2</html>").arg(chatWin->getName()).arg(forKNotify),
QPixmap(), m_mainWindow);
else
- KNotification::event(QString::fromLatin1("highlight"),
QString("<qt>(%1) <%2>
%3</qt>").arg(chatWin->getName()).arg(fromNick).arg(forKNotify), QPixmap(),
m_mainWindow);
+ KNotification::event(QString::fromLatin1("highlight"),
QString("<html>(%1) <%2>
%3</html>").arg(chatWin->getName()).arg(fromNick).arg(forKNotify), QPixmap(),
m_mainWindow);
if(Preferences::self()->oSDShowOwnNick() &&
(!m_mainWindow->isActiveWindow() || (chatWin !=
m_mainWindow->getViewContainer()->getFrontView())))
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the Konversation-devel
mailing list