GNOME Bugzilla – Bug 649639
clock applet dbus handling broken
Last modified: 2011-05-23 21:53:23 UTC
Created attachment 187414 [details] [review] patch for clock applet dbus interface The dbus handling in the clock applet of gnome-panel-3.0.0.1 is broken, which means it is not possible to set timezones via the applet, which in turns means it is not possible to use its gweather functionality. I attach a diff which corrects this. The changes in set-timezone.c are self-explanatory. The one to clock-location.c is necessary to avoid two prefixes being prepended to the timezone file name. The gsd dbus interface method already prepends it and there is no need to do it again in clock_location_make_current(). The gsd implementation for gsd_datemechanism_can_set_time()/gsd_datemechanism_can_set_timezone() looks faulty as they always return TRUE. However, this does not really matter so far as gnome-panel is concerned: although because of this, if polkit permissions are not available, the location button in the clock applet will still appear, gsd will prevent any change of location not permitted by polkit (it will present an error dialog if the button is pressed).
[BTW, I know the patch doesn't introduce this: - "SetTimeZone", g_variant_new ("(s)", filename), + "SetTimezone", g_variant_new ("(s)", filename), but I just wanted to note that filenames are NOT of type "s". Either use "ay", or (better) use URIs.]
(In reply to comment #1) > [BTW, I know the patch doesn't introduce this: > > - "SetTimeZone", g_variant_new ("(s)", filename), > + "SetTimezone", g_variant_new ("(s)", filename), > > but I just wanted to note that filenames are NOT of type "s". Either use "ay", > or (better) use URIs.] This is actually not a filename anymore, just the name of a timezone.
Thanks for the patch, pushed!