GNOME Bugzilla – Bug 722375
Set 'DesktopId' property on Geoclue client proxy
Last modified: 2014-01-29 12:07:12 UTC
For security reasons, Apps must provide id of their desktop id (name of desktop file minus '.desktop' extension).
Mandatory docs link: http://www.freedesktop.org/software/geoclue/docs/gdbus-org.freedesktop.GeoClue2.Client.html#gdbus-property-org-freedesktop-GeoClue2-Client.DesktopId
gnome-weather does not use Geoclue anywhere right now. I won't forget to set the DesktopId when I start using it, but for now, I guess I can close this.
(In reply to comment #2) > gnome-weather does not use Geoclue anywhere right now. I won't forget to set > the DesktopId when I start using it, but for now, I guess I can close this. Sorry, this was supposed to be for clocks.
feel free to push a patch :-)
Created attachment 266769 [details] [review] geocoding: Provide desktop id to geoclue
Created attachment 266770 [details] [review] geocoding: Specify needed accuracy level to geoclue
Review of attachment 266769 [details] [review]: any reason to make this a public property? I would just define a static private constant DESKTOP_ID and set the client to that
(In reply to comment #7) > Review of attachment 266769 [details] [review]: > > any reason to make this a public property? Sorry? Dbus props are always public and each geoclue client gets a private client object anyways so no other app can access it unless it pretends to be clocks and if it can do that, desktop-id is hardly anything thats hidden from it. :) > I would just define a static private constant DESKTOP_ID and set the client to > that Ah ok, will change it then.
Created attachment 266813 [details] [review] geocoding: Provide desktop id to geoclue v2: Use a const field for desktop id.
(In reply to comment #8) > Sorry? Dbus props are always public and each geoclue client gets a private > client object anyways so no other app can access it unless it pretends to be > clocks and if it can do that, desktop-id is hardly anything thats hidden from > it. :) > Sorry, my fault, I was reviewing the patch from the phone so I didn't see it properly (or with the needed attention :) My point was that I did not want to be able to set those properties from outside since for clocks they are always the same fixed value, but I now see that there are two classes, one implementing the interface and exposing the properties and one using the interface and setting them. It is a bit of a shame that the accuracy level enum must be redefined in each app instead of being in a header of geoclue, but we've been over that before ;) Feel free to push both, and thank you for looking into it!
Review of attachment 266813 [details] [review]: looks good
Review of attachment 266770 [details] [review]: looks good (will probably need a small fixup since the other patch changed, but feel free to do it and push directly)
(In reply to comment #10) > (In reply to comment #8) > > Sorry? Dbus props are always public and each geoclue client gets a private > > client object anyways so no other app can access it unless it pretends to be > > clocks and if it can do that, desktop-id is hardly anything thats hidden from > > it. :) > > > > > Sorry, my fault, I was reviewing the patch from the phone so I didn't see it > properly (or with the needed attention :) > > My point was that I did not want to be able to set those properties from > outside since for clocks they are always the same fixed value, but I now see > that there are two classes, one implementing the interface and exposing the > properties and one using the interface and setting them. > > It is a bit of a shame that the accuracy level enum must be redefined in each > app instead of being in a header of geoclue, but we've been over that before ;) Yeah and in the end none of the people pushing for geoclue providing a library provided patches. :( > > Feel free to push both, and thank you for looking into it! No problems, this was easy one.
Attachment 266770 [details] pushed as 952d671 - geocoding: Specify needed accuracy level to geoclue Attachment 266813 [details] pushed as 8e7ef76 - geocoding: Provide desktop id to geoclue
(In reply to comment #14) > Attachment 266770 [details] pushed as 952d671 - geocoding: Specify needed accuracy level > to geoclue > Attachment 266813 [details] pushed as 8e7ef76 - geocoding: Provide desktop id to geoclue Thank you for the patches!