[evolution/wip/camel-more-gobject] Make CamelDB a GObject descendant
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/camel-more-gobject] Make CamelDB a GObject descendant
- Date: Tue, 1 Nov 2016 18:40:28 +0000 (UTC)
commit 3b888911c4518ced8dc15790f8964af49a661f3d
Author: Milan Crha <mcrha redhat com>
Date: Tue Nov 1 19:40:34 2016 +0100
Make CamelDB a GObject descendant
src/mail/e-mail-properties.c | 6 +++---
src/mail/e-mail-remote-content.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/mail/e-mail-properties.c b/src/mail/e-mail-properties.c
index 588eff7..3c21c9e 100644
--- a/src/mail/e-mail-properties.c
+++ b/src/mail/e-mail-properties.c
@@ -21,6 +21,7 @@
#include <string.h>
#include <camel/camel.h>
+#include <sqlite3.h>
#include <libemail-engine/libemail-engine.h>
@@ -154,7 +155,7 @@ e_mail_properties_set_config_filename (EMailProperties *properties,
g_return_if_fail (config_filename != NULL);
g_return_if_fail (properties->priv->db == NULL);
- properties->priv->db = camel_db_open (config_filename, &error);
+ properties->priv->db = camel_db_new (config_filename, &error);
if (error) {
g_warning ("%s: Failed to open '%s': %s", G_STRFUNC, config_filename, error->message);
@@ -219,8 +220,7 @@ mail_properties_finalize (GObject *object)
g_clear_error (&error);
}
- camel_db_close (properties->priv->db);
- properties->priv->db = NULL;
+ g_clear_object (&properties->priv->db);
}
/* Chain up to parent's finalize() method. */
diff --git a/src/mail/e-mail-remote-content.c b/src/mail/e-mail-remote-content.c
index f38d541..ea08f0d 100644
--- a/src/mail/e-mail-remote-content.c
+++ b/src/mail/e-mail-remote-content.c
@@ -21,6 +21,7 @@
#include <string.h>
#include <camel/camel.h>
+#include <sqlite3.h>
#include "e-mail-remote-content.h"
@@ -380,7 +381,7 @@ e_mail_remote_content_set_config_filename (EMailRemoteContent *content,
g_return_if_fail (config_filename != NULL);
g_return_if_fail (content->priv->db == NULL);
- content->priv->db = camel_db_open (config_filename, &error);
+ content->priv->db = camel_db_new (config_filename, &error);
if (error) {
g_warning ("%s: Failed to open '%s': %s", G_STRFUNC, config_filename, error->message);
@@ -444,8 +445,7 @@ mail_remote_content_finalize (GObject *object)
g_clear_error (&error);
}
- camel_db_close (content->priv->db);
- content->priv->db = NULL;
+ g_clear_object (&content->priv->db);
}
g_mutex_lock (&content->priv->recent_lock);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]