[Okular-devel] Review Request 116700: Launch documents from external sources in new tabs
Albert Astals Cid
aacid at kde.org
Tue Mar 18 00:44:38 UTC 2014
> On March 17, 2014, 9:29 p.m., Albert Astals Cid wrote:
> > Does this also solve drag&drop as described in https://bugs.kde.org/show_bug.cgi?id=332238 ?
>
> Jonathan Doman wrote:
> No, I have avoided modifying the part/pageview.
>
> Albert Astals Cid wrote:
> Please solve drag&drop too.
>
> Jonathan Doman wrote:
> Okay, that shouldn't be difficult.
>
> This patch also doesn't handle reading from stdin. If you have time, I would appreciate your opinion on the best way to handle this, since the data would have to be passed from one process to another. (My best guess is to dump stdin to a temp file and tell the existing process to delete the file when it's closed.)
Caching stdin to another process makes the whole piping thing useless. But sure, i guess there's no other solution, no?
- Albert
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/116700/#review53260
-----------------------------------------------------------
On March 10, 2014, 10:45 p.m., Jonathan Doman wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/116700/
> -----------------------------------------------------------
>
> (Updated March 10, 2014, 10:45 p.m.)
>
>
> Review request for Okular.
>
>
> Bugs: 331872
> http://bugs.kde.org/show_bug.cgi?id=331872
>
>
> Repository: okular
>
>
> Description
> -------
>
> 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.
>
>
> Diffs
> -----
>
> shell/shell.cpp 01a9f1b1dc1992a4aa1c87330940b27b727608e5
> shell/shell.h 3b9aae061cd6be0c7a86c885fc06d00d9275bd50
> shell/main.cpp e0ca587ba167c4020d5af5bd33a2dc1b4923cac4
>
> Diff: https://git.reviewboard.kde.org/r/116700/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Jonathan Doman
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20140318/38bf3ef2/attachment-0001.html>
More information about the Okular-devel
mailing list