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 314475 - Startup notification problems
Startup notification problems
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
unspecified
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
: 310081 (view as bug list)
Depends on:
Blocks: 312019
 
 
Reported: 2005-08-25 17:17 UTC by Allison Karlitskaya (desrt)
Modified: 2005-08-26 02:34 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch (500 bytes, patch)
2005-08-25 22:29 UTC, Nickolay V. Shmyrev
none Details | Review
la la la (8.90 KB, patch)
2005-08-26 01:41 UTC, Allison Karlitskaya (desrt)
committed Details | Review

Description Allison Karlitskaya (desrt) 2005-08-25 17:17:46 UTC
I downloaded the following file to my desktop
http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1124.pdf


On opening it, evince popped open two windows with (as far as I can tell)
identical content.  I thought maybe I had accidentally double-clicked twice or
something but even running 'evince n1124.pdf' from the commandline gives two
windows.
Comment 1 Allison Karlitskaya (desrt) 2005-08-25 17:19:13 UTC
Sorry.  This has nothing to do with this PDF file.

The error occurs if you try and open a document while another evince instance is
open.

On the console you see:

desrt@moonpix:~/Desktop$ evince n1124.pdf
Attempt to register the same DBusConnection with the message bus, but it is
already registered

** (evince:612): WARNING **: Too few arguments in reply
desrt@moonpix:~/Desktop$
Comment 2 Nickolay V. Shmyrev 2005-08-25 17:21:46 UTC
Please write here versions of your dbus and evince
Comment 3 Allison Karlitskaya (desrt) 2005-08-25 18:13:48 UTC
evince Version: 0.3.4-0ubuntu3
dbus Version: 0.35.2-0ubuntu5


Comment 4 Nickolay V. Shmyrev 2005-08-25 20:46:31 UTC
Ryan, that should be duplicate of bugs 313724 and 313443. Can you please try to
build from CVS or build from your ubunty package but remove
ev-applicaiton-service.h from distribution tarball first.
Comment 5 Allison Karlitskaya (desrt) 2005-08-25 21:06:07 UTC
Reported here: http://bugzilla.ubuntu.com/show_bug.cgi?id=14165

Your suggestion fixed the problem, but introduced startup notification problems
(ie: you get a startup notification entry in the tasklist that doesn't go away
when the window opens).
Comment 6 Nickolay V. Shmyrev 2005-08-25 21:25:45 UTC
Nice, than it should be duplicate of bug 313724. I am marking it as such. 

About startup notification problem - first we don't use startup-notification at
all I think, are you sure that it's not breezy patch? If not please reopen this
bug or better fill another one.

*** This bug has been marked as a duplicate of 313724 ***
Comment 7 Allison Karlitskaya (desrt) 2005-08-25 21:36:50 UTC
Just quickly:


http://cvs.gnome.org/viewcvs/evince/data/evince.desktop.in.in?rev=1.3&view=markup

"StartupNotify=true"


Even if you're not using startup notification, Nautilus still thinks that you
are (and is right to think so).
Comment 8 Allison Karlitskaya (desrt) 2005-08-25 21:38:01 UTC
Removing this line from my /usr/share/applications/evince.desktop solves the
problem.
Comment 9 Nickolay V. Shmyrev 2005-08-25 22:29:29 UTC
Created attachment 51349 [details] [review]
Patch

Oh, sorry, I was wrong here.

It's patch provided by Marco to fix problem, can you test it?
Comment 10 Allison Karlitskaya (desrt) 2005-08-25 23:05:09 UTC
The attached patch fixes the problem as reported.  The new window doesn't,
however, focus itself on creation.

The solution to this problem is in the 4th point of this post:
http://mail.gnome.org/archives/desktop-devel-list/2004-December/msg00306.html
Comment 11 Allison Karlitskaya (desrt) 2005-08-26 00:35:43 UTC
OK.  The original bug, as reported, is in fact a bug and it can't be fixed by
just erasing that file.  I think what happened is that I got lucky when recompiling.

Here's the story.


If you look at the console, you see:

** (evince:3375): WARNING **: Too few arguments in reply


This is because of this call:
		if (!dbus_g_proxy_call (remote_object, "OpenURI", &error,
					G_TYPE_STRING, uri,
					G_TYPE_STRING, page_label,
					G_TYPE_INVALID)) {

This new interface lets you make the call and receive the arguments using a
single function.  It takes two lists of types.  The first list is a list of
arguments and their types.  The second is a list of returns and their types. 
*Both* of these lists need a G_TYPE_INVALID termination.

See http://dbus.freedesktop.org/doc/api/html/group__DBusGLib.html#ga42

"This function is equivalent to dbus_g_proxy_begin_call followed by
dbus_g_proxy_end_call. All of the input arguments are specified first, followed
by G_TYPE_INVALID, followed by all of the output values, followed by
G_TYPE_INVALID."

What I mean by "I got lucky when recompiling" is that it just happened that the
binary I built puts a 0 on the stack before calling that function whereas the
binary in breezy has some other junk there.
Comment 12 Allison Karlitskaya (desrt) 2005-08-26 01:41:29 UTC
Created attachment 51357 [details] [review]
la la la

Here's a patch against HEAD that pretty much fixes all of the problems talked
about in this report:

1) Adds the second G_TYPE_INVALID to the dbus_g_proxy_call()s
2) Deals with startup notification.
3) Passes the timestamp to the child.
4) Uses timestamps when creating/presenting windows.

Please review.
Comment 13 Luis Villa 2005-08-26 01:48:39 UTC
*** Bug 310081 has been marked as a duplicate of this bug. ***
Comment 14 Allison Karlitskaya (desrt) 2005-08-26 02:34:58 UTC
Fixes committed to CVS HEAD.