<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="http://git.reviewboard.kde.org/r/112875/">http://git.reviewboard.kde.org/r/112875/</a>
     </td>
    </tr>
   </table>
   <br />





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On September 21st, 2013, 11:08 p.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;">The bug you're linking to is marked as resolved so what are we fixing here?

There are two things that I think are going to cause problems:
 - One of the motivations for using requestedPresence was otherwise you could select something from the drop down menu and nothing would happen.

 - If I run "mc-tool request /someAccount offline". I would be marked as all offline, which is obviously not right.
I know per account presences is sort of broken regardless (I need someone to fix the KDED module) but I don't want to make it worse.


Note: Whatever you change in the presence applet, the contact applet also MUST match. 
</pre>
 </blockquote>







</blockquote>

<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 linked it here because I don't think it's the right way to do this, the real situation for that bug is quite mixed (As far as I see "click on presence applet set it to busy" is actually fixed by this: https://git.reviewboard.kde.org/r/112705/ ), but anyway, using requestedPresence as presence applet icon is not correct. For example: requested presence might be online but there is no network so it's shown as online in presence applet.

But if we don't change that code in ktp-desktop-applet, we still have a problem described in this bug: there are two account, one supports hidden presence and the other doesn't, the global current presence will be busy with current code, since busy has "higher" priority. While this patch make it if the "current" presence is equal to the "global" requested presence, this presence will have higher priority.

So there are three situations:
1 account, all with full presence support -> no problem
2 accounts, one support hidden the other is not, set presence to hidden -> global currentPresence: hidden (before this patch: busy)
1 account, doesn't support hidden, select hidden -> global currentPresence: busy (still show it as hidden doesn't make much sense here).

* If I run "mc-tool request /someAccount offline". I would be marked as all offline, which is obviously not right.
 - If there is only one account, global currentPresence will be offline before and after patch.
 - If there are two accounts, and the other is online, the global current presence will still be online since it doesn't change the global request presence.

Is your "contact applet" contact list? the contact list always used current presence in the combobox, so current situation is it doesn't match and I also want to make it match... if you mean the per contact applet in ktp-desktop-applet, it's not user controlled presence so I think it has nothing to do with this change.</pre>
<br />










<p>- Xuetian</p>


<br />
<p>On September 21st, 2013, 9:36 p.m. UTC, Xuetian Weng wrote:</p>








<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://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 Martin Klapetek.</div>
<div>By Xuetian Weng.</div>


<p style="color: grey;"><i>Updated Sept. 21, 2013, 9:36 p.m.</i></p>






<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 is related to https://bugs.kde.org/show_bug.cgi?id=302508
http://commits.kde.org/telepathy-contact-applet/3b7a541d1ef8634b336ba9bd64a70dc4cc7027c3

The presence in applet is quite inaccurate when using requestedPresence as its icon, while the problem is, if one of account doesn't support part of presence which presence should be current presence.

IMHO a better solution is to let currentPresence to be the one same as global requested presence. So no matter in what case, the presence applet can show a presence which an account actually is.

If this passes the review I'd like to revert http://commits.kde.org/telepathy-contact-applet/3b7a541d1ef8634b336ba9bd64a70dc4cc7027c3 .</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;">installed sault as the report, set to invisible, currentPresence is busy (I have another gmail account supports hidden).</pre>
  </td>
 </tr>
</table>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>


 <a href="http://bugs.kde.org/show_bug.cgi?id=302508">302508</a>


</div>


<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">

 <li>KTp/global-presence.cpp <span style="color: grey">(8e88be9)</span></li>

</ul>

<p><a href="http://git.reviewboard.kde.org/r/112875/diff/" style="margin-left: 3em;">View Diff</a></p>







  </td>
 </tr>
</table>








  </div>
 </body>
</html>