[Okular-devel] Review Request: Fix for the bug-166645
Jaydeep Solanki
jaydp17 at gmail.com
Tue Aug 14 19:11:04 UTC 2012
> On Aug. 12, 2012, 11:17 p.m., Albert Astals Cid wrote:
> > "because there was no way to close the document"
> >
> > That's totally incorrect, there's lots of ways of a document being closed. Have a look at all the possible calls to closeUrl in Part? How do you handle these?
>
> Jaydeep Solanki wrote:
> Not that, yes you can close the document programmatically, but that was not possible by the user. Like if I have one instance of Okular with Harry Potter opened, and if I want to open another book in the same instance, I can only do that after closing Harry Potter. So for the convenience of the user I have provided the "Close Document" action in File Menu, with that he can close the current document and open another document in the same instance.
>
> If I don't provide it, whenever the user try to open new document, he would have to "Quit" okular, and open it again, because till now there was no "close" available to user, there was only the "Quit" option.
>
> Albert Astals Cid wrote:
> You are not reading the code correctly. There are ways the user can close the document, e.g. if the document provides a close action link. How do you handle that?
>
> Jaydeep Solanki wrote:
> Sir, I didn't get you, can you please elaborate it a bit..
>
> Albert Astals Cid wrote:
> Don't call me Sir ;D I don't look at all like http://images.google.com/images?q=sir ;-)
>
> What i mean is:
> * You have a document with a CloseAction
> * The user clicks on a button/link that activates the CloseAction
> * The document is closed
>
> Jaydeep Solanki wrote:
> okay, now I got what you said, I googled a lot and found that a link can be created using JavaScript that closes the PDF. But wherever I saw, I got results related to Adobe Acrobat. I didn't get a universal way to close a PDF. So, I guess that if a PDF with a close link is opened in Okular, it won't close!
> If you have a sample PDF with a close button/link, I would love to have it.
>
> Albert Astals Cid wrote:
> So you don't trust me, eh? Not cool
> generators/poppler/generator_pdf.cpp:256: Create a DocumentAction that can be of the Close type
> core/document.cpp:3258: Process a Close action and emit the close signal
> part.cpp:337: Connect the close signal from the document to the close function of the part
>
> Do i really need to be more specific?
>
> Jaydeep Solanki wrote:
> I'm a newbie so please bear with me, & it's not that I don't trust you, I trust you man.
> It's just, I don't know some stuff :(
> okay, I looked what you said in the above comment, and found that yes the document will be closed by the close link/button :)
>
> Albert Astals Cid wrote:
> Good so how do you plan to handle that situation?
I guess such a situation won't cause any problem, because the link/button in the document will emit close() signal, and according to part.cpp:337: it is connected to close() slot of part.cpp. The Close Document action that I have implemented in the File menu also does the same, it calls the close() method to close the document. So clicking the link/button will be the same as clicking File >> Close Document.
- Jaydeep
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/105965/#review17286
-----------------------------------------------------------
On Aug. 12, 2012, 9:31 p.m., Jaydeep Solanki wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/105965/
> -----------------------------------------------------------
>
> (Updated Aug. 12, 2012, 9:31 p.m.)
>
>
> Review request for Okular.
>
>
> Description
> -------
>
> This patch is a fix for the bug-166645, as listed here (https://bugs.kde.org/show_bug.cgi?id=166645)
>
> Opens a new instance of Okular for every other file that is opened.
>
>
> Diffs
> -----
>
> part.h d9a5cc4
> part.cpp 7c1ca71
> part.rc 33d3829
> shell/shell.h 8430b9c
> shell/shell.cpp 8b42a27
>
> Diff: http://git.reviewboard.kde.org/r/105965/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Jaydeep Solanki
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/okular-devel/attachments/20120814/8afddba5/attachment.html>
More information about the Okular-devel
mailing list