aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Lortie <desrt@desrt.ca>2013-03-04 16:18:10 -0500
committerRyan Lortie <desrt@desrt.ca>2013-03-04 16:18:10 -0500
commit8b7e3b5283cc6bd28d023f4135f54656c6aca282 (patch)
tree1af154bd261c88b32a385daf3c6c9ba925c62f29
parent46cec6b8056f4e96756483cedc0b14b749ff7856 (diff)
downloadayatana-indicator-datetime-8b7e3b5283cc6bd28d023f4135f54656c6aca282.tar.gz
ayatana-indicator-datetime-8b7e3b5283cc6bd28d023f4135f54656c6aca282.tar.bz2
ayatana-indicator-datetime-8b7e3b5283cc6bd28d023f4135f54656c6aca282.zip
Send proper arguments for SetTime call
vs. the gnome-settings-daemon DateTimeMechanism, the systemd version adds an extra two boolean arguments and wants time in microseconds instead of seconds. Make sure we're doing that properly.
-rw-r--r--src/datetime-prefs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/datetime-prefs.c b/src/datetime-prefs.c
index 196b95f..2c6998a 100644
--- a/src/datetime-prefs.c
+++ b/src/datetime-prefs.c
@@ -322,7 +322,8 @@ save_time (IndicatorDatetimePanel * self)
{
if (self->priv->user_edited_time) {
gdouble current_value = gtk_spin_button_get_value (GTK_SPIN_BUTTON (self->priv->date_spin));
- g_dbus_proxy_call (self->priv->proxy, "SetTime", g_variant_new ("(x)", (guint64)current_value),
+ g_dbus_proxy_call (self->priv->proxy, "SetTime",
+ g_variant_new ("(xbb)", (gint64) (current_value * G_TIME_SPAN_SECOND), FALSE, TRUE),
G_DBUS_CALL_FLAGS_NONE, -1, NULL, dbus_set_answered, "time");
}
self->priv->user_edited_time = FALSE;