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





<blockquote style="margin-left: 1em; border-left: 2px solid #d0d0d0; padding-left: 10px;">
 <p style="margin-top: 0;">On June 24th, 2012, 1:41 a.m., <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;">I think you've overcomplicated this:

Everything after currentContainment could be replaced with simply:

---
    currentContainment->setWallpaper(name, mode);
    if (!path.isEmpty()) {
        currentContainment->wallpaper()->setUrls(KUrl(path));
    }
---

if the name and mode haven't changed setWallpaper will do nothing.
if the plugin doesn't support setUrls it will do nothing, if it does - your API will work with it \o/.
Containment::setWallpaper appears to save when changing, same for setUrls on the plugin.

I tested the above and it saves and restores fine :)</pre>
 </blockquote>




 <p>On June 24th, 2012, 4:48 a.m., <b>Varun Herale</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;">When the name is "image" and mode is "Slideshow", image with path doesn't seem to be added to the slideshow. So I wasn't sure if using setUrls for all cases was a good idea. Is it okay to do that ?

As for the rest - It just didn't strike me to use setUrls after setWallpaper and that lead to over complication :P Learnt something. And will update the diff soon.</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;">No problem, it was a good first draft. The point of reviews is to iteratively make things better.

I only found out from reading through the source of Containment, Wallpaper and Image. I think calling setUrls for all cases will be fine. There's a base implementation in the wallpaper that does nothing, and then the different wallpaper plugins override it.

If the wallpaper is "image" "Slideshow" and you call setUrls() it _should_ (from the code) add it. If not, it's a bug there, and should be fixed there.</pre>
<br />








<p>- David</p>


<br />
<p>On June 22nd, 2012, 2:36 p.m., Varun Herale wrote:</p>






<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
 <tr>
  <td>

<div>Review request for Plasma.</div>
<div>By Varun Herale.</div>


<p style="color: grey;"><i>Updated June 22, 2012, 2: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 patch is for hosting a dbus-interface that can be used to load any installed wallpaper plugin onto current desktop containment. In case of default "image" plugin, the path to the image can also be sent which will change the wallpaper.  
</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;">Tested on different activities and made sure it works for per-virtual desktop containment.

Haven't tested on a system with multiple screens though, as I don't have access to one. Could someone please test for that ?</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>plasma/desktop/shell/dbus/org.kde.plasma.App.xml <span style="color: grey">(eefce32)</span></li>

 <li>plasma/desktop/shell/plasmaapp.h <span style="color: grey">(6ae0c89)</span></li>

 <li>plasma/desktop/shell/plasmaapp.cpp <span style="color: grey">(7abd8fc)</span></li>

</ul>

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




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








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