← Back to team overview

qpdfview team mailing list archive

Re: [Question #291532]: Move file between instances

 

Question #291532 on qpdfview changed:
https://answers.launchpad.net/qpdfview/+question/291532

    Status: Open => Answered

Adam Reichold proposed the following answer:
Hello Boris,

at least using the current code from trunk, i.e. what will become
version 0.4.17, one should be able to drag and drop tabs from one
instance's window to another by holding Shift and dragging the tab
itself, even though this will open a copy instead of "moving" the
document. (It will basically pass nothing but the file path, i.e. you
can also drag this into other applications but the state will not be
moved.)

Using trunk revision 1999 or later, I added an action called
"moveToInstance" which can be added to the document or the tab context
menu using the interface tab of the settings dialog. This will ask for
an instance name like '--choose-instance' does and try to communicate
with that instance using D-Bus, saving any pending modifications first
and closing the tab in the current instance if the document could be
opened in the other instance.

To keep things simple, I am currently not passing on any state but the
current page (but for example per-file settings will be saved before
moving and should be restored in the other instance if enabled) and I
only implemented moving to a currently running instance and not for
example explicitly adjusting the instance stored in the database for the
tab or starting the requested instance.

Best regards, Adam.

-- 
You received this question notification because your team qpdfview is an
answer contact for qpdfview.