aboutsummaryrefslogtreecommitdiffstats
path: root/plugins
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-09-15 11:16:38 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-09-15 11:48:02 +0800
commit5310e4a0b10ded4c77ce9dfaff49d3e99e327462 (patch)
treeb29d85e7bb2e7b3e772859fa7e0e2ff9ab33846e /plugins
parent47d25995c5ca78ff530ce6a23faebf6547898e8e (diff)
downloadgsoc2013-evolution-5310e4a0b10ded4c77ce9dfaff49d3e99e327462.tar
gsoc2013-evolution-5310e4a0b10ded4c77ce9dfaff49d3e99e327462.tar.gz
gsoc2013-evolution-5310e4a0b10ded4c77ce9dfaff49d3e99e327462.tar.bz2
gsoc2013-evolution-5310e4a0b10ded4c77ce9dfaff49d3e99e327462.tar.lz
gsoc2013-evolution-5310e4a0b10ded4c77ce9dfaff49d3e99e327462.tar.xz
gsoc2013-evolution-5310e4a0b10ded4c77ce9dfaff49d3e99e327462.tar.zst
gsoc2013-evolution-5310e4a0b10ded4c77ce9dfaff49d3e99e327462.zip
Adapt to CamelOperation API changes.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/dbx-import/dbx-importer.c14
-rw-r--r--plugins/pst-import/pst-importer.c14
2 files changed, 12 insertions, 16 deletions
diff --git a/plugins/dbx-import/dbx-importer.c b/plugins/dbx-import/dbx-importer.c
index c1a0bf651c..9905b617b7 100644
--- a/plugins/dbx-import/dbx-importer.c
+++ b/plugins/dbx-import/dbx-importer.c
@@ -671,7 +671,7 @@ dbx_import_imported (DbxImporter *m)
static void
dbx_import_free (DbxImporter *m)
{
- camel_operation_unref (m->status);
+ g_object_unref (m->status);
g_free (m->status_what);
g_mutex_free (m->status_lock);
@@ -719,12 +719,6 @@ dbx_status (CamelOperation *op, const gchar *what, gint pc, gpointer data)
{
DbxImporter *importer = data;
- if (pc == CAMEL_OPERATION_START) {
- pc = 0;
- } else if (pc == CAMEL_OPERATION_END) {
- pc = 100;
- }
-
g_mutex_lock (importer->status_lock);
g_free (importer->status_what);
importer->status_what = g_strdup (what);
@@ -752,7 +746,11 @@ org_gnome_evolution_readdbx_import (EImport *ei, EImportTarget *target, EImportI
m->status_timeout_id = g_timeout_add (100, dbx_status_timeout, m);
/*m->status_timeout_id = NULL;*/
m->status_lock = g_mutex_new ();
- m->status = camel_operation_new (dbx_status, m);
+ m->status = camel_operation_new ();
+
+ g_signal_connect (
+ m->status, "status",
+ G_CALLBACK (dbx_status), m);
id = m->base.seq;
diff --git a/plugins/pst-import/pst-importer.c b/plugins/pst-import/pst-importer.c
index dcd28cbd65..6455ff42f7 100644
--- a/plugins/pst-import/pst-importer.c
+++ b/plugins/pst-import/pst-importer.c
@@ -1540,7 +1540,7 @@ static void
pst_import_free (PstImporter *m)
{
// pst_close (&m->pst);
- camel_operation_unref (m->status);
+ g_object_unref (m->status);
g_free (m->status_what);
g_mutex_free (m->status_lock);
@@ -1588,12 +1588,6 @@ pst_status (CamelOperation *op, const gchar *what, gint pc, gpointer data)
{
PstImporter *importer = data;
- if (pc == CAMEL_OPERATION_START) {
- pc = 0;
- } else if (pc == CAMEL_OPERATION_END) {
- pc = 100;
- }
-
g_mutex_lock (importer->status_lock);
g_free (importer->status_what);
importer->status_what = g_strdup (what);
@@ -1625,7 +1619,11 @@ pst_import (EImport *ei, EImportTarget *target)
m->status_timeout_id = g_timeout_add (100, pst_status_timeout, m);
/*m->status_timeout_id = NULL;*/
m->status_lock = g_mutex_new ();
- m->status = camel_operation_new (pst_status, m);
+ m->status = camel_operation_new ();
+
+ g_signal_connect (
+ m->status, "status",
+ G_CALLBACK (pst_status), m);
id = m->base.seq;