aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/bbdb
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-11-06 23:20:46 +0800
committerMilan Crha <mcrha@redhat.com>2012-11-06 23:21:37 +0800
commit704b78d23bf8d707707411608a3453250f2637a1 (patch)
tree6bea89936534973c9b467503d198245f5035bc77 /plugins/bbdb
parentb6fddaaa0efb8013c526f00926830b9cdcbe0d60 (diff)
downloadgsoc2013-evolution-704b78d23bf8d707707411608a3453250f2637a1.tar.gz
gsoc2013-evolution-704b78d23bf8d707707411608a3453250f2637a1.tar.zst
gsoc2013-evolution-704b78d23bf8d707707411608a3453250f2637a1.zip
Replace deprecated GLib symbols (as of GLib 2.34.x)
Diffstat (limited to 'plugins/bbdb')
-rw-r--r--plugins/bbdb/bbdb.c5
-rw-r--r--plugins/bbdb/gaimbuddies.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/plugins/bbdb/bbdb.c b/plugins/bbdb/bbdb.c
index e0d3ca3e91..b06d168fed 100644
--- a/plugins/bbdb/bbdb.c
+++ b/plugins/bbdb/bbdb.c
@@ -192,12 +192,13 @@ bbdb_do_thread (const gchar *name,
* care of that, thus just add it to the queue */
todo = g_slist_append (todo, td);
} else {
+ GThread *thread;
GError *error = NULL;
EBookClient *client = bbdb_create_book_client (AUTOMATIC_CONTACTS_ADDRESSBOOK);
/* list was empty, add item and create a thread */
todo = g_slist_append (todo, td);
- g_thread_create (bbdb_do_in_thread, client, FALSE, &error);
+ thread = g_thread_try_new (NULL, bbdb_do_in_thread, client, &error);
if (error) {
g_warning ("%s: Creation of the thread failed with error: %s", G_STRFUNC, error->message);
@@ -206,6 +207,8 @@ bbdb_do_thread (const gchar *name,
G_UNLOCK (todo);
bbdb_do_in_thread (client);
G_LOCK (todo);
+ } else {
+ g_thread_unref (thread);
}
}
G_UNLOCK (todo);
diff --git a/plugins/bbdb/gaimbuddies.c b/plugins/bbdb/gaimbuddies.c
index 99352787e9..b59e683c8e 100644
--- a/plugins/bbdb/gaimbuddies.c
+++ b/plugins/bbdb/gaimbuddies.c
@@ -307,6 +307,7 @@ void
bbdb_sync_buddy_list (void)
{
GList *blist;
+ GThread *thread;
GError *error = NULL;
EBookClient *client = NULL;
struct sync_thread_data *std;
@@ -339,7 +340,7 @@ bbdb_sync_buddy_list (void)
syncing = TRUE;
- g_thread_create (bbdb_sync_buddy_list_in_thread, std, FALSE, &error);
+ thread = g_thread_try_new (NULL, bbdb_sync_buddy_list_in_thread, std, &error);
if (error) {
g_warning (
"%s: Creation of the thread failed with error: %s",
@@ -349,6 +350,8 @@ bbdb_sync_buddy_list (void)
G_UNLOCK (syncing);
bbdb_sync_buddy_list_in_thread (std);
G_LOCK (syncing);
+ } else {
+ g_thread_unref (thread);
}
G_UNLOCK (syncing);