[Okular-devel] Review Request 123676: FEATURE: Implement the '--unique-per-file' as suggested in Bug #319839

Jonathan Verner jonathan.verner at matfyz.cz
Fri Jul 17 19:54:37 UTC 2015



> On July 12, 2015, 8:30 p.m., Albert Astals Cid wrote:
> > Hi Jonathan, thanks for the patch, sorry it took so much for someone to come back to you.
> > 
> > I'd really appreciate an autotest for this since this is getting more and more complex and if we don't autottest it it'll break at some point.
> > 
> > I see you've already modified mainshelltest.cpp basically waht you need to add there is a few more testcases checking that when you're in unique-per-file you don't get an increase of tabs/windows and that the page is updated correctly if you open the same file and that you get a new window if it's a different file.
> > 
> > Did you look at the file? What did you not understand?

No worries and thanks for the feedback. I'll try to add the unit tests, but unfortunately, due to real life (tm), I probably won't have time till the end of october :-(


- Jonathan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/123676/#review82416
-----------------------------------------------------------


On May 7, 2015, 5:15 p.m., Jonathan Verner wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/123676/
> -----------------------------------------------------------
> 
> (Updated May 7, 2015, 5:15 p.m.)
> 
> 
> Review request for Okular.
> 
> 
> Bugs: 319839
>     http://bugs.kde.org/show_bug.cgi?id=319839
> 
> 
> Repository: okular
> 
> 
> Description
> -------
> 
> 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.
> 
> 
> Diffs
> -----
> 
>   shell/main.cpp cc3d39bb4cac70a2e54b8cbcdaed30b71ceca214 
>   shell/okular_main.cpp b66b6a5f7cd30e6d123ba0b0a2d871e11807ea15 
>   shell/shell.h fea80acfbf91968d90babd281d199341b6370bbd 
>   shell/shell.cpp 73559689bd28758f36edb25b09a7036fd21a7835 
>   shell/shellutils.h d5518c344c47dd81033a883cc43cca387764d362 
>   shell/shellutils.cpp 0dd737cf70ac888225a919799bd71905cfb89580 
>   tests/mainshelltest.cpp a044895c1935c587552e875a98627e58d19ed443 
> 
> Diff: https://git.reviewboard.kde.org/r/123676/diff/
> 
> 
> Testing
> -------
> 
> I manually tested both the --unique and the --unique-per-file options.
> Both behave as expected and do not interfere with each other.
> 
> I am not sure how to write an automated test, though.
> 
> 
> Thanks,
> 
> Jonathan Verner
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20150717/d0cfe941/attachment.html>


More information about the Okular-devel mailing list