After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 302034 - Don't open >1 windows for the same document
Don't open >1 windows for the same document
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
0.2.x
Other Linux
: Normal enhancement
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2005-04-26 11:58 UTC by Reinout van Schouwen
Modified: 2014-08-12 09:25 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Reinout van Schouwen 2005-04-26 11:58:13 UTC
If the same document is activated more than once, Evince shows new windows for
the same document again and again. It would be better to pop up the existing
window for that document onto the current workspace.

This would be consistent with spatial nautilus too.
Comment 1 Marco Pesenti Gritti 2005-04-26 12:47:25 UTC
Evince is currently using different processes for different docs so this not
possible. CCing Bryan for UI feedback
Comment 2 Nickolay V. Shmyrev 2005-04-26 13:49:25 UTC
Why not? With some sort of IPC like bonobo_unique_application this could be easy.
Comment 3 Marco Pesenti Gritti 2005-04-26 14:54:53 UTC
>Why not? With some sort of IPC like bonobo_unique_application this could be easy.

Yeah, if we change to use the same process for all the windows, that would be
possible. That would introduce other issues though (like multi-head...), so I'm
not sure it's worth for  just this.
One advantage would be that you could use something like gedit metadata.
Comment 4 Bryan W Clark 2005-04-26 20:50:46 UTC
Actually I believe nautilus currently brings you to the workspace where the
window exists (which I think is wrong).  It should bring the app to your workspace.

I'd really recommend using D-BUS for this, it's kind of designed to do this sort
of thing.  Evince would simply implement the "org.gnome.Evince" or
"org.gnome.DocumentViewer" service, that service would then launch the
application windows.  This is probably a good deal of work to implement...

Basically you have the binary evince make command line argument conversions and
D-BUS calls to the 'evince-service' binary which is already running or started
at first call and implements the service.  The service is aware of all instances
of Evince running via D-BUS and if the document is not already open it  launches
a new process to handle the viewing of that document.

See this diagram for how it works: http://dbus.freedesktop.org/doc/diagram.png
Comment 5 Jiri Cerny 2005-04-27 06:06:40 UTC
I do not think this feature is needed. Quite often I want to see two different
pages of the same document in the same time and with this it would be not possible. 
Comment 6 Bryan W Clark 2005-04-27 07:04:35 UTC
I've said before that I think adding a command line "--new-window" option that
doesn't do this is more than fine.  I believe there's a bug about this already.

Many people who work on PDF/DVI and other document creation need this duplicate
window feature.  However they are comfortable with dealing with the command line
and outside of that use case a single window is the preferred behavior in GNOME.
Comment 7 Nils Philippsen 2005-06-06 15:26:07 UTC
If you filter out an already opened document (and rise the existing window
instead of displaying it a second time), having an MVC-wise "new view" command
would be beneficial IMO.
Comment 8 Marco Pesenti Gritti 2005-07-08 10:23:08 UTC
Fixed in cvs, if dbus is installed
Comment 9 Ankur Sinha (FranciscoD) 2014-08-12 09:25:04 UTC
(In reply to comment #5)
> I do not think this feature is needed. Quite often I want to see two different
> pages of the same document in the same time and with this it would be not possible.

+1

I'd prefer a setting that lets people configure this. I for one require multiple windows frequently. Now I know that I can use 'open a copy', but for a while I was left wondering why double clicking in nautilus or opening a new evince window and manually using "open" didn't work.