[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-frameworks-devel
Subject: Re: Review Request 115695: Rework KNotification to work without KNotify daemon
From: "Aleix Pol Gonzalez" <aleixpol () kde ! org>
Date: 2014-02-19 10:05:59
Message-ID: 20140219100559.12529.29594 () probe ! kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/alternative)]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/115695/#review50197
-----------------------------------------------------------
src/knotification.cpp
<https://git.reviewboard.kde.org/r/115695/#comment35297>
remove qDebugs?
src/knotification.cpp
<https://git.reviewboard.kde.org/r/115695/#comment35298>
Improve message and make qWarning?
src/knotification.cpp
<https://git.reviewboard.kde.org/r/115695/#comment35299>
Needed?
src/knotificationmanager.cpp
<https://git.reviewboard.kde.org/r/115695/#comment35300>
This will be done in the future? Maybe it would be better to commit when there \
are no regressions?
src/knotificationmanager.cpp
<https://git.reviewboard.kde.org/r/115695/#comment35301>
qWarning?
src/knotificationmanager.cpp
<https://git.reviewboard.kde.org/r/115695/#comment35302>
?
src/notifybypopupgrowl.h
<https://git.reviewboard.kde.org/r/115695/#comment35303>
Is growl still the thing for MacOS X?
I'm sorry I cannot give better insight about the moving the daemon here. It makes \
sense to me, but I have no idea why it used to be this way.
- Aleix Pol Gonzalez
On Feb. 13, 2014, 10:14 a.m., Martin Klapetek wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/115695/
> -----------------------------------------------------------
>
> (Updated Feb. 13, 2014, 10:14 a.m.)
>
>
> Review request for kde-workspace, KDE Frameworks, Plasma, and Sune Vuorela.
>
>
> Repository: knotifications
>
>
> Description
> -------
>
> This patch merges KNotify daemon into KNotificationManager to have less daemons \
> running and less dbus traffic. The patch is not yet finished (and for now it's full \
> of QDebugs, that will all be removed and FIXMEs to indicate what needs doing), but \
> as the Alpha2 is quite soon, I'd like to start the general review asap so some more \
> changes can be done if needed.
> Now it's KNotificationManager that handles the KNotifyPlugin-s and hands them the \
> notification directly. KNotifyConfig was repurposed a bit, now it serves mostly \
> just as the .notifyrc wrapper, all the rest is reused from the KNotification \
> object. There are some changes in the KNotification API - id() and appName() are \
> now exposed to public and "slotReceivedId(int)" is now also public so that \
> KNotificationManager can directly give it an id. I'd like to rename this and make \
> it a non-slot. It's not the DBus/Galago server ID anymore, that is handled in \
> NotifyByPopup which is responsible for communicating with the galago server (all \
> the methods there were renamed to actually have *galago* in the name so it's \
> clear), therefore the mapping of DBus/Galago Server ids is managed only there as it \
> is actually only needed here. KNotitification::id() is assigned by the \
> KNotificationManager and it's a simple increasing counter.
> The UI/Plasmoid changes will come next - basically the plan is to put only the \
> "Persistent" notifications in the notifications history.
>
> Diffs
> -----
>
> src/knotifyconfig.h PRE-CREATION
> src/knotifyconfig.cpp PRE-CREATION
> src/knotifyplugin.h PRE-CREATION
> src/knotifyplugin.cpp PRE-CREATION
> src/notifybypopup.h PRE-CREATION
> src/notifybypopup.cpp PRE-CREATION
> src/notifybypopupgrowl.h PRE-CREATION
> src/notifybypopupgrowl.cpp PRE-CREATION
> CMakeLists.txt 63ebf71
> src/CMakeLists.txt a81b913
> src/knotification.h 00554ba
> src/knotification.cpp 5d7405b
> src/knotificationmanager.cpp a4d0dfa
> src/knotificationmanager_p.h 81d962d
>
> Diff: https://git.reviewboard.kde.org/r/115695/diff/
>
>
> Testing
> -------
>
> Works perfectly with both plasma notifications and kpassivepopup.
>
>
> Thanks,
>
> Martin Klapetek
>
>
[Attachment #5 (text/html)]
<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 \
solid;"> <tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/115695/">https://git.reviewboard.kde.org/r/115695/</a>
</td>
</tr>
</table>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;"> <thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;"> <a \
href="https://git.reviewboard.kde.org/r/115695/diff/3/?file=243840#file243840line333" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/knotification.cpp</a> <span style="font-weight: normal;">
(Diff revision 3)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
">KNotification *KNotification::event(StandardEvent eventid, const QString \
&text,</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">333</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="n">qDebug</span><span class="p">()</span> <span class="o"><<</span> \
<span class="n">id</span><span class="p">()</span> <span class="o"><<</span> \
<span class="s">"ref++ -->"</span> <span class="o"><<</span> <span \
class="n">d</span><span class="o">-></span><span class="n">ref</span><span \
class="p">;</span></pre></td> </tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">remove \
qDebugs?</pre> </div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;"> <thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;"> <a \
href="https://git.reviewboard.kde.org/r/115695/diff/3/?file=243840#file243840line354" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/knotification.cpp</a> <span style="font-weight: normal;">
(Diff revision 3)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void \
KNotification::beep(const QString &reason, QWidget *widget)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2">350</font></th> <td bgcolor="#fdfebc" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="n">QString</span> <span class="n">appname</span><span \
class="p">;</span></pre></td> <th bgcolor="#e9eaa8" style="border-left: 1px solid \
#C0C0C0; border-right: 1px solid #C0C0C0;" align="right"><font \
size="2">354</font></th> <td bgcolor="#fdfebc" width="50%"><pre style="font-size: \
8pt; line-height: 140%; margin: 0; "> <span class="n">qDebug</span><span \
class="p">()</span> <span class="o"><<</span> <span class="s">"No id yet, \
calling notify on manager"</span><span class="p">;</span></pre></td> </tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Improve \
message and make qWarning?</pre> </div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;"> <thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;"> <a \
href="https://git.reviewboard.kde.org/r/115695/diff/3/?file=243840#file243840line397" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/knotification.cpp</a> <span style="font-weight: normal;">
(Diff revision 3)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; ">void \
KNotification::beep(const QString &reason, QWidget *widget)</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">388</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="n">qDebug</span><span class="p">()</span> <span class="o"><<</span> \
<span class="s">"Received new id:"</span> <span class="o"><<</span> \
<span class="n">id</span><span class="p">;</span></pre></td> </tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Needed?</pre> </div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;"> <thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;"> <a \
href="https://git.reviewboard.kde.org/r/115695/diff/3/?file=243841#file243841line66" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/knotificationmanager.cpp</a> <span style="font-weight: normal;">
(Diff revision 3)
</span>
</th>
</tr>
</thead>
<tbody style="background-color: #e4d9cb; padding: 4px 8px; text-align: center;">
<tr>
<td colspan="4"><pre style="font-size: 8pt; line-height: 140%; margin: 0; \
">KNotificationManager *KNotificationManager::self()</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">66</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="c1">// addPlugin(new NotifyBySound(this));</span></pre></td> </tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">This will \
be done in the future? Maybe it would be better to commit when there are no \
regressions?</pre> </div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;"> <thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;"> <a \
href="https://git.reviewboard.kde.org/r/115695/diff/3/?file=243841#file243841line112" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/knotificationmanager.cpp</a> <span style="font-weight: normal;">
(Diff revision 3)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">105</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span \
class="n">qDebug</span><span class="p">()</span> <span class="o"><<</span> \
<span class="s">"Cannot find"</span> <span class="o"><<</span> <span \
class="n">notification</span><span class="o">-></span><span \
class="n">id</span><span class="p">();</span></pre></td> </tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">qWarning?</pre> </div>
<br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;"> <thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;"> <a \
href="https://git.reviewboard.kde.org/r/115695/diff/3/?file=243841#file243841line180" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/knotificationmanager.cpp</a> <span style="font-weight: normal;">
(Diff revision 3)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">168</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="c1">//</span></pre></td> </tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">?</pre> \
</div> <br />
<div>
<table width="100%" border="0" bgcolor="white" style="border: 1px solid #C0C0C0; \
border-collapse: collapse; margin: 2px padding: 2px;"> <thead>
<tr>
<th colspan="4" bgcolor="#F0F0F0" style="border-bottom: 1px solid #C0C0C0; \
font-size: 9pt; padding: 4px 8px; text-align: left;"> <a \
href="https://git.reviewboard.kde.org/r/115695/diff/3/?file=243849#file243849line37" \
style="color: black; font-weight: bold; text-decoration: \
underline;">src/notifybypopupgrowl.h</a> <span style="font-weight: normal;">
(Diff revision 3)
</span>
</th>
</tr>
</thead>
<tbody>
<tr>
<th bgcolor="#b1ebb0" style="border-right: 1px solid #C0C0C0;" \
align="right"><font size="2"></font></th> <td bgcolor="#c5ffc4" width="50%"><pre \
style="font-size: 8pt; line-height: 140%; margin: 0; "></pre></td> <th \
bgcolor="#b1ebb0" style="border-left: 1px solid #C0C0C0; border-right: 1px solid \
#C0C0C0;" align="right"><font size="2">37</font></th> <td bgcolor="#c5ffc4" \
width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "><span \
class="n">class</span> <span class="n">NotifyByPopupGrowl</span></pre></td> </tr>
</tbody>
</table>
<pre style="margin-left: 2em; white-space: pre-wrap; white-space: -moz-pre-wrap; \
white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Is growl \
still the thing for MacOS X?</pre> </div>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">I'm sorry I cannot \
give better insight about the moving the daemon here. It makes sense to me, but I \
have no idea why it used to be this way.</pre>
<p>- Aleix Pol Gonzalez</p>
<br />
<p>On February 13th, 2014, 10:14 a.m. UTC, Martin Klapetek wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for kde-workspace, KDE Frameworks, Plasma, and Sune \
Vuorela.</div> <div>By Martin Klapetek.</div>
<p style="color: grey;"><i>Updated Feb. 13, 2014, 10:14 a.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
knotifications
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" \
style="border: 1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">This patch merges KNotify daemon into KNotificationManager to have less \
daemons running and less dbus traffic. The patch is not yet finished (and for now \
it's full of QDebugs, that will all be removed and FIXMEs to indicate what needs \
doing), but as the Alpha2 is quite soon, I'd like to start the general review \
asap so some more changes can be done if needed.
Now it's KNotificationManager that handles the KNotifyPlugin-s and hands them the \
notification directly. KNotifyConfig was repurposed a bit, now it serves mostly just \
as the .notifyrc wrapper, all the rest is reused from the KNotification object. There \
are some changes in the KNotification API - id() and appName() are now exposed to \
public and "slotReceivedId(int)" is now also public so that \
KNotificationManager can directly give it an id. I'd like to rename this and make \
it a non-slot. It's not the DBus/Galago server ID anymore, that is handled in \
NotifyByPopup which is responsible for communicating with the galago server (all the \
methods there were renamed to actually have *galago* in the name so it's clear), \
therefore the mapping of DBus/Galago Server ids is managed only there as it is \
actually only needed here. KNotitification::id() is assigned by the \
KNotificationManager and it's a simple increasing counter.
The UI/Plasmoid changes will come next - basically the plan is to put only the \
"Persistent" notifications in the notifications history.</pre> </td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: \
1px solid #b8b5a0"> <tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: \
-moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: \
break-word;">Works perfectly with both plasma notifications and kpassivepopup.</pre> \
</td> </tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>src/knotifyconfig.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/knotifyconfig.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/knotifyplugin.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/knotifyplugin.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/notifybypopup.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/notifybypopup.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/notifybypopupgrowl.h <span style="color: grey">(PRE-CREATION)</span></li>
<li>src/notifybypopupgrowl.cpp <span style="color: grey">(PRE-CREATION)</span></li>
<li>CMakeLists.txt <span style="color: grey">(63ebf71)</span></li>
<li>src/CMakeLists.txt <span style="color: grey">(a81b913)</span></li>
<li>src/knotification.h <span style="color: grey">(00554ba)</span></li>
<li>src/knotification.cpp <span style="color: grey">(5d7405b)</span></li>
<li>src/knotificationmanager.cpp <span style="color: grey">(a4d0dfa)</span></li>
<li>src/knotificationmanager_p.h <span style="color: grey">(81d962d)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/115695/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
_______________________________________________
Kde-frameworks-devel mailing list
Kde-frameworks-devel@kde.org
https://mail.kde.org/mailman/listinfo/kde-frameworks-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic