Merge branch 'master' into testing
This commit is contained in:
commit
a8844a3ed8
@ -79,6 +79,7 @@ enum {
|
||||
PROP_GREGORIAN_SECOND,
|
||||
PROP_GREGORIAN_MICROSECOND,
|
||||
PROP_GREGORIAN_TIMEZONE_OFFSET,
|
||||
PROP_JULIAN_DAY,
|
||||
PROP_JULIAN_DAY_VALID,
|
||||
PROP_COUNT
|
||||
};
|
||||
@ -329,6 +330,24 @@ gswe_timestamp_class_init(GsweTimestampClass *klass)
|
||||
gswe_timestamp_props[PROP_GREGORIAN_TIMEZONE_OFFSET]
|
||||
);
|
||||
|
||||
/**
|
||||
* GsweTimestamp:julian-day:
|
||||
*
|
||||
* The Julian Day represented by #GsweTimestamp
|
||||
*/
|
||||
gswe_timestamp_props[PROP_JULIAN_DAY] = g_param_spec_double(
|
||||
"julian-day",
|
||||
"Julian Day",
|
||||
"The Julian Day represented by this object",
|
||||
-G_MAXDOUBLE, G_MAXDOUBLE, 0,
|
||||
G_PARAM_STATIC_STRINGS | G_PARAM_READWRITE
|
||||
);
|
||||
g_object_class_install_property(
|
||||
gobject_class,
|
||||
PROP_JULIAN_DAY,
|
||||
gswe_timestamp_props[PROP_JULIAN_DAY]
|
||||
);
|
||||
|
||||
/**
|
||||
* GsweTimestamp:julian-day-valid:
|
||||
*
|
||||
@ -385,7 +404,11 @@ gswe_timestamp_set_property(GObject *object,
|
||||
|
||||
switch (prop_id) {
|
||||
case PROP_INSTANT_RECALC:
|
||||
timestamp->priv->instant_recalc = g_value_get_boolean(value);
|
||||
|
||||
if (timestamp->priv->instant_recalc) {
|
||||
gswe_timestamp_calculate_all(timestamp, NULL);
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
@ -461,6 +484,15 @@ gswe_timestamp_set_property(GObject *object,
|
||||
|
||||
break;
|
||||
|
||||
case PROP_JULIAN_DAY:
|
||||
gswe_timestamp_set_julian_day_et(
|
||||
timestamp,
|
||||
g_value_get_double(value),
|
||||
NULL
|
||||
);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
|
||||
|
||||
@ -541,6 +573,14 @@ gswe_timestamp_get_property(
|
||||
|
||||
break;
|
||||
|
||||
case PROP_JULIAN_DAY:
|
||||
g_value_set_double(
|
||||
value,
|
||||
timestamp->priv->julian_day
|
||||
);
|
||||
|
||||
break;
|
||||
|
||||
case PROP_JULIAN_DAY_VALID:
|
||||
g_value_set_boolean(
|
||||
value,
|
||||
@ -1647,14 +1687,6 @@ gswe_timestamp_new_from_gregorian_full(
|
||||
NULL));
|
||||
|
||||
timestamp->priv->valid_dates = VALID_GREGORIAN;
|
||||
g_object_notify_by_pspec(
|
||||
G_OBJECT(timestamp),
|
||||
gswe_timestamp_props[PROP_GREGORIAN_VALID]
|
||||
);
|
||||
g_object_notify_by_pspec(
|
||||
G_OBJECT(timestamp),
|
||||
gswe_timestamp_props[PROP_JULIAN_DAY_VALID]
|
||||
);
|
||||
|
||||
return timestamp;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user