Code review comment for lp:~laney/indicator-datetime/timedated-timezone-property

Lars Karlitski (larsu) wrote :

Thanks for working on this!

It's causing some unnecessary bus traffic though:

 - watch org.freedesktop.timedate1
 - call GetProperties and fetch all properties of that object
 - subscribe to PropertiesChanged of all properties instead of just the one

Really all you need here is to add a match rule for PropertiesChanged for that *one* property you're interested in. Using g_dbus_connection_signal_subscribe() results in only one call to the daemon and you'll only get signals when the property you're interested in changes.

(By the way, the name_vanished() handler is called immediately when the name doesn't exist. Currently it's spewing some GObject warnings because you're trying to access the proxy without checking it for NULL. However, don't fix this if you stop watching the name anyway)

review: Needs Fixing

« Back to merge proposal