[california/wip/timezone] Final touches, bug fixed
- From: Jim Nelson <jnelson src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [california/wip/timezone] Final touches, bug fixed
- Date: Fri, 7 Mar 2014 01:54:41 +0000 (UTC)
commit 432048265450d48060abc0084f4f6b753dce977a
Author: Jim Nelson <jim yorba org>
Date: Thu Mar 6 17:54:32 2014 -0800
Final touches, bug fixed
src/calendar/calendar-system.vala | 12 ++++++------
src/calendar/calendar-timezone.vala | 6 +++---
src/component/component-instance.vala | 7 ++++---
vapi/libical.vapi | 2 +-
4 files changed, 14 insertions(+), 13 deletions(-)
---
diff --git a/src/calendar/calendar-system.vala b/src/calendar/calendar-system.vala
index 446fd22..bcb452c 100644
--- a/src/calendar/calendar-system.vala
+++ b/src/calendar/calendar-system.vala
@@ -47,10 +47,10 @@ public class System : BaseObject {
/**
* The current system { link Timezone}.
*
- * @see local_timezone_changed
+ * @see timezone_changed
* @see Timezone.utc
*/
- public static Timezone local_timezone { get; private set; }
+ public static Timezone timezone { get; private set; }
private static DBus.timedated timedated_service;
private static DBus.Properties timedated_properties;
@@ -66,11 +66,11 @@ public class System : BaseObject {
/**
* Fired when { link local_timezone} changes due to system configuration changes.
*/
- public signal void local_timezone_changed(Timezone new_local_timezone);
+ public signal void timezone_changed(Timezone new_timezone);
private System() {
zone = new OlsonZone(timedated_service.timezone);
- local_timezone = new Timezone(zone);
+ timezone = new Timezone(zone);
debug("Local zone: %s", zone.to_string());
// to be notified of changes as they occur
@@ -105,13 +105,13 @@ public class System : BaseObject {
if (changed_properties_values.contains(DBus.timedated.PROP_TIMEZONE)
|| DBus.timedated.PROP_TIMEZONE in changed_properties) {
zone = new OlsonZone(timedated_service.timezone);
- local_timezone = new Timezone(zone);
+ timezone = new Timezone(zone);
debug("New local zone: %s", zone.to_string());
// fire signals last in case a subscriber monitoring zone thinks that local_timezone
// has also changed
zone_changed(zone);
- local_timezone_changed(local_timezone);
+ timezone_changed(timezone);
}
}
diff --git a/src/calendar/calendar-timezone.vala b/src/calendar/calendar-timezone.vala
index a1b54e1..6ee5140 100644
--- a/src/calendar/calendar-timezone.vala
+++ b/src/calendar/calendar-timezone.vala
@@ -23,11 +23,11 @@ public class Timezone : BaseObject {
/**
* The system's configured { link Timezone}.
*
- * This is merely a convenience method for { link System.local_timezone}.
+ * This is merely a convenience method for { link System.timezone}.
*
- * @see System.local_timezone_changed
+ * @see System.timezone_changed
*/
- public static Timezone local { get { return System.local_timezone; } }
+ public static Timezone local { get { return System.timezone; } }
/**
* The { link OlsonZone} for this { link Timezone}.
diff --git a/src/component/component-instance.vala b/src/component/component-instance.vala
index d2e4fcd..307af70 100644
--- a/src/component/component-instance.vala
+++ b/src/component/component-instance.vala
@@ -250,11 +250,12 @@ public abstract class Instance : BaseObject, Gee.Hashable<Instance> {
ical_dt->hour = exact_time.hour;
ical_dt->minute = exact_time.minute;
ical_dt->second = exact_time.second;
- ical_dt->is_utc = 0;
+ ical_dt->is_utc = exact_time.tz.is_utc ? 1 : 0;
ical_dt->is_date = 0;
ical_dt->is_daylight = exact_time.is_dst ? 1 : 0;
- ical_dt->zone = iCal.icaltimezone.get_builtin_timezone_from_offset(exact_time.utc_offset,
- exact_time.tzid);
+ ical_dt->zone = iCal.icaltimezone.get_builtin_timezone(exact_time.tz.zone.value);
+ if (ical_dt->zone == null)
+ message("Unable to get builtin iCal timezone for %s", exact_time.tz.zone.to_string());
}
/**
diff --git a/vapi/libical.vapi b/vapi/libical.vapi
index e80e748..fb5e7df 100644
--- a/vapi/libical.vapi
+++ b/vapi/libical.vapi
@@ -57,7 +57,7 @@ namespace iCal {
[CCode (cname = "icalcomponent_add_property")]
public void add_property (iCal.icalproperty property);
[CCode (cname = "icalcomponent_as_ical_string")]
- public unowned string as_ical_string ();
+ public string as_ical_string ();
[CCode (cname = "icalcomponent_as_ical_string_r")]
public unowned string as_ical_string_r ();
[CCode (cname = "icalcomponent_begin_component")]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]