summaryrefslogtreecommitdiff
path: root/src/caja-dropbox.c
diff options
context:
space:
mode:
authorCarlos Maddela <[email protected]>2018-12-08 16:38:08 +1100
committerraveit65 <[email protected]>2019-01-19 18:49:12 +0100
commitc85aaec1c46afdd1d7a975dd32d25c835b6daf10 (patch)
tree0156b8faae9a7f23bcf95e9dbbd6329740d3c68b /src/caja-dropbox.c
parent167bfabfc228801bf99736bebb01ccbf2c9a76a8 (diff)
downloadcaja-dropbox-c85aaec1c46afdd1d7a975dd32d25c835b6daf10.tar.bz2
caja-dropbox-c85aaec1c46afdd1d7a975dd32d25c835b6daf10.tar.xz
Remove deprecated glib2.0 API calls
origin commit from: https://github.com/dropbox/nautilus-dropbox/pull/62
Diffstat (limited to 'src/caja-dropbox.c')
-rw-r--r--src/caja-dropbox.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/caja-dropbox.c b/src/caja-dropbox.c
index c0ffad5..c7e8930 100644
--- a/src/caja-dropbox.c
+++ b/src/caja-dropbox.c
@@ -693,17 +693,12 @@ caja_dropbox_get_file_items(CajaMenuProvider *provider,
CajaDropbox *cvs = CAJA_DROPBOX(provider);
dropbox_command_client_request(&(cvs->dc.dcc), (DropboxCommand *) dgc);
- GTimeVal gtv;
-
/*
* 4. We have to block until it's done because caja expects a reply. But we will
* only block for 50 ms for a reply.
*/
- g_get_current_time(&gtv);
- g_time_val_add(&gtv, 50000);
-
- GHashTable *context_options_response = g_async_queue_timed_pop(reply_queue, &gtv);
+ GHashTable *context_options_response = g_async_queue_timeout_pop(reply_queue, 50000);
g_async_queue_unref(reply_queue);
if (!context_options_response) {
@@ -831,13 +826,13 @@ void get_emblem_paths_cb(GHashTable *emblem_paths_response, CajaDropbox *cvs)
g_hash_table_ref(emblem_paths_response);
}
- g_mutex_lock(cvs->emblem_paths_mutex);
+ g_mutex_lock(&(cvs->emblem_paths_mutex));
if (cvs->emblem_paths) {
g_idle_add((GSourceFunc) remove_emblem_paths, cvs->emblem_paths);
cvs->emblem_paths = NULL;
}
cvs->emblem_paths = emblem_paths_response;
- g_mutex_unlock(cvs->emblem_paths_mutex);
+ g_mutex_unlock(&(cvs->emblem_paths_mutex));
g_idle_add((GSourceFunc) add_emblem_paths, g_hash_table_ref(emblem_paths_response));
g_idle_add((GSourceFunc) reset_all_files, cvs);
@@ -856,11 +851,11 @@ static void
on_disconnect(CajaDropbox *cvs) {
reset_all_files(cvs);
- g_mutex_lock(cvs->emblem_paths_mutex);
+ g_mutex_lock(&(cvs->emblem_paths_mutex));
/* This call will free the data too. */
g_idle_add((GSourceFunc) remove_emblem_paths, cvs->emblem_paths);
cvs->emblem_paths = NULL;
- g_mutex_unlock(cvs->emblem_paths_mutex);
+ g_mutex_unlock(&(cvs->emblem_paths_mutex));
}
@@ -887,7 +882,7 @@ caja_dropbox_instance_init (CajaDropbox *cvs) {
(GEqualFunc) g_direct_equal,
(GDestroyNotify) NULL,
(GDestroyNotify) g_free);
- cvs->emblem_paths_mutex = g_mutex_new();
+ g_mutex_init(&(cvs->emblem_paths_mutex));
cvs->emblem_paths = NULL;
/* setup the connection obj*/