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 693533 - [WallClock] Add a timezone property
[WallClock] Add a timezone property
Status: RESOLVED FIXED
Product: gnome-desktop
Classification: Core
Component: libgnome-desktop
unspecified
Other All
: Normal normal
: ---
Assigned To: Desktop Maintainers
Desktop Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-02-10 17:12 UTC by Paolo Borelli
Modified: 2013-02-12 08:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[WallClock] Add a timezone property (3.43 KB, patch)
2013-02-10 17:12 UTC, Paolo Borelli
none Details | Review
patch with getter (4.14 KB, patch)
2013-02-10 18:01 UTC, Paolo Borelli
reviewed Details | Review

Description Paolo Borelli 2013-02-10 17:12:20 UTC
I use wallclock in gnome-clocks and being able to be notified of tz changed without having to monitor the file myself would be great
Comment 1 Paolo Borelli 2013-02-10 17:12:22 UTC
Created attachment 235630 [details] [review]
[WallClock] Add a timezone property

This way a user can be notified of the change without having to monitor
the timezone files itself.
It also reduces the load of the wall clock itself since using
g_date_time_new_now_local at every iteration forces reparsing of the
timezone file etc.
Comment 2 Paolo Borelli 2013-02-10 18:01:02 UTC
Created attachment 235633 [details] [review]
patch with getter

Same patch, but with a public getter
Comment 3 Colin Walters 2013-02-11 22:22:24 UTC
Review of attachment 235633 [details] [review]:

Two comments, after fixing looks good to commit.

::: libgnome-desktop/gnome-wall-clock.c
@@ +319,3 @@
+{
+	GnomeWallClock   *self = data;
+

Need to do:

if (self->priv->timezone)
  g_time_zone_unref (self->priv->timezone);

@@ +353,3 @@
+
+GTimeZone *
+gnome_wall_clock_get_timezone (GnomeWallClock *clock)

Needs a documentation comment; you want at least (transfer none) here
Comment 4 Paolo Borelli 2013-02-12 08:06:56 UTC
Thanks for the review... working on clocks in vala spoiled me with regard to unrefs :)

I also added it to finalize and pushed it: http://git.gnome.org/browse/gnome-desktop/commit/?id=c14b46f36e57e146e3aa64cf9a994acc656a7693