From 030607cb5afe588ae2a581c47661525103b95a48 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Wed, 4 May 2011 01:42:00 +0300 Subject: [PATCH 1/2] * configure.ac: cosmetic --- configure.ac | 1 - 1 file changed, 1 deletion(-) diff --git a/configure.ac b/configure.ac index 2e9aff04..35620b15 100644 --- a/configure.ac +++ b/configure.ac @@ -92,7 +92,6 @@ AS_IF([test "x$have_gtest" = "xno"],[ AC_MSG_WARN([You need GLIB version >= 2.22 to build the tests]) ]) - # gmime 2.4 or 2.6? mu has only been tested with gmime-2.4, but Fedora # 14 ships with gmime 2.5.x, which registers itself (pkgconfig) as 2.6 # it is reported mu works fine with this new gmime as well, so we support From 5defbd8a153de1c5cad86187b40f6958a69b4bb3 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Wed, 4 May 2011 01:43:01 +0300 Subject: [PATCH 2/2] * mu-contacts.c: don't use g_key_file_(get|set)_uint64, it's requires a too new glib --- src/mu-contacts.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/src/mu-contacts.c b/src/mu-contacts.c index bf1ed913..ecc712c4 100644 --- a/src/mu-contacts.c +++ b/src/mu-contacts.c @@ -73,8 +73,8 @@ 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], - MU_CONTACTS_TIMESTAMP_KEY, NULL)); + (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); } @@ -125,7 +125,7 @@ mu_contacts_add (MuContacts *self, const char* name, const char *email, * empty name */ cinfo = (ContactInfo*) g_hash_table_lookup (self->_hash, email); if (!cinfo || - (cinfo->_tstamp < tstamp && !mu_str_is_empty(name))) { + (cinfo->_tstamp < tstamp && !mu_str_is_empty(name))) { ContactInfo *ci; /* note ci will take care of freeing the first param */ ci = contact_info_new (name ? g_strdup(name) : NULL, tstamp); g_hash_table_insert (self->_hash, g_strdup(email), ci); @@ -210,9 +210,9 @@ each_keyval (const char *email, ContactInfo *cinfo, MuContacts *self) if (cinfo->_name) 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) { - g_free (cinfo->_name); - g_slice_free (ContactInfo, cinfo); - } + if (!cinfo) + return; + + g_free (cinfo->_name); + g_slice_free (ContactInfo, cinfo); }