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 649639 - clock applet dbus handling broken
clock applet dbus handling broken
Status: RESOLVED FIXED
Product: gnome-panel
Classification: Other
Component: clock
3.0.x
Other Linux
: Normal normal
: ---
Assigned To: Panel Maintainers
Panel Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-05-07 09:07 UTC by Chris Vine
Modified: 2011-05-23 21:53 UTC
See Also:
GNOME target: ---
GNOME version: 2.91/3.0


Attachments
patch for clock applet dbus interface (1.77 KB, patch)
2011-05-07 09:07 UTC, Chris Vine
committed Details | Review

Description Chris Vine 2011-05-07 09:07:18 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).
Comment 1 Christian Persch 2011-05-08 16:55:32 UTC
[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.]
Comment 2 Vincent Untz 2011-05-23 21:51:03 UTC
(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.
Comment 3 Vincent Untz 2011-05-23 21:53:19 UTC
Thanks for the patch, pushed!