Add GsweTimestamp::julian-day property
It was somehow missing from the property list
This commit is contained in:
parent
34ded1881f
commit
e850018d62
@ -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:
|
||||
*
|
||||
@ -465,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);
|
||||
|
||||
@ -545,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,
|
||||
|
Loading…
Reference in New Issue
Block a user