<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/116700/">https://git.reviewboard.kde.org/r/116700/</a>
     </td>
    </tr>
   </table>
   <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;">Thanks! Very good work. Sorry for delay, but at least I could make it before the 4.13.0 tag :-)</pre>
 <br />









<p>- Albert Astals Cid</p>


<br />
<p>On April 9th, 2014, 10:08 p.m. UTC, Jonathan Doman 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 Okular.</div>
<div>By Jonathan Doman.</div>


<p style="color: grey;"><i>Updated April 9, 2014, 10:08 p.m.</i></p>







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

 <a href="http://bugs.kde.org/show_bug.cgi?id=332238">332238</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;">Currently, tabs can only be created by opening files through okular's file dialog. This patch allows external sources (e.g. file browsers) to open documents in tabs of existing windows.

Basically, whenever okular is launched it uses D-Bus to search for existing okular instances that are capable of handling its documents. An eligible window will have enough space for all the documents (space depends on whether tabs are allowed or not), and be located on the current desktop. If there are multiple eligible windows, one is chosen "at random" (the first one in the D-Bus listing). This metric can be changed in the future, but is the simplest for now.

To facilitate the D-Bus interaction, two methods were added: "canOpenDocs" is used to find an eligible window, "openDocument" is used to actually open a single document. Additionally, "tryRaise" was modified to work on non-unique windows.

I previously thought that okular should behave similar to a web browser, but now I think they are very different. Most people open a web browser and then search and open links completely within it. However, most people will use okular by clicking on files in a file browser. Therefore, I don't think okular should ever open tabs in a window on a different desktop.

One shortcoming occurs when one wants to open a document in its own window, but instead gets put into a tab. There is no way to "detach" a tab, so it's necessary to then open an empty okular instance and use the file dialog. Detaching tabs should be possible, but I guess there are concerns about how to do so efficiently.</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/shell.cpp <span style="color: grey">(01a9f1b1dc1992a4aa1c87330940b27b727608e5)</span></li>

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

 <li>part.h <span style="color: grey">(010e9de1f2b5c27531a48b943d821ccc3f3f7205)</span></li>

 <li>part.cpp <span style="color: grey">(4ce7e28e1071772921e6292e61a88c905a62d7f6)</span></li>

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

 <li>ui/thumbnaillist.h <span style="color: grey">(61601c228512772fd46abc27468523aef562c3fa)</span></li>

 <li>ui/sidebar.cpp <span style="color: grey">(2474db8c357f6bfd1a9b6bd75091f2eb7b7b7693)</span></li>

 <li>ui/pageview.cpp <span style="color: grey">(dd4199450672c18ebfa146327d8e9b7eb034ddc8)</span></li>

 <li>ui/sidebar.h <span style="color: grey">(036d7788096366d6bab7d7f2a41d55b7a31d303a)</span></li>

 <li>ui/pageview.h <span style="color: grey">(577b908633bd0778df33d0a15961ab16071a1500)</span></li>

 <li>ui/thumbnaillist.cpp <span style="color: grey">(72b557e6624e8229cf1e5e4c5dc69ed77fec54cb)</span></li>

</ul>

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







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








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