<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/115282/">https://git.reviewboard.kde.org/r/115282/</a>
</td>
</tr>
</table>
<br />
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<p style="margin-top: 0;">On January 24th, 2014, 10:18 a.m. UTC, <b>David Edmundson</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<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/115282/diff/1/?file=235593#file235593line264" style="color: black; font-weight: bold; text-decoration: underline;">telepathy-mpris.cpp</a>
<span style="font-weight: normal;">
(Diff revision 1)
</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 TelepathyMPRIS::setTrackToPresence()</pre></td>
</tr>
</tbody>
<tbody>
<tr>
<th bgcolor="#e9eaa8" style="border-right: 1px solid #C0C0C0;" align="right"><font size="2">264</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">Tp</span><span class="o">::</span><span class="n">Presence</span> <span class="n">requestedPresence</span> <span class="o">=</span> <span class="n">m_globalPresence</span><span class="o">-></span><span class="n"><span class="hl">requested</span>Presence</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">264</font></th>
<td bgcolor="#fdfebc" width="50%"><pre style="font-size: 8pt; line-height: 140%; margin: 0; "> <span class="n">Tp</span><span class="o">::</span><span class="n">Presence</span> <span class="n">requestedPresence</span> <span class="o">=</span> <span class="n">m_globalPresence</span><span class="o">-></span><span class="n"><span class="hl">current</span>Presence</span><span class="p">();</span></pre></td>
</tr>
</tbody>
</table>
<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 think this will cause problems.
If you set yourself to Invisible and have a local-xmpp account which doesn't support invisible. When you listen to a track it will now move all your accounts "Away".
Could you explain the problem we're trying to solve?</pre>
</blockquote>
<p>On January 25th, 2014, 3:15 a.m. UTC, <b>James Smith</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">#114569 exposed an issue where the status will noticeably flicker in ktp-plasma-applet when the status is set by the AutoAway plugin (from Available state) and subsequent track changes in MPRIS2 change the status without updating the away message, which is set in AutoAway and takes precedence. The status will quickly switch back to Away from Available, returning the Away status message instead of the MPRIS2 status message (and associated Available state).
So, don't even bother updating the MPRIS2 status and message.</pre>
</blockquote>
<p>On January 26th, 2014, 9:16 a.m. UTC, <b>David Edmundson</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Why does it go back to available before it goes to whatever MPRIS is set to?</pre>
</blockquote>
<p>On January 26th, 2014, 9:28 a.m. UTC, <b>James Smith</b> wrote:</p>
<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">No, I don't think so. Because we're requesting what the presence is RIGHT NOW, removing the current status message and pasting a new one in and relying on the plugin priority to show a change in persistent status or not, the MC plugins shouldn't receive a status change and instead should remain at what the Ktp plugin allowed or explicitly (not persistently) set. The away KTp plugin, being higher priority, won't allow the mpris2 KTp plugin to maintain a changed status or changed status message.
requestedPresence() should (will) return only what the global presence was requested to be set at, not what currentPresence() reported the global presence to actually be (plugins are taken into account by requestedPresence()).
The jump to global Available was caused by requestedPresence() reporting the user-set presence, not the plugin-priority forced Away presence. The mpris2 status message was ignored (properly) by the plugin ordering; however the status flickered while mpris2 KTp plugin set the requested user presence, changed the status message, and then returned (only to have the Away KTp plugin re-take control over global status based on its timer, which caused a reset to away hopefully before anybody noticed what happened by KTp mpris2.)
I don't know if anyone would need mpris2 status messages while the machine is autoway or on screensaver away? Probably bad netiquette.</pre>
</blockquote>
</blockquote>
<pre style="margin-left: 1em; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">>The jump to global Available was caused by requestedPresence() reporting the user-set presence, not the plugin-priority forced Away presence. The mpris2 status message was ignored (properly) by the plugin ordering;
Why would it be ignored?
- user is playing music
- mpris plugin activates
- presence is [online - "Some Song"]
- user goes away
- autoaway plugin activates
- presence is [away - "I am not here right now"]
- user comes
- auto away plugin deactivates
- presence gets set to that of the mpris plugin [online - "Some song"]
I can imagine a bug in which a track change whilst away sets you to [away - "Some song"] when you come back; but this patch won't fix that, and that's not this flickering you describe.
</pre>
<br />
<p>- David</p>
<br />
<p>On January 24th, 2014, 3:43 a.m. UTC, James Smith 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 Telepathy and Xuetian Weng.</div>
<div>By James Smith.</div>
<p style="color: grey;"><i>Updated Jan. 24, 2014, 3:43 a.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
ktp-kded-module
</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;">Fixes state flicker when away plugin is active and track changes in a media player.</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;">Compile, run.</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>telepathy-mpris.cpp <span style="color: grey">(1c7b98c)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/115282/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>