GNOME Bugzilla – Bug 709835
Wrong unique name shown for every well-known name
Last modified: 2013-10-19 06:38:37 UTC
d-feet will try to show both the well-known name ("Name" field) and the unique name ("Unique name" field) in the introspection window. But, the unique name being shown for every well-known name is the same. It's actually the unique name of the d-feet connection to the bus, not the unique-name of the actual service in the bus: In introspection.py:245, self.__label_unique_name.set_text(self.connection.get_unique_name()) Note also that ListNames() in org.freedesktop.DBus seems to return all unique names and all well-known names at the same time. This is, every service with a well-known name will be listed twice: one with the well-known name and another time with the unique name. The fix would probably involve: 1) Run ListNames() and use treat only the well-known names, calling GetNameOwner() for each in org.freedesktop.DBus, which should give the unique name of each service. 2) Run ListNames() again, this time looking only at the unique names, and skip adding those which were already added in the previous step.
> Note also that ListNames() in org.freedesktop.DBus seems to return all unique > names and all well-known names at the same time. This is, every service with a > well-known name will be listed twice: one with the well-known name and another > time with the unique name. > > The fix would probably involve: > 1) Run ListNames() and use treat only the well-known names, calling > GetNameOwner() for each in org.freedesktop.DBus, which should give the unique > name of each service. > 2) Run ListNames() again, this time looking only at the unique names, and skip > adding those which were already added in the previous step. Forget about this part; this is an artifact of another issue, as far as I can see.
Created attachment 256934 [details] [review] Patch. (In reply to comment #0) > d-feet will try to show both the well-known name ("Name" field) and the unique > name ("Unique name" field) in the introspection window. > > But, the unique name being shown for every well-known name is the same. It's > actually the unique name of the d-feet connection to the bus, not the > unique-name of the actual service in the bus: > > In introspection.py:245, > self.__label_unique_name.set_text(self.connection.get_unique_name()) > This patch should fix the unique name shown.
(In reply to comment #2) > Created an attachment (id=256934) [details] [review] > Patch. > > (In reply to comment #0) > > d-feet will try to show both the well-known name ("Name" field) and the unique > > name ("Unique name" field) in the introspection window. > > > > But, the unique name being shown for every well-known name is the same. It's > > actually the unique name of the d-feet connection to the bus, not the > > unique-name of the actual service in the bus: > > > > In introspection.py:245, > > self.__label_unique_name.set_text(self.connection.get_unique_name()) > > > > This patch should fix the unique name shown. Patch looks good to me, but the tests fail. try "make check"
Created attachment 257397 [details] [review] Updated patch. Yeah, forgot make check because I compiled with --disable-tests :) Done now, let me know what you think.
(In reply to comment #4) > Created an attachment (id=257397) [details] [review] > Updated patch. > > Yeah, forgot make check because I compiled with --disable-tests :) > > Done now, let me know what you think. make check works fine now. But when I exit the program, I get now: tom@steinpilz:~/devel/gnome/src/d-feet$ DFEET_DEBUG=1 ./src/d-feet Traceback (most recent call last):
+ Trace 232629
self.stack.disconnect(self.__stack_child_added_id)
return func(_get_instance_for_signal(obj), *args, **kwargs)
return info.invoke(*args, **kwargs)
Segmentation fault Maybe that's a bug in pygobject?
(In reply to comment #5) > (In reply to comment #4) > > Created an attachment (id=257397) [details] [review] [details] [review] > > Updated patch. > > > > Yeah, forgot make check because I compiled with --disable-tests :) > > > > Done now, let me know what you think. > > make check works fine now. But when I exit the program, I get now: > > tom@steinpilz:~/devel/gnome/src/d-feet$ DFEET_DEBUG=1 ./src/d-feet > Traceback (most recent call last): > I have no idea what that is. Do you only get that when my patches are running?
(In reply to comment #6) > (In reply to comment #5) > > (In reply to comment #4) > > > Created an attachment (id=257397) [details] [review] [details] [review] [details] [review] > > > Updated patch. > > > > > > Yeah, forgot make check because I compiled with --disable-tests :) > > > > > > Done now, let me know what you think. > > > > make check works fine now. But when I exit the program, I get now: > > > > tom@steinpilz:~/devel/gnome/src/d-feet$ DFEET_DEBUG=1 ./src/d-feet > > Traceback (most recent call last): > > > > I have no idea what that is. Do you only get that when my patches are running? No. Checked and I get the same error without our patches. So I'll push them. Thanks!!!