<html>
 <body>
  <div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
   <table bgcolor="#f9f3c9" width="100%" cellpadding="12" style="border: 1px #c9c399 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
    <tr>
     <td>
      This is an automatically generated e-mail. To reply, visit:
      <a href="https://git.reviewboard.kde.org/r/123676/">https://git.reviewboard.kde.org/r/123676/</a>
     </td>
    </tr>
   </table>
   <br />




<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="12" style="border: 1px #888a85 solid; border-radius: 6px; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
 <tr>
  <td>

<div>Review request for Okular.</div>
<div>By Jonathan Verner.</div>








<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=319839">319839</a>


</div>



<div style="margin-top: 1.5em;">
 <b style="color: #575012; font-size: 10pt;">Repository: </b>
okular
</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 commit implements a variant of the '--unique' option, allowing
okular to start instances which are unique for a given path.

If one runs okular with the --unique-per-file option and gives a path as
an argument, then okular first checks whether this path is not already
opened in some "unique-per-file" instance. If so, it reloads this path
in that instance and tries to raise its window. If not, it opens the
file and makes itself a "unique-per-file" instance for the path.

The implementation is similar to the way the '--unique' option is
handled. Each "unique-per-file" instance registers a special DBUS
interface whose name is constructed as follows: 'org.kde.okular_'
is appended with a base64-encoded path (base64-encoding is used so that
the resulting name is a valid DBUS interface name) for which the
instance should be unique. On this interface it listens for requests for
reloading (or, mainly, changing current position) of the path. When
okular is run with the '--unique-per-file' option, it first checks
whether the appropriate interface is registered. If yes, it uses it to
reload the file. Otherwise it registeres this interface and opens the
file normally.</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;"><p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I manually tested both the --unique and the --unique-per-file options.
Both behave as expected and do not interfere with each other.</p>
<p style="padding: 0;text-rendering: inherit;margin: 0;line-height: inherit;white-space: inherit;">I am not sure how to write an automated test, though.</p></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>shell/main.cpp <span style="color: grey">(cc3d39bb4cac70a2e54b8cbcdaed30b71ceca214)</span></li>

 <li>shell/okular_main.cpp <span style="color: grey">(b66b6a5f7cd30e6d123ba0b0a2d871e11807ea15)</span></li>

 <li>shell/shell.h <span style="color: grey">(fea80acfbf91968d90babd281d199341b6370bbd)</span></li>

 <li>shell/shell.cpp <span style="color: grey">(73559689bd28758f36edb25b09a7036fd21a7835)</span></li>

 <li>shell/shellutils.h <span style="color: grey">(d5518c344c47dd81033a883cc43cca387764d362)</span></li>

 <li>shell/shellutils.cpp <span style="color: grey">(0dd737cf70ac888225a919799bd71905cfb89580)</span></li>

 <li>tests/mainshelltest.cpp <span style="color: grey">(a044895c1935c587552e875a98627e58d19ed443)</span></li>

</ul>

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






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



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