* mu-contacts.c: don't use g_key_file_(get|set)_uint64, it's requires a too

new glib
This commit is contained in:
Dirk-Jan C. Binnema 2011-05-04 01:43:01 +03:00
parent e039047e64
commit b15d9a9cf5
1 changed files with 11 additions and 10 deletions

View File

@ -73,7 +73,7 @@ unserialize_cache (MuContacts *self)
* and take care of freeing it */
g_key_file_get_string (self->_ccache, groups[i],
MU_CONTACTS_NAME_KEY, NULL),
g_key_file_get_uint64 (self->_ccache, groups[i],
(time_t)g_key_file_get_integer (self->_ccache, groups[i],
MU_CONTACTS_TIMESTAMP_KEY, NULL));
/* note, we're using the groups[i], so don't free with g_strfreev */
g_hash_table_insert (self->_hash, groups[i], cinfo);
@ -211,8 +211,8 @@ each_keyval (const char *email, ContactInfo *cinfo, MuContacts *self)
g_key_file_set_string (self->_ccache, email, "name",
cinfo->_name);
g_key_file_set_uint64 (self->_ccache, email, "timestamp",
(guint64)cinfo->_tstamp);
g_key_file_set_integer (self->_ccache, email, "timestamp",
(int)cinfo->_tstamp);
}
static gboolean
@ -282,9 +282,10 @@ contact_info_new (char *name, time_t tstamp)
static void
contact_info_destroy (ContactInfo *cinfo)
{
if (cinfo) {
if (!cinfo)
return;
g_free (cinfo->_name);
g_slice_free (ContactInfo, cinfo);
}
}