aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/publish-calendar/publish-calendar.c
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/publish-calendar/publish-calendar.c
parentb6fddaaa0efb8013c526f00926830b9cdcbe0d60 (diff)
downloadgsoc2013-evolution-704b78d23bf8d707707411608a3453250f2637a1.tar
gsoc2013-evolution-704b78d23bf8d707707411608a3453250f2637a1.tar.gz
gsoc2013-evolution-704b78d23bf8d707707411608a3453250f2637a1.tar.bz2
gsoc2013-evolution-704b78d23bf8d707707411608a3453250f2637a1.tar.lz
gsoc2013-evolution-704b78d23bf8d707707411608a3453250f2637a1.tar.xz
gsoc2013-evolution-704b78d23bf8d707707411608a3453250f2637a1.tar.zst
gsoc2013-evolution-704b78d23bf8d707707411608a3453250f2637a1.zip
Replace deprecated GLib symbols (as of GLib 2.34.x)
Diffstat (limited to 'plugins/publish-calendar/publish-calendar.c')
-rw-r--r--plugins/publish-calendar/publish-calendar.c16
1 files changed, 11 insertions, 5 deletions
diff --git a/plugins/publish-calendar/publish-calendar.c b/plugins/publish-calendar/publish-calendar.c
index 4193ae50d4..ab3e36dd6d 100644
--- a/plugins/publish-calendar/publish-calendar.c
+++ b/plugins/publish-calendar/publish-calendar.c
@@ -182,10 +182,12 @@ publish_uri_async (EPublishUri *uri)
GThread *thread = NULL;
GError *error = NULL;
- thread = g_thread_create ((GThreadFunc) publish_no_succ_info, uri, FALSE, &error);
+ thread = g_thread_try_new (NULL, (GThreadFunc) publish_no_succ_info, uri, &error);
if (!thread) {
- g_warning (G_STRLOC ": %s", error->message);
+ g_warning (G_STRLOC ": %s", error ? error->message : "Unknown error");
g_error_free (error);
+ } else {
+ g_thread_unref (thread);
}
}
@@ -993,10 +995,12 @@ e_plugin_lib_enable (EPlugin *ep,
uris = g_settings_get_strv (settings, PC_SETTINGS_URIS);
g_object_unref (settings);
- thread = g_thread_create ((GThreadFunc) publish_uris_set_timeout, uris, FALSE, &error);
+ thread = g_thread_try_new (NULL, (GThreadFunc) publish_uris_set_timeout, uris, &error);
if (!thread) {
- g_warning ("Could create thread to set timeout for publishing uris : %s", error->message);
+ g_warning ("Could create thread to set timeout for publishing uris : %s", error ? error->message : "Unknown error");
g_error_free (error);
+ } else {
+ g_thread_unref (thread);
}
}
@@ -1096,12 +1100,14 @@ action_calendar_publish_cb (GtkAction *action,
GThread *thread = NULL;
GError *error = NULL;
- thread = g_thread_create ((GThreadFunc) publish_urls, NULL, FALSE, &error);
+ thread = g_thread_try_new (NULL, (GThreadFunc) publish_urls, NULL, &error);
if (!thread) {
/* To Translators: This is shown to a user when creation of a new thread,
* where the publishing should be done, fails. Basically, this shouldn't
* ever happen, and if so, then something is really wrong. */
error_queue_add (g_strdup (_("Could not create publish thread.")), error);
+ } else {
+ g_thread_unref (thread);
}
}