* mu-contacts.c: don't use g_key_file_(get|set)_uint64, it's requires a too
new glib
This commit is contained in:
@ -73,8 +73,8 @@ unserialize_cache (MuContacts *self)
|
|||||||
* and take care of freeing it */
|
* and take care of freeing it */
|
||||||
g_key_file_get_string (self->_ccache, groups[i],
|
g_key_file_get_string (self->_ccache, groups[i],
|
||||||
MU_CONTACTS_NAME_KEY, NULL),
|
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));
|
MU_CONTACTS_TIMESTAMP_KEY, NULL));
|
||||||
/* note, we're using the groups[i], so don't free with g_strfreev */
|
/* note, we're using the groups[i], so don't free with g_strfreev */
|
||||||
g_hash_table_insert (self->_hash, groups[i], cinfo);
|
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",
|
g_key_file_set_string (self->_ccache, email, "name",
|
||||||
cinfo->_name);
|
cinfo->_name);
|
||||||
|
|
||||||
g_key_file_set_uint64 (self->_ccache, email, "timestamp",
|
g_key_file_set_integer (self->_ccache, email, "timestamp",
|
||||||
(guint64)cinfo->_tstamp);
|
(int)cinfo->_tstamp);
|
||||||
}
|
}
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@ -282,9 +282,10 @@ contact_info_new (char *name, time_t tstamp)
|
|||||||
static void
|
static void
|
||||||
contact_info_destroy (ContactInfo *cinfo)
|
contact_info_destroy (ContactInfo *cinfo)
|
||||||
{
|
{
|
||||||
if (cinfo) {
|
if (!cinfo)
|
||||||
g_free (cinfo->_name);
|
return;
|
||||||
g_slice_free (ContactInfo, cinfo);
|
|
||||||
}
|
g_free (cinfo->_name);
|
||||||
|
g_slice_free (ContactInfo, cinfo);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user